TreeFrogFramework: TCriteria Class Reference
#include <tcriteria.h>
Public Member Functions | |
| TCriteria () | |
| TCriteria (const TCriteria &other) | |
| TCriteria (int property, const QVariant &val) | |
| TCriteria (int property, TSql::ComparisonOperator op) | |
| TCriteria (int property, TSql::ComparisonOperator op, const QVariant &val) | |
| TCriteria (int property, TSql::ComparisonOperator op, const QVariant &val1, const QVariant &val2) | |
| TCriteria (int property, TSql::ComparisonOperator op1, TSql::ComparisonOperator op2, const QVariant &val) | |
| TCriteria (int property, TMongo::ComparisonOperator op) | |
| TCriteria (int property, TMongo::ComparisonOperator op, const QVariant &val) | |
| ~TCriteria () | |
| TCriteria & | add (int property, const QVariant &val) |
| TCriteria & | add (int property, TSql::ComparisonOperator op) |
| TCriteria & | add (int property, TSql::ComparisonOperator op, const QVariant &val) |
| TCriteria & | add (int property, TSql::ComparisonOperator op, const QVariant &val1, const QVariant &val2) |
| TCriteria & | add (int property, TSql::ComparisonOperator op1, TSql::ComparisonOperator op2, const QVariant &val) |
| TCriteria & | add (const TCriteria &criteria) |
| TCriteria & | addOr (int property, const QVariant &val) |
| TCriteria & | addOr (int property, TSql::ComparisonOperator op) |
| TCriteria & | addOr (int property, TSql::ComparisonOperator op, const QVariant &val) |
| TCriteria & | addOr (int property, TSql::ComparisonOperator op, const QVariant &val1, const QVariant &val2) |
| TCriteria & | addOr (int property, TSql::ComparisonOperator op1, TSql::ComparisonOperator op2, const QVariant &val) |
| TCriteria & | addOr (const TCriteria &criteria) |
| TCriteria & | add (int property, TMongo::ComparisonOperator op) |
| TCriteria & | add (int property, TMongo::ComparisonOperator op, const QVariant &val) |
| TCriteria & | addOr (int property, TMongo::ComparisonOperator op) |
| TCriteria & | addOr (int property, TMongo::ComparisonOperator op, const QVariant &val) |
| bool | isEmpty () const |
| void | clear () |
| const TCriteria | operator&& (const TCriteria &criteria) const |
| const TCriteria | operator|| (const TCriteria &criteria) const |
| const TCriteria | operator! () const |
| TCriteria & | operator= (const TCriteria &other) |
Protected Member Functions | |
| const QVariant & | first () const |
| const QVariant & | second () const |
| LogicalOperator | logicalOperator () const |
| TCriteria & | add (LogicalOperator op, const TCriteria &criteria) |
Friends | |
| template<class T > | |
| class | TCriteriaConverter |
| template<class T > | |
| class | TCriteriaMongoConverter |
The TCriteria class represents a WHERE clause without SQL for the sake of database abstraction.
- See also
- TSqlObject
◆ LogicalOperator
◆ TCriteria() [2/9]
| TCriteria::TCriteria | ( | const TCriteria & | other | ) |
Copy constructor.
◆ TCriteria() [3/9]
| TCriteria::TCriteria | ( | int | property, |
| const QVariant & | val | ||
| ) |
◆ TCriteria() [4/9]
◆ TCriteria() [5/9]
◆ TCriteria() [6/9]
◆ TCriteria() [7/9]
◆ TCriteria() [8/9]
◆ TCriteria() [9/9]
◆ ~TCriteria()
|
inline |
◆ add() [1/9]
Adds a WHERE clause of the criteria parameter with the AND operator.
◆ add() [2/9]
| TCriteria & TCriteria::add | ( | int | property, |
| const QVariant & | val | ||
| ) |
Adds a WHERE clause to which a property of ORM object with the index property equals the value val.
◆ add() [3/9]
◆ add() [4/9]
◆ add() [5/9]
Adds a WHERE clause to which a property of ORM object with the index property is NULL value or NOT NULL value.
The op parameter must be TSql::IsNull or TSql::IsNotNull.
◆ add() [6/9]
◆ add() [7/9]
◆ add() [8/9]
Adds a WHERE clause to which a property of ORM object with the index property is compared with the val value by a means of the op1 and op2 parameter.
This function is used with TSql::Any or TSql::All constant as the op2 parameter to generate a WHERE clause such as "column >= any (10, 20, 50)".
◆ add() [9/9]
Adds a WHERE clause of the criteria parameter with the op operator.
◆ addOr() [1/8]
Adds a WHERE clause of the criteria parameter with the OR operator.
◆ addOr() [2/8]
| TCriteria & TCriteria::addOr | ( | int | property, |
| const QVariant & | val | ||
| ) |
Adds a WHERE clause with OR operator to which a property of ORM object with the index property equals the value val.
◆ addOr() [3/8]
◆ addOr() [4/8]
◆ addOr() [5/8]
Adds a WHERE clause with OR operator to which a property of ORM object with the index property is NULL value or NOT NULL value.
The op parameter must be TSql::IsNull or TSql::IsNotNull.
◆ addOr() [6/8]
Adds a WHERE clause with OR operator to which a property of ORM object with the index property is compared with the val value by a means of the op parameter.
◆ addOr() [7/8]
◆ addOr() [8/8]
Adds a WHERE clause with OR operator to which a property of ORM object with the index property is compared with the val value by a means of the op1 and op2 parameter.
This function is used with TSql::Any or TSql::All constant as the op2 parameter to generate a WHERE clause such as "column >= any (10, 20, 50)".
◆ clear()
| void TCriteria::clear | ( | ) |
Clears the criteria and makes it empty.
◆ first()
|
inlineprotected |
This function is for internal use only.
◆ isEmpty()
| bool TCriteria::isEmpty | ( | ) | const |
Returns true if the criteria has no data; otherwise returns false.
◆ logicalOperator()
This function is for internal use only.
◆ operator!()
| const TCriteria TCriteria::operator! | ( | ) | const |
Returns a WHERE clause that negated this criteria.
◆ operator&&()
◆ operator=()
◆ operator||()
◆ second()
|
inlineprotected |
This function is for internal use only.
◆ TCriteriaConverter
template<class T >
|
friend class TCriteriaConverter |
friend |
◆ TCriteriaMongoConverter
template<class T >
|
friend class TCriteriaMongoConverter |
friend |
The documentation for this class was generated from the following files:
- src/tcriteria.h
- src/tcriteria.cpp