Method |
Description |
|
__construct ( Pagekit\Database\Connection $connection ) |
Constructor. |
|
__toString ( ) |
{@see QueryBuilder::getSQL} |
|
addPart ( string $name, mixed $parts ) : self |
Adds a query part. |
|
aggregate ( string $function, string $column ) : mixed |
Execute the query with an aggregate function. |
|
avg ( string $column ) : mixed |
Execute the query and get the "avg" result. |
|
count ( string $column = '*' ) : integer |
Execute the query and get the "count" result. |
|
delete ( ) : integer |
Execute the "delete" query. |
|
execute ( mixed $columns = ['*'] ) : Doctrine\DBAL\Driver\Statement |
Execute the "select" query. |
|
first ( mixed $columns = ['*'] ) : mixed |
Execute the query and get the first result. |
|
from ( string $table ) : self |
Creates and sets a "from" to the query. |
|
get ( mixed $columns = ['*'] ) : array |
Execute the query and get all results. |
|
getConnection ( ) : Pagekit\Database\Connection |
Gets the connection for the query builder. |
|
getPart ( string $name ) : mixed |
Gets a query part by its name. |
|
getParts ( ) : array |
Gets all query parts. |
|
getSQL ( ) : string |
Gets the query SQL. |
|
groupBy ( mixed $groupBy ) : self |
Creates and adds a "group by" to the query. |
|
having ( mixed $having, string $type = CompositeExpression::TYPE_AND ) : self |
Creates and adds a "having" to the query. |
|
innerJoin ( string $table, string $condition = null ) : self |
Creates and adds an "inner join" to the query. |
|
join ( string $table, string $condition = null, string $type = 'inner' ) : self |
Creates and adds a "join" to the query. |
|
leftJoin ( string $table, string $condition = null ) : self |
Creates and adds a "left join" to the query. |
|
limit ( integer $limit ) : self |
Sets the limit of the query. |
|
max ( string $column ) : mixed |
Execute the query and get the "max" result. |
|
min ( string $column ) : mixed |
Execute the query and get the "min" result. |
|
offset ( integer $offset ) : self |
Sets the offset of the query. |
|
orHaving ( mixed $having ) : self |
Creates and adds a "or having" to the query. |
|
orWhere ( mixed $condition, array $params = [] ) : self |
Creates and adds a "or where" to the query. |
|
orWhereExists ( Closure $callback, boolean $not = false ) : self |
Creates and adds a "or where exists" to the query. |
|
orWhereIn ( string $column, mixed $values, boolean $not = false ) : self |
Creates and adds a "or where in" to the query. |
|
orderBy ( string $sort, string $order = null ) : self |
Creates and adds an "order by" to the query. |
|
params ( array $params = null ) : array | self |
Get or set multiple query parameters. |
|
rightJoin ( string $table, string $condition = null ) : self |
Creates and adds a "right join" to the query. |
|
select ( mixed $columns = ['*'] ) : self |
Creates and adds a "select" to the query. |
|
setPart ( string $name, mixed $parts ) : self |
Sets a query part and replaces all previous values. |
|
sum ( string $column ) : mixed |
Execute the query and get the "sum" result. |
|
update ( array $values ) : integer |
Execute the "update" query with the given values. |
|
where ( mixed $condition, array $params = [] ) : self |
Creates and adds a "where" to the query. |
|
whereExists ( Closure $callback, boolean $not = false, string $type = null ) : self |
Creates and adds a "where exists" to the query. |
|
whereIn ( string $column, mixed $values, boolean $not = false, string $type = null ) : self |
Creates and adds a "where in" to the query. |
|
whereInSet ( string $column, mixed $values, boolean $not = false, string $type = null ) : self |
Creates and adds a "where FIND_IN_SET" equivalent to the query. |
|