Builder
class Builder (View source)
Traits
Macroable |
Properties
static protected array | $macros | The registered string macros. | from Macroable |
protected Connection | $connection | The database connection instance. | |
protected Grammar | $grammar | The database query grammar instance. | |
protected Processor | $processor | The database query post processor instance. | |
protected array | $bindings | The current query value bindings. | |
array | $aggregate | An aggregate function and column to be run. | |
array | $columns | The columns that should be returned. | |
bool | $distinct | Indicates if the query returns distinct results. | |
string | $from | The table which the query is targeting. | |
array | $joins | The table joins for the query. | |
array | $wheres | The where constraints for the query. | |
array | $groups | The groupings for the query. | |
array | $havings | The having constraints for the query. | |
array | $orders | The orderings for the query. | |
int | $limit | The maximum number of records to return. | |
int | $offset | The number of records to skip. | |
array | $unions | The query union statements. | |
int | $unionLimit | The maximum number of union records to return. | |
int | $unionOffset | The number of union records to skip. | |
array | $unionOrders | The orderings for the union query. | |
string|bool | $lock | Indicates whether row locking is being used. | |
protected array | $backups | The field backups currently in use. | |
protected array | $bindingBackups | The binding backups currently in use. | |
protected array | $operators | All of the available clause operators. | |
protected bool | $useWritePdo | Whether use write pdo for select. |
Methods
static void | macro(string $name, callable $macro) Register a custom macro. | from Macroable |
static bool | hasMacro(string $name) Checks if macro is registered. | from Macroable |
static mixed | __callStatic(string $method, array $parameters) Dynamically handle calls to the class. | from Macroable |
mixed | __call(string $method, array $parameters) Handle dynamic method calls into the method. | |
void | __construct(ConnectionInterface $connection, Grammar $grammar = null, Processor $processor = null) Create a new query builder instance. | |
$this | select(array|mixed $columns = ['*']) Set the columns to be selected. | |
Builder|Builder | selectRaw(string $expression, array $bindings = []) Add a new "raw" select expression to the query. | |
Builder|Builder | selectSub(Closure|Builder|string $query, string $as) Add a subselect expression to the query. | |
$this | addSelect(array|mixed $column) Add a new select column to the query. | |
$this | distinct() Force the query to only return distinct results. | |
$this | from(string $table) Set the table which the query is targeting. | |
$this | join(string $table, string $one, string $operator = null, string $two = null, string $type = 'inner', bool $where = false) Add a join clause to the query. | |
Builder|Builder | joinWhere(string $table, string $one, string $operator, string $two, string $type = 'inner') Add a "join where" clause to the query. | |
Builder|Builder | leftJoin(string $table, string $first, string $operator = null, string $second = null) Add a left join to the query. | |
Builder|Builder | leftJoinWhere(string $table, string $one, string $operator, string $two) Add a "join where" clause to the query. | |
Builder|Builder | rightJoin(string $table, string $first, string $operator = null, string $second = null) Add a right join to the query. | |
Builder|Builder | rightJoinWhere(string $table, string $one, string $operator, string $two) Add a "right join where" clause to the query. | |
Builder|Builder | crossJoin(string $table, string $first = null, string $operator = null, string $second = null) Add a "cross join" clause to the query. | |
Builder | when(bool $value, Closure $callback, Closure $default = null) Apply the callback's query changes if the given "value" is true. | |
$this | where(string|array|Closure $column, string $operator = null, mixed $value = null, string $boolean = 'and') Add a basic where clause to the query. | |
$this | addArrayOfWheres(array $column, string $boolean, string $method = 'where') Add an array of where clauses to the query. | |
bool | invalidOperatorAndValue(string $operator, mixed $value) Determine if the given operator and value combination is legal. | |
Builder|Builder | orWhere(Closure|string $column, string $operator = null, mixed $value = null) Add an "or where" clause to the query. | |
Builder|Builder | whereColumn(string|array $first, string|null $operator = null, string|null $second = null, string|null $boolean = 'and') Add a "where" clause comparing two columns to the query. | |
Builder|Builder | orWhereColumn(string|array $first, string|null $operator = null, string|null $second = null) Add an "or where" clause comparing two columns to the query. | |
$this | whereRaw(string $sql, mixed $bindings = [], string $boolean = 'and') Add a raw where clause to the query. | |
Builder|Builder | orWhereRaw(string $sql, array $bindings = []) Add a raw or where clause to the query. | |
$this | whereBetween(string $column, array $values, string $boolean = 'and', bool $not = false) Add a where between statement to the query. | |
Builder|Builder | orWhereBetween(string $column, array $values) Add an or where between statement to the query. | |
Builder|Builder | whereNotBetween(string $column, array $values, string $boolean = 'and') Add a where not between statement to the query. | |
Builder|Builder | orWhereNotBetween(string $column, array $values) Add an or where not between statement to the query. | |
Builder|Builder | whereNested(Closure $callback, string $boolean = 'and') Add a nested where statement to the query. | |
Builder | forNestedWhere() Create a new query instance for nested where condition. | |
$this | addNestedWhereQuery(Builder|Builder $query, string $boolean = 'and') Add another query builder as a nested where to the query builder. | |
$this | whereSub(string $column, string $operator, Closure $callback, string $boolean) Add a full sub-select to the query. | |
$this | whereExists(Closure $callback, string $boolean = 'and', bool $not = false) Add an exists clause to the query. | |
Builder|Builder | orWhereExists(Closure $callback, bool $not = false) Add an or exists clause to the query. | |
Builder|Builder | whereNotExists(Closure $callback, string $boolean = 'and') Add a where not exists clause to the query. | |
Builder|Builder | orWhereNotExists(Closure $callback) Add a where not exists clause to the query. | |
$this | addWhereExistsQuery(Builder $query, string $boolean = 'and', bool $not = false) Add an exists clause to the query. | |
$this | whereIn(string $column, mixed $values, string $boolean = 'and', bool $not = false) Add a "where in" clause to the query. | |
Builder|Builder | orWhereIn(string $column, mixed $values) Add an "or where in" clause to the query. | |
Builder|Builder | whereNotIn(string $column, mixed $values, string $boolean = 'and') Add a "where not in" clause to the query. | |
Builder|Builder | orWhereNotIn(string $column, mixed $values) Add an "or where not in" clause to the query. | |
$this | whereInSub(string $column, Closure $callback, string $boolean, bool $not) Add a where in with a sub-select to the query. | |
$this | whereInExistingQuery(string $column, Builder|Builder $query, string $boolean, bool $not) Add an external sub-select to the query. | |
$this | whereNull(string $column, string $boolean = 'and', bool $not = false) Add a "where null" clause to the query. | |
Builder|Builder | orWhereNull(string $column) Add an "or where null" clause to the query. | |
Builder|Builder | whereNotNull(string $column, string $boolean = 'and') Add a "where not null" clause to the query. | |
Builder|Builder | orWhereNotNull(string $column) Add an "or where not null" clause to the query. | |
Builder|Builder | whereDate(string $column, string $operator, mixed $value = null, string $boolean = 'and') Add a "where date" statement to the query. | |
Builder|Builder | orWhereDate(string $column, string $operator, string $value) Add an "or where date" statement to the query. | |
Builder|Builder | whereTime(string $column, string $operator, int $value, string $boolean = 'and') Add a "where time" statement to the query. | |
Builder|Builder | orWhereTime(string $column, string $operator, int $value) Add an "or where time" statement to the query. | |
Builder|Builder | whereDay(string $column, string $operator, mixed $value = null, string $boolean = 'and') Add a "where day" statement to the query. | |
Builder|Builder | whereMonth(string $column, string $operator, mixed $value = null, string $boolean = 'and') Add a "where month" statement to the query. | |
Builder|Builder | whereYear(string $column, string $operator, mixed $value = null, string $boolean = 'and') Add a "where year" statement to the query. | |
$this | addDateBasedWhere(string $type, string $column, string $operator, int $value, string $boolean = 'and') Add a date based (year, month, day, time) statement to the query. | |
array | prepareValueAndOperator(string $value, string $operator, bool $useDefault = false) Prepare the value and operator for a where clause. | |
$this | dynamicWhere(string $method, string $parameters) Handles dynamic "where" clauses to the query. | |
void | addDynamic(string $segment, string $connector, array $parameters, int $index) Add a single dynamic where clause statement to the query. | |
$this | groupBy(array $groups) Add a "group by" clause to the query. | |
$this | having(string $column, string $operator = null, string $value = null, string $boolean = 'and') Add a "having" clause to the query. | |
Builder|Builder | orHaving(string $column, string $operator = null, string $value = null) Add a "or having" clause to the query. | |
$this | havingRaw(string $sql, array $bindings = [], string $boolean = 'and') Add a raw having clause to the query. | |
Builder|Builder | orHavingRaw(string $sql, array $bindings = []) Add a raw or having clause to the query. | |
$this | orderBy(string $column, string $direction = 'asc') Add an "order by" clause to the query. | |
Builder|Builder | latest(string $column = 'created_at') Add an "order by" clause for a timestamp to the query. | |
Builder|Builder | oldest(string $column = 'created_at') Add an "order by" clause for a timestamp to the query. | |
$this | inRandomOrder(string $seed = '') Put the query's results in random order. | |
$this | orderByRaw(string $sql, array $bindings = []) Add a raw "order by" clause to the query. | |
$this | offset(int $value) Set the "offset" value of the query. | |
Builder|Builder | skip(int $value) Alias to set the "offset" value of the query. | |
$this | limit(int $value) Set the "limit" value of the query. | |
Builder|Builder | take(int $value) Alias to set the "limit" value of the query. | |
Builder|Builder | forPage(int $page, int $perPage = 15) Set the limit and offset for a given page. | |
Builder|Builder | forPageAfterId(int $perPage = 15, int $lastId, string $column = 'id') Constrain the query to the next "page" of results after a given ID. | |
Builder|Builder | union(Builder|Closure $query, bool $all = false) Add a union statement to the query. | |
Builder|Builder | unionAll(Builder|Closure $query) Add a union all statement to the query. | |
$this | lock(bool $value = true) Lock the selected rows in the table. | |
Builder | lockForUpdate() Lock the selected rows in the table for updating. | |
Builder | sharedLock() Share lock the selected rows in the table. | |
string | toSql() Get the SQL representation of the query. | |
mixed|Builder | find(int $id, array $columns = ['*']) Execute a query for a single record by ID. | |
mixed | value(string $column) Get a single column's value from the first result of a query. | |
stdClass|array|null | first(array $columns = ['*']) Execute the query and get the first result. | |
Collection | get(array $columns = ['*']) Execute the query as a "select" statement. | |
array | runSelect() Run the query as a "select" statement against the connection. | |
LengthAwarePaginator | paginate(int $perPage = 15, array $columns = ['*'], string $pageName = 'page', int|null $page = null) Paginate the given query into a simple paginator. | |
Paginator | simplePaginate(int $perPage = 15, array $columns = ['*'], string $pageName = 'page', int|null $page = null) Get a paginator only supporting simple next and previous links. | |
int | getCountForPagination(array $columns = ['*']) Get the count of the total records for the paginator. | |
void | backupFieldsForCount() Backup then remove some fields for the pagination count. | |
array | clearSelectAliases(array $columns) Remove the column aliases since they will break count queries. | |
void | restoreFieldsForCount() Restore some fields after the pagination count. | |
Generator | cursor() Get a generator for the given query. | |
bool | chunk(int $count, callable $callback) Chunk the results of the query. | |
bool | chunkById(int $count, callable $callback, string $column = 'id', string $alias = null) Chunk the results of a query by comparing numeric IDs. | |
bool | each(callable $callback, int $count = 1000) Execute a callback over each item while chunking. | |
Collection | pluck(string $column, string|null $key = null) Get an array with the values of a given column. | |
string|null | stripTableForPluck(string $column) Strip off the table name or alias from a column identifier. | |
string | implode(string $column, string $glue = '') Concatenate values of a given column as a string. | |
bool | exists() Determine if any rows exist for the current query. | |
int | count(string $columns = '*') Retrieve the "count" result of the query. | |
mixed | min(string $column) Retrieve the minimum value of a given column. | |
mixed | max(string $column) Retrieve the maximum value of a given column. | |
mixed | sum(string $column) Retrieve the sum of the values of a given column. | |
mixed | avg(string $column) Retrieve the average of the values of a given column. | |
mixed | average(string $column) Alias for the "avg" method. | |
mixed | aggregate(string $function, array $columns = ['*']) Execute an aggregate function on the database. | |
float|int | numericAggregate(string $function, array $columns = ['*']) Execute a numeric aggregate function on the database. | |
bool | insert(array $values) Insert a new record into the database. | |
int | insertGetId(array $values, string $sequence = null) Insert a new record and get the value of the primary key. | |
int | update(array $values) Update a record in the database. | |
bool | updateOrInsert(array $attributes, array $values = []) Insert or update a record matching the attributes, and fill it with values. | |
int | increment(string $column, int $amount = 1, array $extra = []) Increment a column's value by a given amount. | |
int | decrement(string $column, int $amount = 1, array $extra = []) Decrement a column's value by a given amount. | |
int | delete(mixed $id = null) Delete a record from the database. | |
void | truncate() Run a truncate statement on the table. | |
Builder | newQuery() Get a new instance of the query builder. | |
void | mergeWheres(array $wheres, array $bindings) Merge an array of where clauses and bindings. | |
array | cleanBindings(array $bindings) Remove all of the expressions from a list of bindings. | |
Expression | raw(mixed $value) Create a raw database expression. | |
array | getBindings() Get the current query value bindings in a flattened array. | |
array | getRawBindings() Get the raw array of bindings. | |
$this | setBindings(array $bindings, string $type = 'where') Set the bindings on the query builder. | |
$this | addBinding(mixed $value, string $type = 'where') Add a binding to the query. | |
$this | mergeBindings(Builder $query) Merge an array of bindings into our bindings. | |
ConnectionInterface | getConnection() Get the database connection instance. | |
Processor | getProcessor() Get the database query processor instance. | |
Grammar | getGrammar() Get the query grammar instance. | |
$this | useWritePdo() Use the write pdo for query. |
Details
static void macro(string $name, callable $macro)
Register a custom macro.
static bool hasMacro(string $name)
Checks if macro is registered.
static mixed __callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
mixed __call(string $method, array $parameters)
Handle dynamic method calls into the method.
void __construct(ConnectionInterface $connection, Grammar $grammar = null, Processor $processor = null)
Create a new query builder instance.
$this select(array|mixed $columns = ['*'])
Set the columns to be selected.
Builder|Builder selectRaw(string $expression, array $bindings = [])
Add a new "raw" select expression to the query.
Builder|Builder selectSub(Closure|Builder|string $query, string $as)
Add a subselect expression to the query.
$this addSelect(array|mixed $column)
Add a new select column to the query.
$this distinct()
Force the query to only return distinct results.
$this from(string $table)
Set the table which the query is targeting.
$this join(string $table, string $one, string $operator = null, string $two = null, string $type = 'inner', bool $where = false)
Add a join clause to the query.
Builder|Builder joinWhere(string $table, string $one, string $operator, string $two, string $type = 'inner')
Add a "join where" clause to the query.
Builder|Builder leftJoin(string $table, string $first, string $operator = null, string $second = null)
Add a left join to the query.
Builder|Builder leftJoinWhere(string $table, string $one, string $operator, string $two)
Add a "join where" clause to the query.
Builder|Builder rightJoin(string $table, string $first, string $operator = null, string $second = null)
Add a right join to the query.
Builder|Builder rightJoinWhere(string $table, string $one, string $operator, string $two)
Add a "right join where" clause to the query.
Builder|Builder crossJoin(string $table, string $first = null, string $operator = null, string $second = null)
Add a "cross join" clause to the query.
Builder when(bool $value, Closure $callback, Closure $default = null)
Apply the callback's query changes if the given "value" is true.
$this where(string|array|Closure $column, string $operator = null, mixed $value = null, string $boolean = 'and')
Add a basic where clause to the query.
protected $this addArrayOfWheres(array $column, string $boolean, string $method = 'where')
Add an array of where clauses to the query.
protected bool invalidOperatorAndValue(string $operator, mixed $value)
Determine if the given operator and value combination is legal.
Builder|Builder orWhere(Closure|string $column, string $operator = null, mixed $value = null)
Add an "or where" clause to the query.
Builder|Builder whereColumn(string|array $first, string|null $operator = null, string|null $second = null, string|null $boolean = 'and')
Add a "where" clause comparing two columns to the query.
Builder|Builder orWhereColumn(string|array $first, string|null $operator = null, string|null $second = null)
Add an "or where" clause comparing two columns to the query.
$this whereRaw(string $sql, mixed $bindings = [], string $boolean = 'and')
Add a raw where clause to the query.
Builder|Builder orWhereRaw(string $sql, array $bindings = [])
Add a raw or where clause to the query.
$this whereBetween(string $column, array $values, string $boolean = 'and', bool $not = false)
Add a where between statement to the query.
Builder|Builder orWhereBetween(string $column, array $values)
Add an or where between statement to the query.
Builder|Builder whereNotBetween(string $column, array $values, string $boolean = 'and')
Add a where not between statement to the query.
Builder|Builder orWhereNotBetween(string $column, array $values)
Add an or where not between statement to the query.
Builder|Builder whereNested(Closure $callback, string $boolean = 'and')
Add a nested where statement to the query.
Builder forNestedWhere()
Create a new query instance for nested where condition.
$this addNestedWhereQuery(Builder|Builder $query, string $boolean = 'and')
Add another query builder as a nested where to the query builder.
protected $this whereSub(string $column, string $operator, Closure $callback, string $boolean)
Add a full sub-select to the query.
$this whereExists(Closure $callback, string $boolean = 'and', bool $not = false)
Add an exists clause to the query.
Builder|Builder orWhereExists(Closure $callback, bool $not = false)
Add an or exists clause to the query.
Builder|Builder whereNotExists(Closure $callback, string $boolean = 'and')
Add a where not exists clause to the query.
$this addWhereExistsQuery(Builder $query, string $boolean = 'and', bool $not = false)
Add an exists clause to the query.
$this whereIn(string $column, mixed $values, string $boolean = 'and', bool $not = false)
Add a "where in" clause to the query.
Builder|Builder whereNotIn(string $column, mixed $values, string $boolean = 'and')
Add a "where not in" clause to the query.
Builder|Builder orWhereNotIn(string $column, mixed $values)
Add an "or where not in" clause to the query.
protected $this whereInSub(string $column, Closure $callback, string $boolean, bool $not)
Add a where in with a sub-select to the query.
protected $this whereInExistingQuery(string $column, Builder|Builder $query, string $boolean, bool $not)
Add an external sub-select to the query.
$this whereNull(string $column, string $boolean = 'and', bool $not = false)
Add a "where null" clause to the query.
Builder|Builder whereNotNull(string $column, string $boolean = 'and')
Add a "where not null" clause to the query.
Builder|Builder whereDate(string $column, string $operator, mixed $value = null, string $boolean = 'and')
Add a "where date" statement to the query.
Builder|Builder orWhereDate(string $column, string $operator, string $value)
Add an "or where date" statement to the query.
Builder|Builder whereTime(string $column, string $operator, int $value, string $boolean = 'and')
Add a "where time" statement to the query.
Builder|Builder orWhereTime(string $column, string $operator, int $value)
Add an "or where time" statement to the query.
Builder|Builder whereDay(string $column, string $operator, mixed $value = null, string $boolean = 'and')
Add a "where day" statement to the query.
Builder|Builder whereMonth(string $column, string $operator, mixed $value = null, string $boolean = 'and')
Add a "where month" statement to the query.
Builder|Builder whereYear(string $column, string $operator, mixed $value = null, string $boolean = 'and')
Add a "where year" statement to the query.
protected $this addDateBasedWhere(string $type, string $column, string $operator, int $value, string $boolean = 'and')
Add a date based (year, month, day, time) statement to the query.
protected array prepareValueAndOperator(string $value, string $operator, bool $useDefault = false)
Prepare the value and operator for a where clause.
$this dynamicWhere(string $method, string $parameters)
Handles dynamic "where" clauses to the query.
protected void addDynamic(string $segment, string $connector, array $parameters, int $index)
Add a single dynamic where clause statement to the query.
$this groupBy(array $groups)
Add a "group by" clause to the query.
$this having(string $column, string $operator = null, string $value = null, string $boolean = 'and')
Add a "having" clause to the query.
Builder|Builder orHaving(string $column, string $operator = null, string $value = null)
Add a "or having" clause to the query.
$this havingRaw(string $sql, array $bindings = [], string $boolean = 'and')
Add a raw having clause to the query.
Builder|Builder orHavingRaw(string $sql, array $bindings = [])
Add a raw or having clause to the query.
$this orderBy(string $column, string $direction = 'asc')
Add an "order by" clause to the query.
Builder|Builder latest(string $column = 'created_at')
Add an "order by" clause for a timestamp to the query.
Builder|Builder oldest(string $column = 'created_at')
Add an "order by" clause for a timestamp to the query.
$this inRandomOrder(string $seed = '')
Put the query's results in random order.
$this orderByRaw(string $sql, array $bindings = [])
Add a raw "order by" clause to the query.
$this offset(int $value)
Set the "offset" value of the query.
$this limit(int $value)
Set the "limit" value of the query.
Builder|Builder forPageAfterId(int $perPage = 15, int $lastId, string $column = 'id')
Constrain the query to the next "page" of results after a given ID.
Builder|Builder union(Builder|Closure $query, bool $all = false)
Add a union statement to the query.
$this lock(bool $value = true)
Lock the selected rows in the table.
Builder lockForUpdate()
Lock the selected rows in the table for updating.
Builder sharedLock()
Share lock the selected rows in the table.
string toSql()
Get the SQL representation of the query.
mixed|Builder find(int $id, array $columns = ['*'])
Execute a query for a single record by ID.
mixed value(string $column)
Get a single column's value from the first result of a query.
stdClass|array|null first(array $columns = ['*'])
Execute the query and get the first result.
Collection get(array $columns = ['*'])
Execute the query as a "select" statement.
protected array runSelect()
Run the query as a "select" statement against the connection.
LengthAwarePaginator paginate(int $perPage = 15, array $columns = ['*'], string $pageName = 'page', int|null $page = null)
Paginate the given query into a simple paginator.
Paginator simplePaginate(int $perPage = 15, array $columns = ['*'], string $pageName = 'page', int|null $page = null)
Get a paginator only supporting simple next and previous links.
This is more efficient on larger data-sets, etc.
int getCountForPagination(array $columns = ['*'])
Get the count of the total records for the paginator.
protected void backupFieldsForCount()
Backup then remove some fields for the pagination count.
protected array clearSelectAliases(array $columns)
Remove the column aliases since they will break count queries.
protected void restoreFieldsForCount()
Restore some fields after the pagination count.
Generator cursor()
Get a generator for the given query.
bool chunk(int $count, callable $callback)
Chunk the results of the query.
bool chunkById(int $count, callable $callback, string $column = 'id', string $alias = null)
Chunk the results of a query by comparing numeric IDs.
bool each(callable $callback, int $count = 1000)
Execute a callback over each item while chunking.
Collection pluck(string $column, string|null $key = null)
Get an array with the values of a given column.
protected string|null stripTableForPluck(string $column)
Strip off the table name or alias from a column identifier.
string implode(string $column, string $glue = '')
Concatenate values of a given column as a string.
bool exists()
Determine if any rows exist for the current query.
int count(string $columns = '*')
Retrieve the "count" result of the query.
mixed min(string $column)
Retrieve the minimum value of a given column.
mixed max(string $column)
Retrieve the maximum value of a given column.
mixed sum(string $column)
Retrieve the sum of the values of a given column.
mixed avg(string $column)
Retrieve the average of the values of a given column.
mixed average(string $column)
Alias for the "avg" method.
mixed aggregate(string $function, array $columns = ['*'])
Execute an aggregate function on the database.
float|int numericAggregate(string $function, array $columns = ['*'])
Execute a numeric aggregate function on the database.
bool insert(array $values)
Insert a new record into the database.
int insertGetId(array $values, string $sequence = null)
Insert a new record and get the value of the primary key.
int update(array $values)
Update a record in the database.
bool updateOrInsert(array $attributes, array $values = [])
Insert or update a record matching the attributes, and fill it with values.
int increment(string $column, int $amount = 1, array $extra = [])
Increment a column's value by a given amount.
int decrement(string $column, int $amount = 1, array $extra = [])
Decrement a column's value by a given amount.
int delete(mixed $id = null)
Delete a record from the database.
void truncate()
Run a truncate statement on the table.
Builder newQuery()
Get a new instance of the query builder.
void mergeWheres(array $wheres, array $bindings)
Merge an array of where clauses and bindings.
protected array cleanBindings(array $bindings)
Remove all of the expressions from a list of bindings.
Expression raw(mixed $value)
Create a raw database expression.
array getBindings()
Get the current query value bindings in a flattened array.
array getRawBindings()
Get the raw array of bindings.
$this setBindings(array $bindings, string $type = 'where')
Set the bindings on the query builder.
$this addBinding(mixed $value, string $type = 'where')
Add a binding to the query.
$this mergeBindings(Builder $query)
Merge an array of bindings into our bindings.
ConnectionInterface getConnection()
Get the database connection instance.
Processor getProcessor()
Get the database query processor instance.
Grammar getGrammar()
Get the query grammar instance.
$this useWritePdo()
Use the write pdo for query.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Database/Query/Builder.html