DatabaseQueryWhere
Description
The DatabaseQueryWhere object represents a condition used in DatabaseQueryFilter objects. It allows modelling the SQL statement WHERE in a declarative manner.
- › Inherits:
Overview
Properties
Methods
Signals
Enumerations
Properties
key
This property holds a reference to a DataObject object representing a column in the database. The values of this column are compared with value as specified in the operation property.
- › Type:
- › Signal:
keyChanged()
- › Attributes:
Writable
operation
This property holds the operation which specifies how to compare values in a database column (specified by key) with the value given in the value property.
- › Type:
- › Default:
- › Signal:
operationChanged()
- › Attributes:
Writable
value
This property holds the value to compare with the values in a database column. It should be of the same type as the database column.
- › Type:
Variant
- › Signal:
valueChanged()
- › Attributes:
Writable
Enumerations
Operation
This enumeration describes all supported comparison operations on a database column value.
Name |
Value |
Description |
|---|---|---|
|
|
Matches always. |
|
|
Matches if the column value is equal to the given value. |
|
|
Matches if the column value is not equal to the given value. |
|
|
Matches if the column value is greater than the given value. |
|
|
Matches if the column value is less than the given value. |
|
|
Matches if the column value is greater or equal to the given value. |
|
|
Matches if the column value is less or equal to the given value. |
|
|
Matches if the column value starts with the given value (strings only). |
|
|
Matches if the column value ends with the given value (strings only). |
|
|
Matches if the column value contains the given value (strings only). |
|
|
Matches if the column value is one of the given values. |
|
|
Matches if the column value is null. |
|
|
Matches if the column value is equal to the given value (case-insensitive). |
|
|
Matches if the column value is not equal to the given value (case-insensitive). |
|
|
Matches if the column value starts with the given value (strings only, case-insensitive). |
|
|
Matches if the column value ends with the given value (strings only, case-insensitive). |
|
|
Matches if the column value contains the given value (strings only, case-insensitive). |
Example
See DatabaseQueryFilter example on how to use DatabaseQueryWhere.