Where trait
Framework\Database\Manipulation\Traits\Where
Trait Where.
Defined in libraries/database/src/Manipulation/Traits/Where.php
Methods #
- orWhere()
- Appends a "OR $column $operator ...$values" condition in the WHERE clause.
- orWhereBetween()
- Appends a "OR $column BETWEEN $min AND $max" condition in the WHERE clause.
- orWhereEqual()
- Appends a "OR $column = $value" condition in the WHERE clause.
- orWhereGreaterThan()
- Appends a "OR $column > $value" condition in the WHERE clause.
- orWhereGreaterThanOrEqual()
- Appends a "OR $column >= $value" condition in the WHERE clause.
- orWhereIn()
- Appends a "OR $column IN (...$values)" condition in the WHERE clause.
- orWhereIsNotNull()
- Appends a "OR $column IS NOT NULL" condition in the WHERE clause.
- orWhereIsNull()
- Appends a "OR $column IS NULL" condition in the WHERE clause.
- orWhereLessThan()
- Appends a "OR $column < $value" condition in the WHERE clause.
- orWhereLessThanOrEqual()
- Appends a "OR $column <= $value" condition in the WHERE clause.
- orWhereLike()
- Appends a "OR $column LIKE $value" condition in the WHERE clause.
- orWhereMatch()
- Appends a "OR MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.
- orWhereMatchInBooleanMode()
- Appends a "OR MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.
- orWhereMatchWithQueryExpansion()
- Appends a "OR MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.
- orWhereNotBetween()
- Appends a "OR $column NOT BETWEEN $min AND $max" condition in the WHERE clause.
- orWhereNotEqual()
- Appends a "OR $column != $value" condition in the WHERE clause.
- orWhereNotIn()
- Appends a "OR $column NOT IN (...$values)" condition in the WHERE clause.
- orWhereNotLike()
- Appends a "OR $column NOT LIKE $value" condition in the WHERE clause.
- orWhereNullSafeEqual()
- Appends a "OR $column <=> $value" condition in the WHERE clause.
- where()
- Appends an "AND $column $operator ...$values" condition in the WHERE clause.
- whereBetween()
- Appends an "AND $column BETWEEN $min AND $max" condition in the WHERE clause.
- whereEqual()
- Appends an "AND $column = $value" condition in the WHERE clause.
- whereGreaterThan()
- Appends an "AND $column > $value" condition in the WHERE clause.
- whereGreaterThanOrEqual()
- Appends an "AND $column >= $value" condition in the WHERE clause.
- whereIn()
- Appends an "AND $column IN (...$values)" condition in the WHERE clause.
- whereIsNotNull()
- Appends an "AND $column IS NOT NULL" condition in the WHERE clause.
- whereIsNull()
- Appends an "AND $column IS NULL" condition in the WHERE clause.
- whereLessThan()
- Appends an "AND $column < $value" condition in the WHERE clause.
- whereLessThanOrEqual()
- Appends an "AND $column <= $value" condition in the WHERE clause.
- whereLike()
- Appends an "AND $column LIKE $value" condition in the WHERE clause.
- whereMatch()
- Appends an "AND MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.
- whereMatchInBooleanMode()
- Appends an "AND MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.
- whereMatchWithQueryExpansion()
- Appends an "AND MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.
- whereNotBetween()
- Appends an "AND $column NOT BETWEEN $min AND $max" condition in the WHERE clause.
- whereNotEqual()
- Appends an "AND $column != $value" condition in the WHERE clause.
- whereNotIn()
- Appends an "AND $column NOT IN (...$values)" condition in the WHERE clause.
- whereNotLike()
- Appends an "AND $column NOT LIKE $value" condition.
- whereNullSafeEqual()
- Appends an "AND $column <=> $value" condition in the WHERE clause.
- renderWhere()
- Renders the full WHERE (or HAVING) clause.
- addWhere()
- Adds a WHERE (or HAVING) part.
- prepareWhereValues()
- Quote the input values or transform it in subqueries.
- renderMatch()
- Renders a MATCH AGAINST clause.
- renderMatchColumns()
- -
- renderMatchExpression()
- -
- renderWhereOperator()
- Renders and validates a comparison operator.
- renderWherePart()
- Renders a WHERE part. Like: `AND column IN('value1', 'value2')`.
- renderWhereValues()
- Renders the values used by a comparison operator.
- renderWhereValuesPartBetween()
- Renders values for `BETWEEN` or `NOT BETWEEN`.
- renderWhereValuesPartComparator()
- Renders the values of operators that receive exactly one value.
- renderWhereValuesPartIn()
- Implode values for `IN` or `NOT IN`.
- renderWhereValuesPartIsNull()
- Renders the lonely operators, `IS NULL` or `IS NOT NULL`.
orWhere()
Appends a "OR $column $operator ...$values" condition in the WHERE clause.
- Closure|array|string $column - Closure for a subquery, a string with the column name or an array with column names on WHERE MATCH clause
- string $operator
- Closure|array|string|int|float|null $values
orWhereBetween()
Appends a "OR $column BETWEEN $min AND $max" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $min
- Closure|string|int|float|null $max
orWhereEqual()
Appends a "OR $column = $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereGreaterThan()
Appends a "OR $column > $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereGreaterThanOrEqual()
Appends a "OR $column >= $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereIn()
Appends a "OR $column IN (...$values)" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
- Closure|string|int|float|null $values
orWhereIsNotNull()
Appends a "OR $column IS NOT NULL" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
orWhereIsNull()
Appends a "OR $column IS NULL" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
orWhereLessThan()
Appends a "OR $column < $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereLessThanOrEqual()
Appends a "OR $column <= $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereLike()
Appends a "OR $column LIKE $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereMatch()
Appends a "OR MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.
- Closure|array|string $columns - Columns to MATCH
- Closure|array|string $against - AGAINST expression
orWhereMatchInBooleanMode()
Appends a "OR MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.
- Closure|array|string $columns - Columns to MATCH
- Closure|array|string $against - AGAINST expression
orWhereMatchWithQueryExpansion()
Appends a "OR MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.
- Closure|array|string $columns - Columns to MATCH
- Closure|array|string $against - AGAINST expression
orWhereNotBetween()
Appends a "OR $column NOT BETWEEN $min AND $max" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $min
- Closure|string|int|float|null $max
orWhereNotEqual()
Appends a "OR $column != $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereNotIn()
Appends a "OR $column NOT IN (...$values)" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
- Closure|string|int|float|null $values
orWhereNotLike()
Appends a "OR $column NOT LIKE $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
orWhereNullSafeEqual()
Appends a "OR $column <=> $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
where()
Appends an "AND $column $operator ...$values" condition in the WHERE clause.
- Closure|array|string $column - Closure for a subquery, a string with the column name or an array with column names on WHERE MATCH clause
- string $operator
- Closure|array|string|int|float|null $values
whereBetween()
Appends an "AND $column BETWEEN $min AND $max" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $min
- Closure|string|int|float|null $max
whereEqual()
Appends an "AND $column = $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereGreaterThan()
Appends an "AND $column > $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereGreaterThanOrEqual()
Appends an "AND $column >= $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereIn()
Appends an "AND $column IN (...$values)" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
- Closure|string|int|float|null $values
whereIsNotNull()
Appends an "AND $column IS NOT NULL" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
whereIsNull()
Appends an "AND $column IS NULL" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
whereLessThan()
Appends an "AND $column < $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereLessThanOrEqual()
Appends an "AND $column <= $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereLike()
Appends an "AND $column LIKE $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereMatch()
Appends an "AND MATCH (...$columns) AGAINST ($against IN NATURAL LANGUAGE MODE)" fulltext searching in the WHERE clause.
- Closure|array|string $columns - Columns to MATCH
- Closure|array|string $against - AGAINST expression
whereMatchInBooleanMode()
Appends an "AND MATCH (...$columns) AGAINST ($against IN BOOLEAN MODE)" fulltext searching in the WHERE clause.
- Closure|array|string $columns - Columns to MATCH
- Closure|array|string $against - AGAINST expression
whereMatchWithQueryExpansion()
Appends an "AND MATCH (...$columns) AGAINST ($against WITH QUERY EXPANSION)" fulltext searching in the WHERE clause.
- Closure|array|string $columns - Columns to MATCH
- Closure|array|string $against - AGAINST expression
whereNotBetween()
Appends an "AND $column NOT BETWEEN $min AND $max" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $min
- Closure|string|int|float|null $max
whereNotEqual()
Appends an "AND $column != $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereNotIn()
Appends an "AND $column NOT IN (...$values)" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
- Closure|string|int|float|null $values
whereNotLike()
Appends an "AND $column NOT LIKE $value" condition.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
whereNullSafeEqual()
Appends an "AND $column <=> $value" condition in the WHERE clause.
- Closure|string $column - Closure for a subquery or a string with the column name
- Closure|string|int|float|null $value
renderWhere()
Renders the full WHERE (or HAVING) clause.
- string $clause - `where` or `having`
addWhere()
Adds a WHERE (or HAVING) part.
- string $glue - `AND` or `OR`
- Closure|array|string $column
- string $operator - `=`, `<=>`, `!=`, `<>`, `>`, `>=`, `<`, `<=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `BETWEEN`, `NOT BETWEEN`, `IS NULL`, `IS NOT NULL` or `MATCH`
- array $values - Values used by the operator
- string $clause - `where` or `having`
prepareWhereValues()
Quote the input values or transform it in subqueries.
- array $values
renderMatch()
Renders a MATCH AGAINST clause.
- Closure|array|string $columns
- Closure|array|string $expression
- string $modifier
renderMatchColumns()
- Closure|array|string $columns
renderMatchExpression()
- Closure|array|string $expression
renderWhereOperator()
Renders and validates a comparison operator.
- string $operator - `=`, `<=>`, `!=`, `<>`, `>`, `>=`, `<`, `<=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `BETWEEN`, `NOT BETWEEN`, `IS NULL` or `IS NOT NULL`
renderWherePart()
Renders a WHERE part. Like: `AND column IN('value1', 'value2')`.
- array $part - Keys: `glue`, `operator`, `column` and `values`
- bool $first - Is the first part? Prepends the operator (`AND` or `OR`)
renderWhereValues()
Renders the values used by a comparison operator.
- string $operator - `=`, `<=>`, `!=`, `<>`, `>`, `>=`, `<`, `<=`, `LIKE`, `NOT LIKE`, `IN`, `NOT IN`, `BETWEEN`, `NOT BETWEEN`, `IS NULL` or `IS NOT NULL`
- array $values
renderWhereValuesPartBetween()
Renders values for `BETWEEN` or `NOT BETWEEN`.
- string $operator - `BETWEEN` or `NOT BETWEEN`
- array $values - Two values, indexes 0 and 1
renderWhereValuesPartComparator()
Renders the values of operators that receive exactly one value.
- string $operator - `=`, `<=>`, `!=`, `<>`, `>`, `>=`, `<`, `<=`, `LIKE` or `NOT LIKE`
- array $values - Must receive exactly 1 value, index 0
renderWhereValuesPartIn()
Implode values for `IN` or `NOT IN`.
- string $operator - `IN` or `NOT IN`
- array $values - Must receive at least 1 value
renderWhereValuesPartIsNull()
Renders the lonely operators, `IS NULL` or `IS NOT NULL`.
- string $operator - `IS NULL` or `IS NOT NULL`
- array $values - Must be an empty array