Properties

$predicates

$predicates : array

Predicates array

Type

array

$nested

$nested : array

Nested predicates

Type

array

$nestedCombine

$nestedCombine : string

Nested group combine

Type

string

$isNested

$isNested : boolean

Flag to determine if the predicate is nested

Type

boolean

Methods

__construct()

__construct(\Pop\Db\Sql\AbstractSql  $sql, boolean  $nested = false) 

Constructor

Instantiate the predicate collection object.

Parameters

\Pop\Db\Sql\AbstractSql $sql
boolean $nested

andNest()

andNest() : \Pop\Db\Sql\Predicate

Add a nested predicate with AND

Returns

\Pop\Db\Sql\Predicate

hasNest()

hasNest(integer  $i = null) : boolean

Determine if it has a nested predicate branch

Parameters

integer $i

Returns

boolean

getNest()

getNest(integer  $i) : mixed

Get a nested predicate

Parameters

integer $i

Returns

mixed

isNested()

isNested() : boolean

Determine if predicate is nested

Returns

boolean

setNestedCombine()

setNestedCombine(string  $combine) : \Pop\Db\Sql\Predicate

Get nested combine

Parameters

string $combine

Returns

\Pop\Db\Sql\Predicate

getNestedCombine()

getNestedCombine() : string

Get nested combine

Returns

string

add()

add(mixed  $predicate) : \Pop\Db\Sql\Predicate

Add a predicate from a string

Parameters

mixed $predicate

Returns

\Pop\Db\Sql\Predicate

hasPredicates()

hasPredicates() : boolean

Determine if there are predicates

Returns

boolean

equalTo()

equalTo(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for =

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

notEqualTo()

notEqualTo(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for !=

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

greaterThan()

greaterThan(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for >

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

greaterThanOrEqualTo()

greaterThanOrEqualTo(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for >=

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

lessThan()

lessThan(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for <

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

lessThanOrEqualTo()

lessThanOrEqualTo(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for <=

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

like()

like(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for LIKE

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

notLike()

notLike(string  $column, string  $value) : \Pop\Db\Sql\Predicate

Predicate for NOT LIKE

Parameters

string $column
string $value

Returns

\Pop\Db\Sql\Predicate

between()

between(string  $column, string  $value1, string  $value2) : \Pop\Db\Sql\Predicate

Predicate for BETWEEN

Parameters

string $column
string $value1
string $value2

Returns

\Pop\Db\Sql\Predicate

notBetween()

notBetween(string  $column, string  $value1, string  $value2) : \Pop\Db\Sql\Predicate

Predicate for NOT BETWEEN

Parameters

string $column
string $value1
string $value2

Returns

\Pop\Db\Sql\Predicate

in()

in(string  $column, mixed  $values) : \Pop\Db\Sql\Predicate

Predicate for IN

Parameters

string $column
mixed $values

Returns

\Pop\Db\Sql\Predicate

notIn()

notIn(string  $column, mixed  $values) : \Pop\Db\Sql\Predicate

Predicate for NOT IN

Parameters

string $column
mixed $values

Returns

\Pop\Db\Sql\Predicate

isNull()

isNull(string  $column) : \Pop\Db\Sql\Predicate

Predicate for IS NULL

Parameters

string $column

Returns

\Pop\Db\Sql\Predicate

isNotNull()

isNotNull(string  $column) : \Pop\Db\Sql\Predicate

Predicate for IS NOT NULL

Parameters

string $column

Returns

\Pop\Db\Sql\Predicate

render()

render(integer  $count = 1) : string

Predicate render method

Parameters

integer $count

Returns

string

__toString()

__toString() : string

Return predicate string

Returns

string