Grammar
Extends
Properties
$operators array
The grammar specific operators.
$bitwiseOperators array
The grammar specific bitwise operators.
$selectComponents string[]
The components that make up a select clause.
Methods
compileSelect ( Builder $query ) : string
Compile a select query into SQL.
Parameters
- $query Builder
compileComponents ( Builder $query ) : array
Compile the components necessary for a select clause.
Parameters
- $query Builder
compileAggregate ( Builder $query , $aggregate ) : string
Compile an aggregated select clause.
Parameters
- $query Builder
- $aggregate array
compileColumns ( Builder $query , $columns ) : string|null
Compile the "select *" portion of the query.
Parameters
- $query Builder
- $columns array
compileFrom ( Builder $query , $table ) : string
Compile the "from" portion of the query.
Parameters
- $query Builder
- $table string
compileJoins ( Builder $query , $joins ) : string
Compile the "join" portions of the query.
Parameters
- $query Builder
- $joins array
compileWheres ( Builder $query ) : string
Compile the "where" portions of the query.
Parameters
- $query Builder
compileWheresToArray ( $query ) : array
Get an array of all the where clauses for the query.
Parameters
- $query Builder
concatenateWhereClauses ( $query , $sql ) : string
Format the where clause statements into one string.
Parameters
- $query Builder
- $sql array
whereRaw ( Builder $query , $where ) : string
Compile a raw where clause.
Parameters
- $query Builder
- $where array
whereBasic ( Builder $query , $where ) : string
Compile a basic where clause.
Parameters
- $query Builder
- $where array
whereBitwise ( Builder $query , $where ) : string
Compile a bitwise operator where clause.
Parameters
- $query Builder
- $where array
whereIn ( Builder $query , $where ) : string
Compile a "where in" clause.
Parameters
- $query Builder
- $where array
whereNotIn ( Builder $query , $where ) : string
Compile a "where not in" clause.
Parameters
- $query Builder
- $where array
whereNotInRaw ( Builder $query , $where ) : string
Compile a "where not in raw" clause.
Parameters
- $query Builder
- $where array
whereInRaw ( Builder $query , $where ) : string
Compile a "where in raw" clause.
Parameters
- $query Builder
- $where array
whereNull ( Builder $query , $where ) : string
Compile a "where null" clause.
Parameters
- $query Builder
- $where array
whereNotNull ( Builder $query , $where ) : string
Compile a "where not null" clause.
Parameters
- $query Builder
- $where array
whereBetween ( Builder $query , $where ) : string
Compile a "between" where clause.
Parameters
- $query Builder
- $where array
whereBetweenColumns ( Builder $query , $where ) : string
Compile a "between" where clause.
Parameters
- $query Builder
- $where array
whereDate ( Builder $query , $where ) : string
Compile a "where date" clause.
Parameters
- $query Builder
- $where array
whereTime ( Builder $query , $where ) : string
Compile a "where time" clause.
Parameters
- $query Builder
- $where array
whereDay ( Builder $query , $where ) : string
Compile a "where day" clause.
Parameters
- $query Builder
- $where array
whereMonth ( Builder $query , $where ) : string
Compile a "where month" clause.
Parameters
- $query Builder
- $where array
whereYear ( Builder $query , $where ) : string
Compile a "where year" clause.
Parameters
- $query Builder
- $where array
dateBasedWhere ( $type , Builder $query , $where ) : string
Compile a date based where clause.
Parameters
- $type string
- $query Builder
- $where array
whereColumn ( Builder $query , $where ) : string
Compile a where clause comparing two columns.
Parameters
- $query Builder
- $where array
whereNested ( Builder $query , $where ) : string
Compile a nested where clause.
Parameters
- $query Builder
- $where array
whereSub ( Builder $query , $where ) : string
Compile a where condition with a sub-select.
Parameters
- $query Builder
- $where array
whereExists ( Builder $query , $where ) : string
Compile a where exists clause.
Parameters
- $query Builder
- $where array
whereNotExists ( Builder $query , $where ) : string
Compile a where exists clause.
Parameters
- $query Builder
- $where array
whereRowValues ( Builder $query , $where ) : string
Compile a where row values condition.
Parameters
- $query Builder
- $where array
whereJsonBoolean ( Builder $query , $where ) : string
Compile a "where JSON boolean" clause.
Parameters
- $query Builder
- $where array
whereJsonContains ( Builder $query , $where ) : string
Compile a "where JSON contains" clause.
Parameters
- $query Builder
- $where array
compileJsonContains ( $column , $value ) : string
Compile a "JSON contains" statement into SQL.
Parameters
- $column string
- $value string
prepareBindingForJsonContains ( $binding ) : string
Prepare the binding for a "JSON contains" statement.
Parameters
- $binding mixed
whereJsonLength ( Builder $query , $where ) : string
Compile a "where JSON length" clause.
Parameters
- $query Builder
- $where array
compileJsonLength ( $column , $operator , $value ) : string
Compile a "JSON length" statement into SQL.
Parameters
- $column string
- $operator string
- $value string
whereFullText ( Builder $query , $where ) : string
Compile a "where fulltext" clause.
Parameters
- $query Builder
- $where array
compileGroups ( Builder $query , $groups ) : string
Compile the "group by" portions of the query.
Parameters
- $query Builder
- $groups array
compileHavings ( Builder $query , $havings ) : string
Compile the "having" portions of the query.
Parameters
- $query Builder
- $havings array
compileHaving ( array $having ) : string
Compile a single having clause.
Parameters
- $having array
compileBasicHaving ( $having ) : string
Compile a basic having clause.
Parameters
- $having array
compileHavingBetween ( $having ) : string
Compile a "between" having clause.
Parameters
- $having array
compileOrders ( Builder $query , $orders ) : string
Compile the "order by" portions of the query.
Parameters
- $query Builder
- $orders array
compileOrdersToArray ( Builder $query , $orders ) : array
Compile the query orders to an array.
Parameters
- $query Builder
- $orders array
compileRandom ( $seed ) : string
Compile the random statement into SQL.
Parameters
- $seed string
compileLimit ( Builder $query , $limit ) : string
Compile the "limit" portions of the query.
Parameters
- $query Builder
- $limit int
compileOffset ( Builder $query , $offset ) : string
Compile the "offset" portions of the query.
Parameters
- $query Builder
- $offset int
compileUnions ( Builder $query ) : string
Compile the "union" queries attached to the main query.
Parameters
- $query Builder
compileUnion ( array $union ) : string
Compile a single union statement.
Parameters
- $union array
wrapUnion ( $sql ) : string
Wrap a union subquery in parentheses.
Parameters
- $sql string
compileUnionAggregate ( Builder $query ) : string
Compile a union aggregate query into SQL.
Parameters
- $query Builder
compileExists ( Builder $query ) : string
Compile an exists statement into SQL.
Parameters
- $query Builder
compileInsert ( Builder $query , array $values ) : string
Compile an insert statement into SQL.
Parameters
- $query Builder
- $values array
compileInsertOrIgnore ( Builder $query , array $values ) : string
Compile an insert ignore statement into SQL.
Parameters
- $query Builder
- $values array
compileInsertGetId ( Builder $query , $values , $sequence ) : string
Compile an insert and get ID statement into SQL.
Parameters
- $query Builder
- $values array
- $sequence string
compileInsertUsing ( Builder $query , array $columns , string $sql ) : string
Compile an insert statement using a subquery into SQL.
Parameters
- $query Builder
- $columns array
- $sql string
compileUpdate ( Builder $query , array $values ) : string
Compile an update statement into SQL.
Parameters
- $query Builder
- $values array
compileUpdateColumns ( Builder $query , array $values ) : string
Compile the columns for an update statement.
Parameters
- $query Builder
- $values array
compileUpdateWithoutJoins ( Builder $query , $table , $columns , $where ) : string
Compile an update statement without joins into SQL.
Parameters
- $query Builder
- $table string
- $columns string
- $where string
compileUpdateWithJoins ( Builder $query , $table , $columns , $where ) : string
Compile an update statement with joins into SQL.
Parameters
- $query Builder
- $table string
- $columns string
- $where string
compileUpsert ( Builder $query , array $values , array $uniqueBy , array $update ) : string
Compile an "upsert" statement into SQL.
Parameters
- $query Builder
- $values array
- $uniqueBy array
- $update array
prepareBindingsForUpdate ( array $bindings , array $values ) : array
Prepare the bindings for an update statement.
Parameters
- $bindings array
- $values array
compileDelete ( Builder $query ) : string
Compile a delete statement into SQL.
Parameters
- $query Builder
compileDeleteWithoutJoins ( Builder $query , $table , $where ) : string
Compile a delete statement without joins into SQL.
Parameters
- $query Builder
- $table string
- $where string
compileDeleteWithJoins ( Builder $query , $table , $where ) : string
Compile a delete statement with joins into SQL.
Parameters
- $query Builder
- $table string
- $where string
prepareBindingsForDelete ( array $bindings ) : array
Prepare the bindings for a delete statement.
Parameters
- $bindings array
compileTruncate ( Builder $query ) : array
Compile a truncate table statement into SQL.
Parameters
- $query Builder
compileLock ( Builder $query , $value ) : string
Compile the lock into SQL.
Parameters
- $query Builder
- $value bool|string
supportsSavepoints ( ) : bool
Determine if the grammar supports savepoints.
compileSavepoint ( $name ) : string
Compile the SQL statement to define a savepoint.
Parameters
- $name string
compileSavepointRollBack ( $name ) : string
Compile the SQL statement to execute a savepoint rollback.
Parameters
- $name string
wrap ( $value , $prefixAlias ) : string
Wrap a value in keyword identifiers.
Parameters
- $value Expression |string
- $prefixAlias bool
wrapJsonSelector ( $value ) : string
Wrap the given JSON selector.
Parameters
- $value string
wrapJsonBooleanSelector ( $value ) : string
Wrap the given JSON selector for boolean values.
Parameters
- $value string
wrapJsonBooleanValue ( $value ) : string
Wrap the given JSON boolean value.
Parameters
- $value string
wrapJsonFieldAndPath ( $column ) : array
Split the given JSON selector into the field and the optional path and wrap them separately.
Parameters
- $column string
wrapJsonPath ( $value , $delimiter ) : string
Wrap the given JSON path.
Parameters
- $value string
- $delimiter string
isJsonSelector ( $value ) : bool
Determine if the given string is a JSON selector.
Parameters
- $value string
concatenate ( $segments ) : string
Concatenate an array of segments, removing empties.
Parameters
- $segments array
removeLeadingBoolean ( $value ) : string
Remove the leading boolean from a statement.
Parameters
- $value string
getOperators ( ) : array
Get the grammar specific operators.
getBitwiseOperators ( ) : array
Get the grammar specific bitwise operators.