Condition
class Condition
Object to reflect SQL conditions
Constants
| VALID_OPERATORS |
|
| UNESCAPED_VALUES |
|
| OP_EQUAL |
|
| OP_LESS |
|
| OP_GREATER |
|
| OP_UNEQUAL |
|
| OP_GREATER_OR_EQUAL |
|
| OP_LESS_OR_EQUAL |
|
| OP_LIKE |
|
| OP_NOT_LIKE |
|
| OP_NULL |
|
| OP_NOT_NULL |
|
| OP_IN |
|
Methods
__construct(string $field, string $operator = null, mixed $value = null, bool $isRaw = false, bool $negate = false)
Condition constructor
string
__toString()
No description
bool|string
getField()
No description
string
getSQL(string|null $table = null)
No description
bool|string
getValue()
No description
static Condition
whereBetween(string $field, int|string $beginValue, int|string $endValue)
Create between condition for string or int values BETWEEN is a shorthand for >= AND <= - begin and end values are included
static Condition
whereBinary(string $field, string $operator, string|array $hexValue)
No description
static Condition
whereEqual($field, $value)
No description
static ConditionGroup
whereGroup()
No description
static Condition
static Condition
whereIsNotNull(string $field)
No description
static Condition
whereIsNull(string $field)
No description
static Condition
whereJSONContains(string $jsonField, mixed $candidate, string $jsonPath = null)
No description
static Condition
whereNotBetween(string $field, int|string $beginValue, int|string $endValue)
No description
static Condition
whereNotEqual($field, $value)
No description
static Condition
Details
at line 52
protected
__construct(string $field, string $operator = null, mixed $value = null, bool $isRaw = false, bool $negate = false)
Condition constructor
Cases:
- Full: All three parameters are being passed ($field, $operator, $value)
- Shortend Equal: Only parameter 1 and 2 are being passed which results in an simple equal condition ($field, $value)
- RAW Condition: Only parameter 1 is being passed
at line 109
string
__toString()
No description
at line 86
bool|string
getField()
No description
at line 102
string
getSQL(string|null $table = null)
No description
at line 93
bool|string
getValue()
No description
at line 159
static Condition
where($field, $operator, $value)
No description
at line 184
static Condition
whereBetween(string $field, int|string $beginValue, int|string $endValue)
Create between condition for string or int values BETWEEN is a shorthand for >= AND <= - begin and end values are included
at line 225
static Condition
whereBinary(string $field, string $operator, string|array $hexValue)
No description
at line 122
static Condition
whereEqual($field, $value)
No description
at line 79
static ConditionGroup
whereGroup()
No description
at line 298
static Condition
whereIsNotNull(string $field)
No description
at line 289
static Condition
whereIsNull(string $field)
No description
at line 309
static Condition
whereJSONContains(string $jsonField, mixed $candidate, string $jsonPath = null)
No description
at line 148
static Condition
whereLike($field, $value)
No description
at line 170
static Condition
whereNot($field, $operator, $value)
No description
at line 199
static Condition
whereNotBetween(string $field, int|string $beginValue, int|string $endValue)
No description
at line 135
static Condition
whereNotEqual($field, $value)
No description
at line 214
static Condition
whereRaw(string $rawSQL)
No description