|
QDjango
|
The QDjangoWhere class expresses an SQL constraint. More...
#include <QDjangoWhere.h>
Public Types | |
| enum | Operation { None, Equals, NotEquals, GreaterThan, LessThan, GreaterOrEquals, LessOrEquals, StartsWith, EndsWith, Contains, IsIn, IsNull, IEquals, INotEquals, IStartsWith, IEndsWith, IContains } |
| enum | AggregateType { AVG, COUNT, SUM, MIN, MAX } |
Public Member Functions | |
| QDjangoWhere () | |
| QDjangoWhere (const QDjangoWhere &other) | |
| QDjangoWhere (const QString &key, QDjangoWhere::Operation operation, QVariant value) | |
| ~QDjangoWhere () | |
| QDjangoWhere & | operator= (const QDjangoWhere &other) |
| QDjangoWhere | operator! () const |
| QDjangoWhere | operator&& (const QDjangoWhere &other) const |
| QDjangoWhere | operator|| (const QDjangoWhere &other) const |
| void | bindValues (QDjangoQuery &query) const |
| bool | isAll () const |
| bool | isNone () const |
| QString | sql (const QSqlDatabase &db) const |
| QString | toString () const |
Friends | |
| class | QDjangoCompiler |
The QDjangoWhere class expresses an SQL constraint.
The QDjangoWhere class is used to build SQL WHERE statements. In its simplest form a QDjangoWhere expresses a constraint on a column value.
QDjangoWhere instances can be negated using the "!" unary operator or combined using the "&&" and "||" boolean operators.
A comparison operation on a database column value.
| QDjangoWhere::QDjangoWhere | ( | ) |
Constructs an empty QDjangoWhere, which expresses no constraint.
| QDjangoWhere::QDjangoWhere | ( | const QDjangoWhere & | other | ) |
Constructs a copy of other.
| QDjangoWhere::QDjangoWhere | ( | const QString & | key, |
| QDjangoWhere::Operation | operation, | ||
| QVariant | value | ||
| ) |
Constructs a QDjangoWhere expressing a constraint on a database column.
| key | |
| operation | |
| value |
| QDjangoWhere::~QDjangoWhere | ( | ) |
Destroys a QDjangoWhere.
| void QDjangoWhere::bindValues | ( | QDjangoQuery & | query | ) | const |
Bind the values associated with this QDjangoWhere to the given query.
| query |
| bool QDjangoWhere::isAll | ( | ) | const |
Returns true if the current QDjangoWhere does not express any constraint.
| bool QDjangoWhere::isNone | ( | ) | const |
Returns true if the current QDjangoWhere expressed an impossible constraint.
| QDjangoWhere QDjangoWhere::operator! | ( | ) | const |
Negates the current QDjangoWhere.
| QDjangoWhere QDjangoWhere::operator&& | ( | const QDjangoWhere & | other | ) | const |
Combines the current QDjangoWhere with the other QDjangoWhere using a logical AND.
| other |
| QDjangoWhere & QDjangoWhere::operator= | ( | const QDjangoWhere & | other | ) |
Assigns other to this QDjangoWhere.
| QDjangoWhere QDjangoWhere::operator|| | ( | const QDjangoWhere & | other | ) | const |
Combines the current QDjangoWhere with the other QDjangoWhere using a logical OR.
| other |
| QString QDjangoWhere::sql | ( | const QSqlDatabase & | db | ) | const |
Returns the SQL code corresponding for the current QDjangoWhere.
1.8.18