#include <queryschema.h>
Public Member Functions | |
| OrderByColumnList () | |
| bool | appendFields (QuerySchema &querySchema, const TQString &field1, bool ascending1=true, const TQString &field2=TQString(), bool ascending2=true, const TQString &field3=TQString(), bool ascending3=true, const TQString &field4=TQString(), bool ascending4=true, const TQString &field5=TQString(), bool ascending5=true) |
| void | appendColumn (QueryColumnInfo &columnInfo, bool ascending=true) |
| void | appendField (Field &field, bool ascending=true) |
| bool | appendField (QuerySchema &querySchema, const TQString &fieldName, bool ascending=true) |
| bool | appendColumn (QuerySchema &querySchema, bool ascending=true, int pos=-1) |
| void | appendColumn (const OrderByColumn &column) |
| bool | isEmpty () const |
| uint | count () const |
| void | clear () |
| const_iterator | constBegin () const |
| const_iterator | constEnd () const |
| TQString | debugString () const |
| TQString | toSQLString (bool includeTableNames=true, Driver *drv=0, int identifierEscaping=Driver::EscapeDriver|Driver::EscapeAsNecessary) const |
Detailed Description
KexiDB::OrderByColumnList provides list of sorted columns for a query schema.
Definition at line 158 of file queryschema.h.
Constructor & Destructor Documentation
◆ OrderByColumnList()
| OrderByColumnList::OrderByColumnList | ( | ) |
Constructs empty list of ordered columns.
Definition at line 448 of file queryschema.cpp.
◆ ~OrderByColumnList()
| OrderByColumnList::~OrderByColumnList | ( | ) |
Definition at line 482 of file queryschema.cpp.
Member Function Documentation
◆ appendColumn() [1/3]
| void OrderByColumnList::appendColumn | ( | const OrderByColumn & | column | ) |
Appends column to the list.
Definition at line 524 of file queryschema.cpp.
◆ appendColumn() [2/3]
| void OrderByColumnList::appendColumn | ( | QueryColumnInfo & | columnInfo, |
| bool | ascending = true ) |
Appends column columnInfo. Ascending sorting is set is ascending is true.
Definition at line 486 of file queryschema.cpp.
◆ appendColumn() [3/3]
| bool OrderByColumnList::appendColumn | ( | QuerySchema & | querySchema, |
| bool | ascending = true, | ||
| int | pos = -1 ) |
Appends a column that is at position pos (counted from 0).
- Returns
- true on successful adding and false if there is no such position pos.
Definition at line 491 of file queryschema.cpp.
◆ appendField() [1/2]
| void OrderByColumnList::appendField | ( | Field & | field, |
| bool | ascending = true ) |
Appends a field field. Ascending sorting is set is ascending is true. Read documentation of OrderByColumn(const Field& field, bool ascending = true) for more info.
Definition at line 501 of file queryschema.cpp.
◆ appendField() [2/2]
| bool OrderByColumnList::appendField | ( | QuerySchema & | querySchema, |
| const TQString & | fieldName, | ||
| bool | ascending = true ) |
Appends field with a name field. Ascending sorting is set is ascending is true.
- Returns
- true on successful appending, and false if there is no such field or alias name in the querySchema.
Definition at line 506 of file queryschema.cpp.
◆ appendFields()
| bool OrderByColumnList::appendFields | ( | QuerySchema & | querySchema, |
| const TQString & | field1, | ||
| bool | ascending1 = true, | ||
| const TQString & | field2 = TQString(), | ||
| bool | ascending2 = true, | ||
| const TQString & | field3 = TQString(), | ||
| bool | ascending3 = true, | ||
| const TQString & | field4 = TQString(), | ||
| bool | ascending4 = true, | ||
| const TQString & | field5 = TQString(), | ||
| bool | ascending5 = true ) |
Appends multiple fields for sorting. querySchema is used to find appropriate field or alias name.
- Returns
- false if there is at least one name for which a field or alias name does not exist (all the newly appended fields are removed in this case)
Definition at line 453 of file queryschema.cpp.
◆ clear()
|
inline |
Removes all elements from the list.
Definition at line 205 of file queryschema.h.
◆ constBegin()
|
inline |
Definition at line 207 of file queryschema.h.
◆ constEnd()
|
inline |
Definition at line 208 of file queryschema.h.
◆ count()
|
inline |
- Returns
- number of elements of the list.
Definition at line 202 of file queryschema.h.
◆ debugString()
| TQString OrderByColumnList::debugString | ( | ) | const |
- Returns
- string for debugging purposes.
Definition at line 529 of file queryschema.cpp.
◆ isEmpty()
|
inline |
- Returns
- true if the list is empty.
Definition at line 199 of file queryschema.h.
◆ toSQLString()
| TQString OrderByColumnList::toSQLString | ( | bool | includeTableNames = true, |
| Driver * | drv = 0, | ||
| int | identifierEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary ) const |
- Returns
- a string like "name ASC, 2 DESC" usable for building a SQL statement. If includeTableNames is true (the default) fields are output in a form of "tablename.fieldname". drv and identifierEscaping are used for escaping the table and field identifiers.
Definition at line 542 of file queryschema.cpp.
The documentation for this class was generated from the following files:
