KDb
KDbOrderByColumn.cpp
39#define KDbOrderByColumnPrivateArgs(o) std::tie(o.querySchema, o.connection, o.columnIndex, o.pos, o.field, o.order)
40 Private(KDbQueryColumnInfo* aColumn, int aPos, KDbField* aField, KDbOrderByColumn::SortOrder aOrder)
80 //! Value of -1 means that the column to sort has been specified by providing its name (or alias).
183 dbg.nospace() << qPrintable(QString::fromLatin1("COLUMN_AT_POSITION_%1(").arg(order.position() + 1))
208 const QByteArray orderString(d->order == KDbOrderByColumn::SortOrder::Ascending ? "" : " DESC");
216 tableName = KDbEscapedString(escapeIdentifier(col->field()->table()->name(), conn, escapingType));
284KDbOrderByColumnList::KDbOrderByColumnList(const KDbOrderByColumnList& other, KDbConnection *conn,
439 for (QList<KDbOrderByColumn*>::ConstIterator it(list.constBegin()); it != list.constEnd(); ++it) {
Provides database connection, allowing queries and data modification.
Definition KDbConnection.h:52
KDbOrderByColumnList provides list of sorted columns for a query schema.
Definition KDbOrderByColumn.h:128
QList< KDbOrderByColumn * >::ConstIterator constEnd() const
Definition KDbOrderByColumn.cpp:427
bool operator==(const KDbOrderByColumnList &other) const
Definition KDbOrderByColumn.cpp:303
void appendField(KDbField *field, KDbOrderByColumn::SortOrder order=KDbOrderByColumn::SortOrder::Ascending)
Definition KDbOrderByColumn.cpp:375
const KDbOrderByColumn * value(int index) const
Returns column with given index.
Definition KDbOrderByColumn.cpp:308
QList< KDbOrderByColumn * >::Iterator end()
Definition KDbOrderByColumn.cpp:417
bool appendFields(KDbConnection *conn, KDbQuerySchema *querySchema, const QString &field1, KDbOrderByColumn::SortOrder order1=KDbOrderByColumn::SortOrder::Ascending, const QString &field2=QString(), KDbOrderByColumn::SortOrder order2=KDbOrderByColumn::SortOrder::Ascending, const QString &field3=QString(), KDbOrderByColumn::SortOrder order3=KDbOrderByColumn::SortOrder::Ascending, const QString &field4=QString(), KDbOrderByColumn::SortOrder order4=KDbOrderByColumn::SortOrder::Ascending, const QString &field5=QString(), KDbOrderByColumn::SortOrder order5=KDbOrderByColumn::SortOrder::Ascending)
Definition KDbOrderByColumn.cpp:318
KDbEscapedString toSqlString(bool includeTableNames, KDbConnection *conn, KDbQuerySchema *query, KDb::IdentifierEscapingType escapingType=KDb::DriverEscaping) const
Return an SQL string like "name ASC, 2 DESC" usable for building an SQL statement.
Definition KDbOrderByColumn.cpp:449
QList< KDbOrderByColumn * >::Iterator begin()
Definition KDbOrderByColumn.cpp:412
QList< KDbOrderByColumn * >::ConstIterator constBegin() const
Definition KDbOrderByColumn.cpp:422
void appendColumn(KDbQueryColumnInfo *columnInfo, KDbOrderByColumn::SortOrder order=KDbOrderByColumn::SortOrder::Ascending)
Definition KDbOrderByColumn.cpp:352
KDbOrderByColumn provides information about a single query column used for sorting.
Definition KDbOrderByColumn.h:34
KDbOrderByColumn::SortOrder sortOrder() const
Definition KDbOrderByColumn.cpp:159
KDbOrderByColumn()
Creates an empty information about a single query column.
Definition KDbOrderByColumn.cpp:93
bool operator==(const KDbOrderByColumn &col) const
Definition KDbOrderByColumn.cpp:172
KDbField * field() const
A field to sort, used only in case when the second constructor was used.
Definition KDbOrderByColumn.cpp:154
KDbOrderByColumn * copy(KDbConnection *conn, KDbQuerySchema *fromQuery, KDbQuerySchema *toQuery) const
Definition KDbOrderByColumn.cpp:118
KDbOrderByColumn & operator=(const KDbOrderByColumn &other)
Assigns other to this object returns a reference to this object.
Definition KDbOrderByColumn.cpp:164
KDbEscapedString toSqlString(bool includeTableName, KDbConnection *conn, KDbQuerySchema *query, KDb::IdentifierEscapingType escapingType=KDb::DriverEscaping) const
Return an SQL string like "name ASC" or "2 DESC" usable for building an SQL statement.
Definition KDbOrderByColumn.cpp:203
Helper class that assigns additional information for the column in a query.
Definition KDbQueryColumnInfo.h:41
const KDbQuerySchema * querySchema() const
Returns query schema for this column.
Definition KDbQueryColumnInfo.cpp:103
KDbConnection * connection()
Returns connection for this column.
Definition KDbQueryColumnInfo.cpp:108
KDbQuerySchema provides information about database query.
Definition KDbQuerySchema.h:46
KDbQueryColumnInfo::Vector fieldsExpanded(KDbConnection *conn, FieldsExpandedMode mode=FieldsExpandedMode::Default) const
Definition KDbQuerySchema.h:501
@ WithInternalFields
Like Default but internal fields (for lookup) are appended.
KDbQueryColumnInfo * columnInfo(KDbConnection *conn, const QString &identifier, ExpandMode mode=ExpandMode::Expanded) const
Definition KDbQuerySchema.cpp:707
KDbQueryColumnInfo * expandedOrInternalField(KDbConnection *conn, int index) const
Definition KDbQuerySchema.cpp:790
KDbField * findTableField(const QString &fieldOrTableAndFieldName) const
Definition KDbQuerySchema.cpp:518
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
KIOCORE_EXPORT CopyJob * copy(const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
QDebug & nospace()
QDebug & space()
ConstIterator
Iterator
void append(QList< T > &&value)
iterator begin()
void clear()
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
iterator end()
qsizetype indexOf(const AT &value, qsizetype from) const const
bool isEmpty() const const
void removeLast()
qsizetype size() const const
T value(qsizetype i) const const
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.