Method |
Description |
|
addFrom ( string | ManaPHP\Mvc\Model\QueryBuilderInterface $model, string $alias = null ) : static |
Add a model to take part of the query |
|
andWhere ( string $conditions, integer | float | string | array $bind = [] ) : static |
Appends a condition to the current conditions using a AND operator |
|
betweenWhere ( string $expr, integer | float $min, integer | float $max ) : static |
Appends a BETWEEN condition to the current conditions |
|
columns ( string $columns ) : static |
Sets the columns to be queried |
|
distinct ( boolean $distinct ) : static |
Sets the columns to be queried |
|
execute ( integer | array $cacheOptions = null ) : array |
build the query and execute it. |
|
executeEx ( integer | string &$totalRows, integer | array $cacheOptions = null ) : array |
build the query and execute it. |
|
forUpdate ( boolean $forUpdate = true ) : static |
Sets a FOR UPDATE clause |
|
from ( string | array $models ) : static |
Sets the models who makes part of the query |
|
getBind ( ) : array |
|
|
getSql ( ) : string |
Returns a SQL statement built based on the builder parameters |
|
groupBy ( string $group ) : static |
Sets a LIMIT clause |
|
having ( string $having, array $bind = null ) : static |
Sets a HAVING condition clause |
|
inWhere ( string $expr, array | ManaPHP\Mvc\Model\QueryBuilderInterface $values ) : static |
Appends an IN condition to the current conditions |
|
innerJoin ( string | ManaPHP\Mvc\Model\QueryBuilderInterface $model, string $conditions = null, string $alias = null ) : static |
Adds a INNER join to the query |
|
join ( string | ManaPHP\Mvc\Model\QueryBuilderInterface $model, string $conditions = null, string $alias = null, string $type = null ) : static |
Adds a INNER join to the query |
|
leftJoin ( string | ManaPHP\Mvc\Model\QueryBuilderInterface $model, string $conditions = null, string $alias = null ) : static |
Adds a LEFT join to the query |
|
limit ( integer $limit, integer $offset ) : static |
Sets a LIMIT clause |
|
notBetweenWhere ( string $expr, integer | float $min, integer | float $max ) : static |
Appends a NOT BETWEEN condition to the current conditions |
|
notInWhere ( string $expr, array | ManaPHP\Mvc\Model\QueryBuilderInterface $values ) : static |
Appends a NOT IN condition to the current conditions |
|
orderBy ( string $orderBy ) : static |
Sets a ORDER BY condition clause |
|
page ( integer $size, integer $current = 1 ) : static |
|
|
paginate ( integer $size, integer $page, integer | array $cacheOptions = null ) : static |
|
|
rightJoin ( string | ManaPHP\Mvc\Model\QueryBuilderInterface $model, string $conditions = null, string $alias = null ) : static |
Adds a RIGHT join to the query |
|
setBind ( array $bind, boolean $merge = true ) : static |
Set default bind parameters |
|
unionAll ( ManaPHP\Mvc\Model\QueryBuilderInterface[] $builders ) : static |
|
|
unionDistinct ( ManaPHP\Mvc\Model\QueryBuilderInterface[] $builders ) : static |
|
|
where ( string $conditions, integer | float | string | array $bind = [] ) : static |
Sets conditions for the query |
|