이 페이지에서

QSqlIndex Class

QSqlIndex 클래스는 데이터베이스 인덱스를 조작하고 설명하는 기능을 제공합니다. 더 보기...

헤더: #include <QSqlIndex>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sql)
target_link_libraries(mytarget PRIVATE Qt6::Sql)
qmake: QT += sql
상속받는 항목: QSqlRecord

속성

공개 함수

QSqlIndex(const QString &cursorname = QString(), const QString &name = QString())
QSqlIndex(const QSqlIndex &other)
(since 6.6) QSqlIndex(QSqlIndex &&other)
~QSqlIndex()
void append(const QSqlField &field)
void append(const QSqlField &field, bool desc)
QString cursorName() const
bool isDescending(int i) const
QString name() const
void setCursorName(const QString &cursorName)
void setDescending(int i, bool desc)
void setName(const QString &name)
(since 6.6) QSqlIndex &operator=(QSqlIndex &&other)
QSqlIndex &operator=(const QSqlIndex &other)

상세 설명

인덱스는 데이터베이스 내의 단일 테이블 또는 뷰를 가리킵니다. 인덱스를 구성하는 필드에 대한 정보는 SQL 문을 생성하는 데 사용될 수 있습니다.

속성 설명

[since 6.8] cursorName : QString

이 속성은 인덱스가 연결된 커서의 이름을 저장합니다.

이 열거형은 Qt 6.8에서 도입되었습니다.

액세스 함수:

QString cursorName() const
void setCursorName(const QString &cursorName)

[since 6.8] name : QString

이 속성은 인덱스의 이름을 저장합니다.

이 열거형은 Qt 6.8에서 도입되었습니다.

액세스 함수:

QString name() const
void setName(const QString &name)

멤버 함수 문서

[explicit] QSqlIndex::QSqlIndex(const QString &cursorname = QString(), const QString &name = QString())

커서 이름 cursorname 과 인덱스 이름 name 을 사용하여 빈 인덱스를 생성합니다.

QSqlIndex::QSqlIndex(const QSqlIndex &other)

other 의 복사본을 생성합니다.

[noexcept default, since 6.6] QSqlIndex::QSqlIndex(QSqlIndex &&other)

other 에서 새로운 QSqlIndex를 이동 생성합니다.

참고: 이동된객체 ` other `은 부분적으로 형성된 상태가 되며, 이 상태에서는 소멸과 새 값 할당만이 유효한 연산입니다.

이 함수는 Qt 6.6에서 도입되었습니다.

[noexcept] QSqlIndex::~QSqlIndex()

객체를 삭제하고 할당된 리소스를 모두 해제합니다.

void QSqlIndex::append(const QSqlField &field)

field 필드를 인덱싱된 필드 목록에 추가합니다. 이 필드는 오름차순 정렬 순서로 추가됩니다.

void QSqlIndex::append(const QSqlField &field, bool desc)

field 필드를 인덱싱된 필드 목록에 추가합니다. desc 가 true가 아닌 경우, 해당 필드는 오름차순으로 정렬되어 추가됩니다.

이 함수는 오버로드된 함수입니다.

QString QSqlIndex::cursorName() const

cursorName을 반환합니다.

참고: cursorName 속성에 대한게터 함수입니다.

setCursorName()도 참조하십시오 .

bool QSqlIndex::isDescending(int i) const

인덱스의 i 필드가 내림차순으로 정렬되어 있으면 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.

QString QSqlIndex::name() const

이름을 반환합니다.

참고: 속성 name에 대한게터 함수입니다.

setName()도 참조하십시오 .

void QSqlIndex::setCursorName(const QString &cursorName)

cursorName 를 cursorName 으로 설정합니다.

참고: cursorName 속성에 대한세터 함수입니다.

cursorName()도 참조하십시오 .

void QSqlIndex::setDescending(int i, bool desc)

desc 가 true인 경우, i 필드는 내림차순으로 정렬됩니다. 그렇지 않은 경우, i 필드는 오름차순으로 정렬됩니다(기본값). 해당 필드가 존재하지 않으면 아무런 작업도 수행되지 않습니다.

isDescending()도 참조하십시오 .

void QSqlIndex::setName(const QString &name)

name 를 name 로 설정합니다.

참고: name 속성에 대한세터 함수입니다.

name()도 참조하십시오 .

[noexcept, since 6.6] QSqlIndex &QSqlIndex::operator=(QSqlIndex &&other)

other 를 이 QSqlIndex 인스턴스에 이동-할당합니다.

참고: 이동된객체 other 는 부분적으로 형성된 상태가 되며, 이 상태에서는 소멸과 새 값 할당만이 유효한 연산입니다.

이 함수는 Qt 6.6에서 도입되었습니다.

QSqlIndex &QSqlIndex::operator=(const QSqlIndex &other)

인덱스를 ` other`와 동일하게 설정합니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.