SQLiteGrammar
class SQLiteGrammar extends Grammar
Properties
protected string | $tablePrefix | The grammar table prefix. |
from Grammar |
protected array | $operators | All of the available clause operators. |
|
protected array | $selectComponents | The components that make up a select clause. |
Methods
Wrap a value that has an alias.
Convert an array of column names into a delimited string.
Get the appropriate query parameter place-holder for a value.
Format the where clause statements into one string.
Compile a single union statement.
Compile an insert and get ID statement into SQL.
Prepare the bindings for an update statement.
Compile the SQL statement to execute a savepoint rollback.
Concatenate an array of segments, removing empties.
Remove the leading boolean from a statement.
Details
in
Grammar at line 22
array
wrapArray(array $values)
Wrap an array of values.
in
Grammar at line 33
string
wrapTable(Expression|string $table)
Wrap a table in keyword identifiers.
in
Grammar at line 49
string
wrap(Expression|string $value, bool $prefixAlias = false)
Wrap a value in keyword identifiers.
in
Grammar at line 72
protected string
wrapAliasedValue(string $value, bool $prefixAlias = false)
Wrap a value that has an alias.
in
Grammar at line 94
protected string
wrapSegments(array $segments)
Wrap the given value segments.
in
Grammar at line 109
protected string
wrapValue(string $value)
Wrap a single string in keyword identifiers.
in
Grammar at line 124
string
columnize(array $columns)
Convert an array of column names into a delimited string.
in
Grammar at line 135
string
parameterize(array $values)
Create query parameter place-holders for an array.
in
Grammar at line 146
string
parameter(mixed $value)
Get the appropriate query parameter place-holder for a value.
in
Grammar at line 157
bool
isExpression(mixed $value)
Determine if the given value is a raw expression.
in
Grammar at line 168
string
getValue(Expression $expression)
Get the value of a raw expression.
in
Grammar at line 178
string
getDateFormat()
Get the format for database stored dates.
in
Grammar at line 188
string
getTablePrefix()
Get the grammar's table prefix.
in
Grammar at line 199
$this
setTablePrefix(string $prefix)
Set the grammar's table prefix.
at line 45
string
compileSelect(Builder $query)
Compile a select query into SQL.
in
Grammar at line 74
protected array
compileComponents(Builder $query)
Compile the components necessary for a select clause.
in
Grammar at line 99
protected string
compileAggregate(Builder $query, array $aggregate)
Compile an aggregated select clause.
in
Grammar at line 120
protected string|null
compileColumns(Builder $query, array $columns)
Compile the "select *" portion of the query.
in
Grammar at line 141
protected string
compileFrom(Builder $query, string $table)
Compile the "from" portion of the query.
in
Grammar at line 153
protected string
compileJoins(Builder $query, array $joins)
Compile the "join" portions of the query.
in
Grammar at line 168
protected string
compileWheres(Builder $query)
Compile the "where" portions of the query.
in
Grammar at line 193
protected array
compileWheresToArray(Builder $query)
Get an array of all the where clauses for the query.
in
Grammar at line 207
protected string
concatenateWhereClauses(Builder $query, array $sql)
Format the where clause statements into one string.
in
Grammar at line 221
protected string
whereRaw(Builder $query, array $where)
Compile a raw where clause.
in
Grammar at line 233
protected string
whereBasic(Builder $query, array $where)
Compile a basic where clause.
in
Grammar at line 247
protected string
whereIn(Builder $query, array $where)
Compile a "where in" clause.
in
Grammar at line 263
protected string
whereNotIn(Builder $query, array $where)
Compile a "where not in" clause.
in
Grammar at line 279
protected string
whereInSub(Builder $query, array $where)
Compile a where in sub-select clause.
in
Grammar at line 291
protected string
whereNotInSub(Builder $query, array $where)
Compile a where not in sub-select clause.
in
Grammar at line 303
protected string
whereNull(Builder $query, array $where)
Compile a "where null" clause.
in
Grammar at line 315
protected string
whereNotNull(Builder $query, array $where)
Compile a "where not null" clause.
in
Grammar at line 327
protected string
whereBetween(Builder $query, array $where)
Compile a "between" where clause.
at line 76
protected string
whereDate(Builder $query, array $where)
Compile a "where date" clause.
in
Grammar at line 353
protected string
whereTime(Builder $query, array $where)
Compile a "where time" clause.
at line 88
protected string
whereDay(Builder $query, array $where)
Compile a "where day" clause.
at line 100
protected string
whereMonth(Builder $query, array $where)
Compile a "where month" clause.
at line 112
protected string
whereYear(Builder $query, array $where)
Compile a "where year" clause.
at line 125
protected string
dateBasedWhere(string $type, Builder $query, array $where)
Compile a date based where clause.
in
Grammar at line 416
protected string
whereColumn(Builder $query, array $where)
Compile a where clause comparing two columns.
.
in
Grammar at line 428
protected string
whereNested(Builder $query, array $where)
Compile a nested where clause.
in
Grammar at line 445
protected string
whereSub(Builder $query, array $where)
Compile a where condition with a sub-select.
in
Grammar at line 459
protected string
whereExists(Builder $query, array $where)
Compile a where exists clause.
in
Grammar at line 471
protected string
whereNotExists(Builder $query, array $where)
Compile a where exists clause.
in
Grammar at line 483
protected string
compileGroups(Builder $query, array $groups)
Compile the "group by" portions of the query.
in
Grammar at line 495
protected string
compileHavings(Builder $query, array $havings)
Compile the "having" portions of the query.
in
Grammar at line 508
protected string
compileHaving(array $having)
Compile a single having clause.
in
Grammar at line 526
protected string
compileBasicHaving(array $having)
Compile a basic having clause.
in
Grammar at line 542
protected string
compileOrders(Builder $query, array $orders)
Compile the "order by" portions of the query.
in
Grammar at line 558
protected array
compileOrdersToArray(Builder $query, array $orders)
Compile the query orders to an array.
in
Grammar at line 573
string
compileRandom(string $seed)
Compile the random statement into SQL.
in
Grammar at line 585
protected string
compileLimit(Builder $query, int $limit)
Compile the "limit" portions of the query.
in
Grammar at line 597
protected string
compileOffset(Builder $query, int $offset)
Compile the "offset" portions of the query.
in
Grammar at line 608
protected string
compileUnions(Builder $query)
Compile the "union" queries attached to the main query.
at line 62
protected string
compileUnion(array $union)
Compile a single union statement.
at line 141
string
compileInsert(Builder $query, array $values)
Compile an insert statement into SQL.
in
Grammar at line 695
string
compileInsertGetId(Builder $query, array $values, string $sequence)
Compile an insert and get ID statement into SQL.
in
Grammar at line 707
string
compileUpdate(Builder $query, array $values)
Compile an update statement into SQL.
in
Grammar at line 742
array
prepareBindingsForUpdate(array $bindings, array $values)
Prepare the bindings for an update statement.
at line 183
array
compileTruncate(Builder $query)
Compile a truncate table statement into SQL.
in
Grammar at line 782
protected string
compileLock(Builder $query, bool|string $value)
Compile the lock into SQL.
in
Grammar at line 792
bool
supportsSavepoints()
Determine if the grammar supports savepoints.
in
Grammar at line 803
string
compileSavepoint(string $name)
Compile the SQL statement to define a savepoint.
in
Grammar at line 814
string
compileSavepointRollBack(string $name)
Compile the SQL statement to execute a savepoint rollback.
in
Grammar at line 825
protected string
concatenate(array $segments)
Concatenate an array of segments, removing empties.
in
Grammar at line 838
protected string
removeLeadingBoolean(string $value)
Remove the leading boolean from a statement.
in
Grammar at line 848
array
getOperators()
Get the grammar specific operators.