Akonadi::Server::CountQueryBuilder
#include <countquerybuilder.h>
Public Types | |
enum | CountMode { All , Distinct } |
Public Types inherited from Akonadi::Server::QueryBuilder | |
enum | ConditionType { WhereCondition , HavingCondition , NUM_CONDITIONS } |
enum | JoinType { InnerJoin , LeftJoin , LeftOuterJoin } |
enum | QueryType { Select , Insert , Update , Delete } |
Public Member Functions | |
CountQueryBuilder (const QString &table) | |
CountQueryBuilder (const QString &table, const QString &column, CountMode mode) | |
CountQueryBuilder (DataStore *store, const QString &table) | |
CountQueryBuilder (DataStore *store, const QString &table, const QString &column, CountMode mode) | |
int | result () |
Public Member Functions inherited from Akonadi::Server::QueryBuilder | |
QueryBuilder (const QSqlQuery &tableQuery, const QString &tableQueryAlias) | |
QueryBuilder (const QString &table, QueryType type=Select) | |
QueryBuilder (DataStore *store, const QSqlQuery &tableQuery, const QString &tableQueryAlias) | |
QueryBuilder (DataStore *store, const QString &table, QueryType type=Select) | |
QueryBuilder (QueryBuilder &&) noexcept | |
void | addAggregation (const QString &col, const QString &aggregate) |
void | addAggregation (const Query::Case &caseStmt, const QString &aggregate) |
void | addColumn (const QString &col) |
void | addColumn (const Query::Case &caseStmt) |
void | addColumnCondition (const QString &column, Query::CompareOperator op, const QString &column2, ConditionType type=WhereCondition) |
void | addColumns (const QStringList &cols) |
void | addCondition (const Query::Condition &condition, ConditionType type=WhereCondition) |
void | addGroupColumn (const QString &column) |
void | addGroupColumns (const QStringList &columns) |
void | addJoin (JoinType joinType, const QString &table, const QString &col1, const QString &col2) |
void | addJoin (JoinType joinType, const QString &table, const Query::Condition &condition) |
void | addSortColumn (const QString &column, Query::SortOrder order=Query::Ascending) |
void | addValueCondition (const QString &column, Query::CompareOperator op, const QList< qint64 > &value, ConditionType type=WhereCondition) |
void | addValueCondition (const QString &column, Query::CompareOperator op, const QSet< qint64 > &value, ConditionType type=WhereCondition) |
void | addValueCondition (const QString &column, Query::CompareOperator op, const QVariant &value, ConditionType type=WhereCondition) |
bool | exec () |
QString | getTable () const |
QString | getTableWithColumn (const QString &column) const |
qint64 | insertId () |
QueryBuilder & | operator= (QueryBuilder &&) noexcept |
QSqlQuery & | query () |
void | setColumnValue (const QString &column, const QVariant &value) |
template<typename T > | |
void | setColumnValues (const QString &column, const QList< T > &values) |
void | setDatabaseType (DbType::Type type) |
void | setDistinct (bool distinct) |
void | setForUpdate (bool forUpdate=true) |
void | setIdentificationColumn (const QString &column) |
void | setLimit (int limit, int offset=-1) |
void | setSubQueryMode (Query::LogicOperator op, ConditionType type=WhereCondition) |
Additional Inherited Members | |
Protected Member Functions inherited from Akonadi::Server::QueryBuilder | |
DataStore * | dataStore () const |
Detailed Description
Helper class for creating queries to count elements in a database.
Definition at line 22 of file countquerybuilder.h.
Member Enumeration Documentation
◆ CountMode
enum Akonadi::Server::CountQueryBuilder::CountMode |
Definition at line 25 of file countquerybuilder.h.
Constructor & Destructor Documentation
◆ CountQueryBuilder() [1/4]
|
inlineexplicit |
Creates a new query builder that counts all entries in table
.
Definition at line 33 of file countquerybuilder.h.
◆ CountQueryBuilder() [2/4]
|
inline |
Definition at line 38 of file countquerybuilder.h.
◆ CountQueryBuilder() [3/4]
|
inline |
Creates a new query builder that counts entries in column
of table
.
If mode
is set to Distinct
, duplicate entries in that column are ignored.
Definition at line 48 of file countquerybuilder.h.
◆ CountQueryBuilder() [4/4]
|
inline |
Definition at line 53 of file countquerybuilder.h.
Member Function Documentation
◆ result()
|
inline |
Returns the result of this query.
- Returns
- -1 on error.
Definition at line 71 of file countquerybuilder.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:57:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.