Class Where

Summary

Fully Qualified Name: Zend\Db\Sql\Where
Extends: Predicate

Description

Methods

Name Description Defined By
__construct() Constructor PredicateSet
__get() Overloading Predicate
addPredicate() Add predicate to set PredicateSet
addPredicates() Add predicates to set PredicateSet
andPredicate() Add predicate using AND operator PredicateSet
between() Create "between" predicate Predicate
count() Get count of attached predicates PredicateSet
equalTo() Create "Equal To" predicate Predicate
expression() Create an expression, with parameter placeholders Predicate
getExpressionData() Get predicate parts for where statement PredicateSet
getPredicates() Return the predicates PredicateSet
greaterThan() Create "Greater Than" predicate Predicate
greaterThanOrEqualTo() Create "Greater Than Or Equal To" predicate Predicate
in() Create "IN" predicate Predicate
isNotNull() Create "IS NOT NULL" predicate Predicate
isNull() Create "IS NULL" predicate Predicate
lessThan() Create "Less Than" predicate Predicate
lessThanOrEqualTo() Create "Less Than Or Equal To" predicate Predicate
like() Create "Like" predicate Predicate
literal() Create "Literal" predicate Predicate
nest() Begin nesting predicates Predicate
notBetween() Create "NOT BETWEEN" predicate Predicate
notEqualTo() Create "Not Equal To" predicate Predicate
notIn() Create "NOT IN" predicate Predicate
notLike() Create "notLike" predicate Predicate
orPredicate() Add predicate using OR operator PredicateSet
predicate() Use given predicate directly Predicate
setUnnest() Indicate what predicate will be unnested Predicate
unnest() Indicate end of nested predicate Predicate

Method Details

__construct()

Constructor

Parameter Name Type Description
$predicates null|array
$defaultCombination string

Returns:

__get()

Overloading

Overloads "or", "and", "nest", and "unnest"

Parameter Name Type Description
$name string

Returns: self Provides a fluent interface

addPredicate()

Add predicate to set

Parameter Name Type Description
$predicate \PredicateInterface
$combination string

Returns: self Provides a fluent interface

addPredicates()

Add predicates to set

Parameter Name Type Description
$predicates \PredicateInterface|\Closure|string|array
$combination string

Returns: self Provides a fluent interface

andPredicate()

Add predicate using AND operator

Parameter Name Type Description
$predicate \PredicateInterface

Returns: self Provides a fluent interface

between()

Create "between" predicate

Utilizes Between predicate

Parameter Name Type Description
$identifier string|\Expression
$minValue int|float|string
$maxValue int|float|string

Returns: self Provides a fluent interface

count()

Get count of attached predicates

Returns: int

equalTo()

Create "Equal To" predicate

Utilizes Operator predicate

Parameter Name Type Description
$left int|float|bool|string
$right int|float|bool|string
$leftType string TYPE_IDENTIFIER
$rightType string TYPE_IDENTIFIER

Returns: self Provides a fluent interface

expression()

Create an expression, with parameter placeholders

Parameter Name Type Description
$parameters
$expression
$parameters

Returns: self Provides a fluent interface

getExpressionData()

Get predicate parts for where statement

Returns: array

getPredicates()

Return the predicates

Returns: \PredicateInterface[]

greaterThan()

Create "Greater Than" predicate

Utilizes Operator predicate

Parameter Name Type Description
$left int|float|bool|string
$right int|float|bool|string
$leftType string TYPE_IDENTIFIER
$rightType string TYPE_IDENTIFIER

Returns: self Provides a fluent interface

greaterThanOrEqualTo()

Create "Greater Than Or Equal To" predicate

Utilizes Operator predicate

Parameter Name Type Description
$left int|float|bool|string
$right int|float|bool|string
$leftType string TYPE_IDENTIFIER
$rightType string TYPE_IDENTIFIER

Returns: self Provides a fluent interface

in()

Create "IN" predicate

Utilizes In predicate

Parameter Name Type Description
$identifier string|\Expression
$valueSet array|\Zend\Db\Sql\Select

Returns: self Provides a fluent interface

isNotNull()

Create "IS NOT NULL" predicate

Utilizes IsNotNull predicate

Parameter Name Type Description
$identifier string|\Expression

Returns: self Provides a fluent interface

isNull()

Create "IS NULL" predicate

Utilizes IsNull predicate

Parameter Name Type Description
$identifier string|\Expression

Returns: self Provides a fluent interface

lessThan()

Create "Less Than" predicate

Utilizes Operator predicate

Parameter Name Type Description
$left int|float|bool|string
$right int|float|bool|string
$leftType string TYPE_IDENTIFIER
$rightType string TYPE_IDENTIFIER

Returns: self Provides a fluent interface

lessThanOrEqualTo()

Create "Less Than Or Equal To" predicate

Utilizes Operator predicate

Parameter Name Type Description
$left int|float|bool|string
$right int|float|bool|string
$leftType string TYPE_IDENTIFIER
$rightType string TYPE_IDENTIFIER

Returns: self Provides a fluent interface

like()

Create "Like" predicate

Utilizes Like predicate

Parameter Name Type Description
$identifier string|\Expression
$like string

Returns: self Provides a fluent interface

literal()

Create "Literal" predicate

Literal predicate, for parameters, use expression()

Parameter Name Type Description
$literal string

Returns: self Provides a fluent interface

nest()

Begin nesting predicates

Returns: \Predicate

notBetween()

Create "NOT BETWEEN" predicate

Utilizes NotBetween predicate

Parameter Name Type Description
$identifier string|\Expression
$minValue int|float|string
$maxValue int|float|string

Returns: self Provides a fluent interface

notEqualTo()

Create "Not Equal To" predicate

Utilizes Operator predicate

Parameter Name Type Description
$left int|float|bool|string
$right int|float|bool|string
$leftType string TYPE_IDENTIFIER
$rightType string TYPE_IDENTIFIER

Returns: self Provides a fluent interface

notIn()

Create "NOT IN" predicate

Utilizes NotIn predicate

Parameter Name Type Description
$identifier string|\Expression
$valueSet array|\Zend\Db\Sql\Select

Returns: self Provides a fluent interface

notLike()

Create "notLike" predicate

Utilizes In predicate

Parameter Name Type Description
$identifier string|\Expression
$notLike string

Returns: self Provides a fluent interface

orPredicate()

Add predicate using OR operator

Parameter Name Type Description
$predicate \PredicateInterface

Returns: self Provides a fluent interface

predicate()

Use given predicate directly

Contrary to {@link addPredicate()} this method respects formerly set AND / OR combination operator, thus allowing generic predicates to be used fluently within where chains as any other concrete predicate.

Parameter Name Type Description
$predicate \PredicateInterface

Returns: self Provides a fluent interface

setUnnest()

Indicate what predicate will be unnested

Parameter Name Type Description
$predicate \Predicate

Returns: void

unnest()

Indicate end of nested predicate

Returns: \Predicate

Top