container for all criteria of a query
| package |
jelix |
|---|---|
| subpackage |
dao |
__construct(string $glueOp = 'AND')
stringthe logical operator which links each conditions : AND or OR
addCondition(string $field_id, string $operator, string $value, string $field_pattern = '%s', boolean $foo = false)
| Throws |
|
|---|
stringthe property name on which the condition applies
stringthe sql operator
stringthe value which is compared to the property
stringthe pattern to use on the property (WHERE clause)
booleanparameter for internal use : don't use it or set to false
addItemGroup(string $field_id)
| deprecated |
Avoid to use it, don't work on recent Mysql and any other database, and unexpected behavior on old Mysql. |
|---|---|
stringthe property name used to group results
addItemOrder(string $field_id, string $way = 'ASC', boolean $allowAnyWay = false)
| Throws |
|
|---|
stringthe property name used to order results
stringthe order type : asc or desc
booleantrue if the value of $way should be checked. Internal use. Not recommended because it may cause security issues
endGroup()
hasConditions() : boolean
| since | 1.0 |
|---|---|
booleanfalse if there isn't condition
isEmpty() : boolean
booleanfalse if there isn't condition
startGroup(string $glueOp = 'AND')
| Throws |
|
|---|
stringthe logical operator which links each conditions in the group : AND or OR
order :
group :
| deprecated | |
|---|---|
_currentCondition :