Where
- Full name:
\Qubus\Expressive\Where
Methods
where
Add where condition, more calls appends with AND.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$condition | mixed | condition possibly containing ? or :name |
$parameters | mixed | array accepted by PDOStatement::execute or a scalar value. |
wherePK
Where Primary key
Parameters:
| Parameter | Type | Description |
|---|---|---|
$id | int|string |
whereNot
WHERE $columName != $value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$value | mixed |
whereLike
WHERE $columName LIKE $value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$value | mixed |
whereNotLike
WHERE $columName NOT LIKE $value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$value | mixed |
whereGt
WHERE $columName > $value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$value | mixed |
whereGte
WHERE $columName >= $value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$value | mixed |
whereLt
WHERE $columName < $value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$value | mixed |
whereLte
WHERE $columName <= $value
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$value | mixed |
whereIn
WHERE $columName IN (?,?,?,...)
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$values | array |
whereNotIn
WHERE $columName NOT IN (?,?,?,...)
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | |
$values | array |
whereNull
WHERE $columName IS NULL
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string |
whereNotNull
WHERE $columName IS NOT NULL
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string |
orderBy
ORDER BY $columnName (ASC | DESC)
Parameters:
| Parameter | Type | Description |
|---|---|---|
$columnName | string | - The name of the colum or an expression |
$ordering | string | (DESC | ASC) |
limit
LIMIT $limit
Parameters:
| Parameter | Type | Description |
|---|---|---|
$limit | int|null |
offset
OFFSET $offset
Parameters:
| Parameter | Type | Description |
|---|---|---|
$offset | int|null |
pagination
Parameters:
| Parameter | Type | Description |
|---|---|---|
$perPage | int | |
$page | int |
and
Create an AND operator in the where clause
or
Create an OR operator in the where clause
wrap
To group multiple where clauses together.