QSqlIndex Class
QSqlIndex クラスは、データベースのインデックスを操作および記述するための関数を提供します。詳細...
| ヘッダー: | #include <QSqlIndex> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Sql) target_link_libraries(mytarget PRIVATE Qt6::Sql) |
| qmake: | QT += sql |
| 継承元: | QSqlRecord |
- 継承されたメンバーを含む、すべてのメンバーの一覧
- QSqlIndexは、データベースクラスの一部です。
プロパティ
(since 6.8)cursorName : QString(since 6.8)name : QString
公開関数
| 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) |
プロパティのドキュメント
[since 6.8] cursorName : QString
このプロパティには、インデックスが関連付けられているカーソルの名前が格納されます。
この列挙型は Qt 6.8 で導入されました。
アクセス関数:
| QString | cursorName() const |
| void | setCursorName(const QString &cursorName) |
[since 6.8] name : QString
このプロパティには、インデックスの名前が格納されます。
この列挙型は Qt 6.8 で導入されました。
アクセス関数:
メンバ関数のドキュメント
[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.