jDaoConditions

container for all criteria of a query

package

jelix

subpackage

dao

Methods

__construct

__construct(string $glueOp = 'AND') 

Arguments

$glueOp

string

the logical operator which links each conditions : AND or OR

adds a condition

addCondition(string $field_id, string $operator, string $value, string $field_pattern = '%s', boolean $foo = false) 
Throws
\jException

Arguments

$field_id

string

the property name on which the condition applies

$operator

string

the sql operator

$value

string

the value which is compared to the property

$field_pattern

string

the pattern to use on the property (WHERE clause)

$foo

boolean

parameter for internal use : don't use it or set to false

add a group clause

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.

Arguments

$field_id

string

the property name used to group results

add an order clause

addItemOrder(string $field_id, string $way = 'ASC', boolean $allowAnyWay = false) 
Throws
\jException

Arguments

$field_id

string

the property name used to order results

$way

string

the order type : asc or desc

$allowAnyWay

boolean

true if the value of $way should be checked. Internal use. Not recommended because it may cause security issues

ends a condition group

endGroup() 

says if there are no conditions

hasConditions() : boolean
since 1.0

Response

boolean

false if there isn't condition

says if there are no conditions nor order

isEmpty() : boolean

Response

boolean

false if there isn't condition

starts a new condition group

startGroup(string $glueOp = 'AND') 
Throws
\jException

Arguments

$glueOp

string

the logical operator which links each conditions in the group : AND or OR

Properties

condition

condition : \jDaoCondition
var

Type(s)

\jDaoCondition

the orders we wants the list to be

order : 

Type(s)

the groups we wants the list to be

group : 
deprecated

Type(s)

the condition we actually are browsing

_currentCondition : 

Type(s)