final class QueryBuilder (View source)

Builds immutable SQL query descriptions with validated structured clauses and explicit raw SQL boundaries.

Structured identifiers are validated before driver quoting, and caller values are retained as bindings.

Constants

private JOIN_TYPES

private JOIN_OPERATORS

Methods

static QueryBuilder

Builds the requested database value while preserving its framework contract.

table(string $table)

Provides this part of the database contract while preserving the object's current state and driver semantics.

from(string $table)

Builds the requested database value while preserving its framework contract.

fromRaw(string $sql, array $bindings = [])
select(string|array $columns = '*')
selectSubquery(QueryBuilder $query, string $alias)

Provides this part of the database contract while preserving the object's current state and driver semantics.

fromSubquery(QueryBuilder $query, string $alias)

Builds the requested database value while preserving its framework contract.

selectRaw(string $sql, array $bindings = [])
distinct(bool $state = true)

Provides this part of the database contract while preserving the object's current state and driver semantics.

join(string $table, string $condition, string $type = 'INNER', array $bindings = [])

Appends a backward-compatible JOIN whose ON condition is trusted raw SQL.

joinOn(string $table, string $leftColumn, string $operator, string $rightColumn, string $type = 'INNER')

Appends a JOIN with validated table, type, column identifiers, and comparison operator.

joinRaw(string $table, string $condition, array $bindings = [], string $type = 'INNER')

Appends an explicitly trusted raw ON condition while binding all caller-supplied values separately.

joinSubquery(QueryBuilder $query, string $alias, string $condition, string $type = 'INNER', array $conditionBindings = [])

Appends a compiled subquery with a trusted raw ON condition and preserves all placeholder bindings.

joinSubqueryOn(QueryBuilder $query, string $alias, string $leftColumn, string $operator, string $rightColumn, string $type = 'INNER')

Appends a compiled subquery using a structured comparison of two validated column identifiers.

joinSubqueryRaw(QueryBuilder $query, string $alias, string $condition, array $bindings = [], string $type = 'INNER')

Appends a compiled subquery with an explicitly trusted raw ON fragment and ordered value bindings.

leftJoinSubquery(QueryBuilder $query, string $alias, string $condition, array $conditionBindings = [])

Appends a LEFT JOIN subquery with a backward-compatible trusted raw ON condition.

where(string|array $column, mixed $value = null)
orWhere(string|array $column, mixed $value = null)
where_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

whereLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

or_where_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

where_not_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

whereNotLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

or_where_not_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereNotLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

where_in(string $column, array $values)
whereIn(string $column, array $values)
where_not_in(string $column, array $values)
whereNotIn(string $column, array $values)
or_where_in(string $column, array $values)
orWhereIn(string $column, array $values)
or_where_not_in(string $column, array $values)
orWhereNotIn(string $column, array $values)
whereInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

whereNotInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereNotInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

where_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

whereNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

where_not_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

whereNotNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

or_where_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

or_where_not_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereNotNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

where_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

whereBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

where_not_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

whereNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

or_where_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

or_where_not_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orWhereNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

when(bool $condition, callable $then, callable|null $else = null)
whereRaw(string $sql, array $bindings = [])
orWhereRaw(string $sql, array $bindings = [])
order_by(string $column, string $direction = 'ASC')

Provides this part of the database contract while preserving the object's current state and driver semantics.

orderBy(string $column, string $direction = 'ASC')

Provides this part of the database contract while preserving the object's current state and driver semantics.

group_by(string|array $columns)
groupBy(string|array $columns)
having(string|array $column, mixed $value = null)
orHaving(string|array $column, mixed $value = null)
havingRaw(string $sql, array $bindings = [])
orHavingRaw(string $sql, array $bindings = [])
havingIn(string $column, array $values)
orHavingIn(string $column, array $values)
havingNotIn(string $column, array $values)
orHavingNotIn(string $column, array $values)
havingBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orHavingBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

havingNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

orHavingNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

limit(int $limit, int $offset = 0)

Provides this part of the database contract while preserving the object's current state and driver semantics.

offset(int $offset)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Provides this part of the database contract while preserving the object's current state and driver semantics.

Provides this part of the database contract while preserving the object's current state and driver semantics.

get(int|null $limit = null, int $offset = 0)

Retrieves the requested value without changing the current database state.

cursor(int|null $limit = null, int $offset = 0)
array
getArray(int|null $limit = null, int $offset = 0)
array
bool
exists()

Reports whether the requested condition holds for the current database state.

bool
bool

Provides this part of the database contract while preserving the object's current state and driver semantics.

bool
mixed
value(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

mixed
array
pluck(string $column, string|null $key = null)
array

Requests an exclusive row lock when the query is evaluated inside a transaction.

Requests a shared row lock when the query is evaluated inside a transaction.

array|null
first()
array|null
int

Provides this part of the database contract while preserving the object's current state and driver semantics.

int
int

Provides this part of the database contract while preserving the object's current state and driver semantics.

int
bool
insert(array|null $data = null)
bool
bool
batch_insert(array $rows)
bool
bool
batchInsert(array $rows)
bool
bool
insertOrIgnore(array $rows)
bool
bool
upsert(array $rows, array $updateColumns = [])
bool
bool
update(array|null $data = null)
bool
bool
increment(string $column, int|float $amount = 1)

Provides this part of the database contract while preserving the object's current state and driver semantics.

bool
bool
decrement(string $column, int|float $amount = 1)

Provides this part of the database contract while preserving the object's current state and driver semantics.

bool
bool
batch_update(array $rows, string $index)
bool
bool
batchUpdate(array $rows, string $index)
bool
bool
delete(array $where = [])
bool

Details

make

Builds the requested database value while preserving its framework contract.

Parameters

DatabaseDriverInterface $db

Return Value

QueryBuilder

table

QueryBuilder table(string $table)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $table

Return Value

QueryBuilder

from

QueryBuilder from(string $table)

Builds the requested database value while preserving its framework contract.

Parameters

string $table

Return Value

QueryBuilder

fromRaw

QueryBuilder fromRaw(string $sql, array $bindings = [])

No description

Parameters

string $sql
array $bindings

Return Value

QueryBuilder

select

QueryBuilder select(string|array $columns = '*')

No description

Parameters

string|array $columns

Return Value

QueryBuilder

selectSubquery

QueryBuilder selectSubquery(QueryBuilder $query, string $alias)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

QueryBuilder $query
string $alias

Return Value

QueryBuilder

fromSubquery

QueryBuilder fromSubquery(QueryBuilder $query, string $alias)

Builds the requested database value while preserving its framework contract.

Parameters

QueryBuilder $query
string $alias

Return Value

QueryBuilder

selectRaw

QueryBuilder selectRaw(string $sql, array $bindings = [])

No description

Parameters

string $sql
array $bindings

Return Value

QueryBuilder

distinct

QueryBuilder distinct(bool $state = true)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

bool $state

Return Value

QueryBuilder

join

QueryBuilder join(string $table, string $condition, string $type = 'INNER', array $bindings = [])

Appends a backward-compatible JOIN whose ON condition is trusted raw SQL.

The table identifier and JOIN type are validated, but the condition is intentionally not parsed or escaped. Never concatenate untrusted values into it; pass values through the trailing bindings argument. Prefer joinOn() for a structured column comparison or joinRaw() when the raw boundary should be explicit.

Parameters

string $table
string $condition
string $type
array $bindings

Return Value

QueryBuilder

joinOn

QueryBuilder joinOn(string $table, string $leftColumn, string $operator, string $rightColumn, string $type = 'INNER')

Appends a JOIN with validated table, type, column identifiers, and comparison operator.

Parameters

string $table
string $leftColumn
string $operator
string $rightColumn
string $type

Return Value

QueryBuilder

joinRaw

QueryBuilder joinRaw(string $table, string $condition, array $bindings = [], string $type = 'INNER')

Appends an explicitly trusted raw ON condition while binding all caller-supplied values separately.

The raw condition is not parsed or escaped. Its SQL structure must be application-owned, while untrusted values belong in placeholders represented by the bindings list.

Parameters

string $table
string $condition
array $bindings
string $type

Return Value

QueryBuilder

joinSubquery

QueryBuilder joinSubquery(QueryBuilder $query, string $alias, string $condition, string $type = 'INNER', array $conditionBindings = [])

Appends a compiled subquery with a trusted raw ON condition and preserves all placeholder bindings.

The alias and JOIN type are validated. The condition remains raw for backward compatibility and must contain only application-owned SQL; caller values belong in the trailing bindings argument.

Parameters

QueryBuilder $query
string $alias
string $condition
string $type
array $conditionBindings

Return Value

QueryBuilder

joinSubqueryOn

QueryBuilder joinSubqueryOn(QueryBuilder $query, string $alias, string $leftColumn, string $operator, string $rightColumn, string $type = 'INNER')

Appends a compiled subquery using a structured comparison of two validated column identifiers.

Parameters

QueryBuilder $query
string $alias
string $leftColumn
string $operator
string $rightColumn
string $type

Return Value

QueryBuilder

joinSubqueryRaw

QueryBuilder joinSubqueryRaw(QueryBuilder $query, string $alias, string $condition, array $bindings = [], string $type = 'INNER')

Appends a compiled subquery with an explicitly trusted raw ON fragment and ordered value bindings.

Parameters

QueryBuilder $query
string $alias
string $condition
array $bindings
string $type

Return Value

QueryBuilder

leftJoinSubquery

QueryBuilder leftJoinSubquery(QueryBuilder $query, string $alias, string $condition, array $conditionBindings = [])

Appends a LEFT JOIN subquery with a backward-compatible trusted raw ON condition.

Parameters

QueryBuilder $query
string $alias
string $condition
array $conditionBindings

Return Value

QueryBuilder

where

QueryBuilder where(string|array $column, mixed $value = null)

No description

Parameters

string|array $column
mixed $value

Return Value

QueryBuilder

orWhere

QueryBuilder orWhere(string|array $column, mixed $value = null)

No description

Parameters

string|array $column
mixed $value

Return Value

QueryBuilder

where_like

QueryBuilder where_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

whereLike

QueryBuilder whereLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

or_where_like

QueryBuilder or_where_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

orWhereLike

QueryBuilder orWhereLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

where_not_like

QueryBuilder where_not_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

whereNotLike

QueryBuilder whereNotLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

or_where_not_like

QueryBuilder or_where_not_like(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

orWhereNotLike

QueryBuilder orWhereNotLike(string $column, string $value, string $side = 'both')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $value
string $side

Return Value

QueryBuilder

where_in

QueryBuilder where_in(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

whereIn

QueryBuilder whereIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

where_not_in

QueryBuilder where_not_in(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

whereNotIn

QueryBuilder whereNotIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

or_where_in

QueryBuilder or_where_in(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

orWhereIn

QueryBuilder orWhereIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

or_where_not_in

QueryBuilder or_where_not_in(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

orWhereNotIn

QueryBuilder orWhereNotIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

whereInSubquery

QueryBuilder whereInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
QueryBuilder $query

Return Value

QueryBuilder

whereNotInSubquery

QueryBuilder whereNotInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
QueryBuilder $query

Return Value

QueryBuilder

orWhereInSubquery

QueryBuilder orWhereInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
QueryBuilder $query

Return Value

QueryBuilder

orWhereNotInSubquery

QueryBuilder orWhereNotInSubquery(string $column, QueryBuilder $query)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
QueryBuilder $query

Return Value

QueryBuilder

where_null

QueryBuilder where_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

whereNull

QueryBuilder whereNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

where_not_null

QueryBuilder where_not_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

whereNotNull

QueryBuilder whereNotNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

or_where_null

QueryBuilder or_where_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

orWhereNull

QueryBuilder orWhereNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

or_where_not_null

QueryBuilder or_where_not_null(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

orWhereNotNull

QueryBuilder orWhereNotNull(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

QueryBuilder

where_between

QueryBuilder where_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

whereBetween

QueryBuilder whereBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

where_not_between

QueryBuilder where_not_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

whereNotBetween

QueryBuilder whereNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

or_where_between

QueryBuilder or_where_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

orWhereBetween

QueryBuilder orWhereBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

or_where_not_between

QueryBuilder or_where_not_between(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

orWhereNotBetween

QueryBuilder orWhereNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

when

QueryBuilder when(bool $condition, callable $then, callable|null $else = null)

No description

Parameters

bool $condition
callable $then
callable|null $else

Return Value

QueryBuilder

whereRaw

QueryBuilder whereRaw(string $sql, array $bindings = [])

No description

Parameters

string $sql
array $bindings

Return Value

QueryBuilder

orWhereRaw

QueryBuilder orWhereRaw(string $sql, array $bindings = [])

No description

Parameters

string $sql
array $bindings

Return Value

QueryBuilder

order_by

QueryBuilder order_by(string $column, string $direction = 'ASC')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $direction

Return Value

QueryBuilder

orderBy

QueryBuilder orderBy(string $column, string $direction = 'ASC')

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
string $direction

Return Value

QueryBuilder

group_by

QueryBuilder group_by(string|array $columns)

No description

Parameters

string|array $columns

Return Value

QueryBuilder

groupBy

QueryBuilder groupBy(string|array $columns)

No description

Parameters

string|array $columns

Return Value

QueryBuilder

having

QueryBuilder having(string|array $column, mixed $value = null)

No description

Parameters

string|array $column
mixed $value

Return Value

QueryBuilder

orHaving

QueryBuilder orHaving(string|array $column, mixed $value = null)

No description

Parameters

string|array $column
mixed $value

Return Value

QueryBuilder

havingRaw

QueryBuilder havingRaw(string $sql, array $bindings = [])

No description

Parameters

string $sql
array $bindings

Return Value

QueryBuilder

orHavingRaw

QueryBuilder orHavingRaw(string $sql, array $bindings = [])

No description

Parameters

string $sql
array $bindings

Return Value

QueryBuilder

havingIn

QueryBuilder havingIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

orHavingIn

QueryBuilder orHavingIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

havingNotIn

QueryBuilder havingNotIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

orHavingNotIn

QueryBuilder orHavingNotIn(string $column, array $values)

No description

Parameters

string $column
array $values

Return Value

QueryBuilder

havingBetween

QueryBuilder havingBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

orHavingBetween

QueryBuilder orHavingBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

havingNotBetween

QueryBuilder havingNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

orHavingNotBetween

QueryBuilder orHavingNotBetween(string $column, mixed $from, mixed $to)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
mixed $from
mixed $to

Return Value

QueryBuilder

limit

QueryBuilder limit(int $limit, int $offset = 0)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

int $limit
int $offset

Return Value

QueryBuilder

offset

QueryBuilder offset(int $offset)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

int $offset

Return Value

QueryBuilder

union

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

QueryBuilder $query

Return Value

QueryBuilder

unionAll

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

QueryBuilder $query

Return Value

QueryBuilder

set

QueryBuilder set(array $data)

No description

Parameters

array $data

Return Value

QueryBuilder

get

DatabaseResultInterface|bool get(int|null $limit = null, int $offset = 0)

Retrieves the requested value without changing the current database state.

Parameters

int|null $limit
int $offset

Return Value

DatabaseResultInterface|bool

cursor

Generator cursor(int|null $limit = null, int $offset = 0)

No description

Parameters

int|null $limit
int $offset

Return Value

Generator

getArray

array getArray(int|null $limit = null, int $offset = 0)

No description

Parameters

int|null $limit
int $offset

Return Value

array

exists

bool exists()

Reports whether the requested condition holds for the current database state.

Return Value

bool

doesntExist

bool doesntExist()

Provides this part of the database contract while preserving the object's current state and driver semantics.

Return Value

bool

value

mixed value(string $column)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column

Return Value

mixed

pluck

array pluck(string $column, string|null $key = null)

No description

Parameters

string $column
string|null $key

Return Value

array

lockForUpdate

QueryBuilder lockForUpdate()

Requests an exclusive row lock when the query is evaluated inside a transaction.

Return Value

QueryBuilder

sharedLock

QueryBuilder sharedLock()

Requests a shared row lock when the query is evaluated inside a transaction.

Return Value

QueryBuilder

first

array|null first()

No description

Return Value

array|null

count_all_results

int count_all_results()

Provides this part of the database contract while preserving the object's current state and driver semantics.

Return Value

int

countAllResults

int countAllResults()

Provides this part of the database contract while preserving the object's current state and driver semantics.

Return Value

int

insert

bool insert(array|null $data = null)

No description

Parameters

array|null $data

Return Value

bool

batch_insert

bool batch_insert(array $rows)

No description

Parameters

array $rows

Return Value

bool

batchInsert

bool batchInsert(array $rows)

No description

Parameters

array $rows

Return Value

bool

insertOrIgnore

bool insertOrIgnore(array $rows)

No description

Parameters

array $rows

Return Value

bool

upsert

bool upsert(array $rows, array $updateColumns = [])

No description

Parameters

array $rows
array $updateColumns

Return Value

bool

update

bool update(array|null $data = null)

No description

Parameters

array|null $data

Return Value

bool

increment

bool increment(string $column, int|float $amount = 1)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
int|float $amount

Return Value

bool

decrement

bool decrement(string $column, int|float $amount = 1)

Provides this part of the database contract while preserving the object's current state and driver semantics.

Parameters

string $column
int|float $amount

Return Value

bool

batch_update

bool batch_update(array $rows, string $index)

No description

Parameters

array $rows
string $index

Return Value

bool

batchUpdate

bool batchUpdate(array $rows, string $index)

No description

Parameters

array $rows
string $index

Return Value

bool

delete

bool delete(array $where = [])

No description

Parameters

array $where

Return Value

bool