Having
extends PredicateSet
in package
Where predicate class
Tags
Table of Contents
Properties
- $conjunction : string|null
- Conjunction
- $nextConjunction : string
- Next conjunction
- $predicates : array<string|int, mixed>
- Predicates
- $predicateSets : array<string|int, mixed>
- Nested predicate sets
- $sql : AbstractSql|null
- SQL object
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Return predicate set string
- add() : PredicateSet
- Add a predicate from a string expression
- addExpressions() : PredicateSet
- Add a predicates from string expressions
- addPredicate() : PredicateSet
- Add predicate
- addPredicates() : PredicateSet
- Add predicates
- addPredicateSet() : PredicateSet
- Add predicate set
- addPredicateSets() : PredicateSet
- Add predicate sets
- and() : PredicateSet
- Add an AND predicate from a string expression
- andNest() : PredicateSet
- Add a nested predicate set with the AND conjunction
- andPredicate() : PredicateSet
- Add AND predicate
- between() : PredicateSet
- Predicate for BETWEEN
- equalTo() : PredicateSet
- Predicate for =
- getConjunction() : string|null
- Get the conjunction
- getNextConjunction() : string
- Get the next conjunction
- getPredicates() : array<string|int, mixed>
- Get predicates
- getPredicateSets() : array<string|int, mixed>
- Get predicates
- greaterThan() : PredicateSet
- Predicate for >
- greaterThanOrEqualTo() : PredicateSet
- Predicate for >=
- hasPredicates() : bool
- Has predicates
- hasPredicateSets() : bool
- Has predicates
- in() : PredicateSet
- Predicate for IN
- isNotNull() : PredicateSet
- Predicate for IS NOT NULL
- isNull() : PredicateSet
- Predicate for IS NULL
- lessThan() : PredicateSet
- Predicate for <
- lessThanOrEqualTo() : PredicateSet
- Predicate for <=
- like() : PredicateSet
- Predicate for LIKE
- nest() : PredicateSet
- Add a nested predicate set
- notBetween() : PredicateSet
- Predicate for NOT BETWEEN
- notEqualTo() : PredicateSet
- Predicate for !=
- notIn() : PredicateSet
- Predicate for NOT IN
- notLike() : PredicateSet
- Predicate for NOT LIKE
- or() : PredicateSet
- Add an OR predicate from a string expression
- orNest() : PredicateSet
- Add a nested predicate set with the OR conjunction
- orPredicate() : PredicateSet
- Add OR predicate
- render() : string
- Predicate set render method
- setConjunction() : PredicateSet
- Get the conjunction
- setNextConjunction() : PredicateSet
- Get the next conjunction
Properties
$conjunction
Conjunction
protected
string|null
$conjunction
= null
$nextConjunction
Next conjunction
protected
string
$nextConjunction
= 'AND'
$predicates
Predicates
protected
array<string|int, mixed>
$predicates
= []
$predicateSets
Nested predicate sets
protected
array<string|int, mixed>
$predicateSets
= []
$sql
SQL object
protected
AbstractSql|null
$sql
= null
Methods
__construct()
Constructor
public
__construct(AbstractSql $sql[, mixed $predicates = null ][, string|null $conjunction = null ]) : mixed
Instantiate the predicate set object
Parameters
- $sql : AbstractSql
- $predicates : mixed = null
- $conjunction : string|null = null
Tags
__toString()
Return predicate set string
public
__toString() : string
Return values
stringadd()
Add a predicate from a string expression
public
add(string $expression) : PredicateSet
Parameters
- $expression : string
Return values
PredicateSetaddExpressions()
Add a predicates from string expressions
public
addExpressions(array<string|int, mixed> $expressions) : PredicateSet
Parameters
- $expressions : array<string|int, mixed>
Return values
PredicateSetaddPredicate()
Add predicate
public
addPredicate(AbstractPredicate $predicate) : PredicateSet
Parameters
- $predicate : AbstractPredicate
Return values
PredicateSetaddPredicates()
Add predicates
public
addPredicates(array<string|int, mixed> $predicates) : PredicateSet
Parameters
- $predicates : array<string|int, mixed>
Return values
PredicateSetaddPredicateSet()
Add predicate set
public
addPredicateSet(PredicateSet $predicateSet) : PredicateSet
Parameters
- $predicateSet : PredicateSet
Return values
PredicateSetaddPredicateSets()
Add predicate sets
public
addPredicateSets(array<string|int, mixed> $predicateSets) : PredicateSet
Parameters
- $predicateSets : array<string|int, mixed>
Return values
PredicateSetand()
Add an AND predicate from a string expression
public
and([string|null $expression = null ]) : PredicateSet
Parameters
- $expression : string|null = null
Tags
Return values
PredicateSetandNest()
Add a nested predicate set with the AND conjunction
public
andNest() : PredicateSet
Return values
PredicateSetandPredicate()
Add AND predicate
public
andPredicate(AbstractPredicate $predicate) : PredicateSet
Parameters
- $predicate : AbstractPredicate
Tags
Return values
PredicateSetbetween()
Predicate for BETWEEN
public
between(string $column, string $value1, string $value2) : PredicateSet
Parameters
- $column : string
- $value1 : string
- $value2 : string
Return values
PredicateSetequalTo()
Predicate for =
public
equalTo(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSetgetConjunction()
Get the conjunction
public
getConjunction() : string|null
Return values
string|nullgetNextConjunction()
Get the next conjunction
public
getNextConjunction() : string
Return values
stringgetPredicates()
Get predicates
public
getPredicates() : array<string|int, mixed>
Return values
array<string|int, mixed>getPredicateSets()
Get predicates
public
getPredicateSets() : array<string|int, mixed>
Return values
array<string|int, mixed>greaterThan()
Predicate for >
public
greaterThan(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSetgreaterThanOrEqualTo()
Predicate for >=
public
greaterThanOrEqualTo(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSethasPredicates()
Has predicates
public
hasPredicates() : bool
Return values
boolhasPredicateSets()
Has predicates
public
hasPredicateSets() : bool
Return values
boolin()
Predicate for IN
public
in(string $column, mixed $values) : PredicateSet
Parameters
- $column : string
- $values : mixed
Return values
PredicateSetisNotNull()
Predicate for IS NOT NULL
public
isNotNull(string $column) : PredicateSet
Parameters
- $column : string
Return values
PredicateSetisNull()
Predicate for IS NULL
public
isNull(string $column) : PredicateSet
Parameters
- $column : string
Return values
PredicateSetlessThan()
Predicate for <
public
lessThan(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSetlessThanOrEqualTo()
Predicate for <=
public
lessThanOrEqualTo(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSetlike()
Predicate for LIKE
public
like(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSetnest()
Add a nested predicate set
public
nest([string $conjunction = 'AND' ]) : PredicateSet
Parameters
- $conjunction : string = 'AND'
Return values
PredicateSetnotBetween()
Predicate for NOT BETWEEN
public
notBetween(string $column, string $value1, string $value2) : PredicateSet
Parameters
- $column : string
- $value1 : string
- $value2 : string
Return values
PredicateSetnotEqualTo()
Predicate for !=
public
notEqualTo(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSetnotIn()
Predicate for NOT IN
public
notIn(string $column, mixed $values) : PredicateSet
Parameters
- $column : string
- $values : mixed
Return values
PredicateSetnotLike()
Predicate for NOT LIKE
public
notLike(string $column, string $value) : PredicateSet
Parameters
- $column : string
- $value : string
Return values
PredicateSetor()
Add an OR predicate from a string expression
public
or([string|null $expression = null ]) : PredicateSet
Parameters
- $expression : string|null = null
Tags
Return values
PredicateSetorNest()
Add a nested predicate set with the OR conjunction
public
orNest() : PredicateSet
Return values
PredicateSetorPredicate()
Add OR predicate
public
orPredicate(AbstractPredicate $predicate) : PredicateSet
Parameters
- $predicate : AbstractPredicate
Tags
Return values
PredicateSetrender()
Predicate set render method
public
render() : string
Tags
Return values
stringsetConjunction()
Get the conjunction
public
setConjunction(string $conjunction) : PredicateSet
Parameters
- $conjunction : string
Tags
Return values
PredicateSetsetNextConjunction()
Get the next conjunction
public
setNextConjunction(string $conjunction) : PredicateSet
Parameters
- $conjunction : string