Where
in package
FinalYes
Permite crear cláusulas WHERE para consultas SQL.
Table of Contents
Constants
- FIELD_SEPARATOR = '|'
Properties
- $fields : string
- $operation : string
- $operator : string
- $subWhere : array<string|int, Where>
- $useField : bool
- $value : mixed
- $db : DataBase
Methods
- __construct() : mixed
- between() : self
- column() : self
- eq() : self
- gt() : self
- gte() : self
- in() : self
- isNotNull() : self
- isNull() : self
- like() : self
- lt() : self
- lte() : self
- multiSql() : string
- multiSqlLegacy() : string
- notBetween() : self
- notEq() : self
- notIn() : self
- notLike() : self
- or() : self
- orBetween() : self
- orEq() : self
- orGt() : self
- orGte() : self
- orIn() : self
- orIsNotNull() : self
- orIsNull() : self
- orLike() : self
- orLt() : self
- orLte() : self
- orNotBetween() : self
- orNotEq() : self
- orNotIn() : self
- orNotLike() : self
- orRegexp() : self
- orSub() : self
- orXlike() : self
- regexp() : self
- sql() : string
- sub() : self
- useField() : self
- xlike() : self
- db() : DataBase
- sqlColumn() : string
- sqlOperatorBetween() : string
- sqlOperatorIn() : string
- sqlOperatorLike() : string
- sqlOperatorXLike() : string
- sqlValue() : string
Constants
FIELD_SEPARATOR
public
mixed
FIELD_SEPARATOR
= '|'
Properties
$fields
public
string
$fields
$operation
public
string
$operation
$operator
public
string
$operator
$subWhere
public
array<string|int, Where>
$subWhere
$useField
public
bool
$useField
$value
public
mixed
$value
$db
private
static DataBase
$db
Methods
__construct()
public
__construct(string $fields, mixed $value[, string $operator = '=' ][, string $operation = 'AND' ][, bool $useField = false ]) : mixed
Parameters
- $fields : string
- $value : mixed
- $operator : string = '='
- $operation : string = 'AND'
- $useField : bool = false
between()
public
static between(string $fields, mixed $value1, mixed $value2) : self
Parameters
- $fields : string
- $value1 : mixed
- $value2 : mixed
Return values
selfcolumn()
public
static column(string $fields, mixed $value[, string $operator = '=' ][, string $operation = 'AND' ]) : self
Parameters
- $fields : string
- $value : mixed
- $operator : string = '='
- $operation : string = 'AND'
Return values
selfeq()
public
static eq(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selfgt()
public
static gt(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selfgte()
public
static gte(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selfin()
public
static in(string $fields, mixed $values) : self
Parameters
- $fields : string
- $values : mixed
Return values
selfisNotNull()
public
static isNotNull(string $fields) : self
Parameters
- $fields : string
Return values
selfisNull()
public
static isNull(string $fields) : self
Parameters
- $fields : string
Return values
selflike()
public
static like(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selflt()
public
static lt(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selflte()
public
static lte(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selfmultiSql()
public
static multiSql(array<string|int, mixed> $where) : string
Parameters
- $where : array<string|int, mixed>
Return values
stringmultiSqlLegacy()
public
static multiSqlLegacy(array<string|int, mixed> $where) : string
Parameters
- $where : array<string|int, mixed>
Return values
stringnotBetween()
public
static notBetween(string $fields, mixed $value1, mixed $value2) : self
Parameters
- $fields : string
- $value1 : mixed
- $value2 : mixed
Return values
selfnotEq()
public
static notEq(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selfnotIn()
public
static notIn(string $fields, mixed $values) : self
Parameters
- $fields : string
- $values : mixed
Return values
selfnotLike()
public
static notLike(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selfor()
public
static or(string $fields, mixed $value[, string $operator = '=' ]) : self
Parameters
- $fields : string
- $value : mixed
- $operator : string = '='
Return values
selforBetween()
public
static orBetween(string $fields, mixed $value1, mixed $value2) : self
Parameters
- $fields : string
- $value1 : mixed
- $value2 : mixed
Return values
selforEq()
public
static orEq(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selforGt()
public
static orGt(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selforGte()
public
static orGte(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selforIn()
public
static orIn(string $fields, mixed $values) : self
Parameters
- $fields : string
- $values : mixed
Return values
selforIsNotNull()
public
static orIsNotNull(string $fields) : self
Parameters
- $fields : string
Return values
selforIsNull()
public
static orIsNull(string $fields) : self
Parameters
- $fields : string
Return values
selforLike()
public
static orLike(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selforLt()
public
static orLt(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selforLte()
public
static orLte(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selforNotBetween()
public
static orNotBetween(string $fields, mixed $value1, mixed $value2) : self
Parameters
- $fields : string
- $value1 : mixed
- $value2 : mixed
Return values
selforNotEq()
public
static orNotEq(string $fields, mixed $value) : self
Parameters
- $fields : string
- $value : mixed
Return values
selforNotIn()
public
static orNotIn(string $fields, mixed $values) : self
Parameters
- $fields : string
- $values : mixed
Return values
selforNotLike()
public
static orNotLike(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selforRegexp()
public
static orRegexp(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selforSub()
public
static orSub(array<string|int, mixed> $where) : self
Parameters
- $where : array<string|int, mixed>
Return values
selforXlike()
public
static orXlike(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selfregexp()
public
static regexp(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selfsql()
public
sql() : string
Return values
stringsub()
public
static sub(array<string|int, mixed> $where[, string $operation = 'AND' ]) : self
Parameters
- $where : array<string|int, mixed>
- $operation : string = 'AND'
Return values
selfuseField()
public
useField() : self
Return values
selfxlike()
public
static xlike(string $fields, string $value) : self
Parameters
- $fields : string
- $value : string
Return values
selfdb()
private
static db() : DataBase
Return values
DataBasesqlColumn()
private
static sqlColumn(string $field) : string
Parameters
- $field : string
Return values
stringsqlOperatorBetween()
private
sqlOperatorBetween(string $field, mixed $values, string $operator) : string
Parameters
- $field : string
- $values : mixed
- $operator : string
Return values
stringsqlOperatorIn()
private
static sqlOperatorIn(string $field, mixed $values, string $operator) : string
Parameters
- $field : string
- $values : mixed
- $operator : string
Return values
stringsqlOperatorLike()
private
static sqlOperatorLike(string $field, string $value, string $operator) : string
Parameters
- $field : string
- $value : string
- $operator : string
Return values
stringsqlOperatorXLike()
private
static sqlOperatorXLike(string $field, string $value) : string
Parameters
- $field : string
- $value : string
Return values
stringsqlValue()
private
sqlValue(mixed $value) : string
Parameters
- $value : mixed