class SqlServerGrammar extends Grammar (View source)
Macroable |
static protected array | $macros | The registered string macros. | from Macroable |
protected string | $tablePrefix | The grammar table prefix. | from Grammar |
protected string[] | $operators | All of the available clause operators. | |
protected string[] | $selectComponents | The components that make up a select clause. | from Grammar |
static void | macro(string $name, object|callable $macro) Register a custom macro. | from Macroable |
static void | mixin(object $mixin, bool $replace = true) Mix another object into the class. | 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) Dynamically handle calls to the class. | from Macroable |
array | wrapArray(array $values) Wrap an array of values. | from Grammar |
string | wrapTable(Expression|string $table) Wrap a table in keyword identifiers. | |
string | wrap(Expression|string $value, bool $prefixAlias = false) Wrap a value in keyword identifiers. | from Grammar |
string | wrapAliasedValue(string $value, bool $prefixAlias = false) Wrap a value that has an alias. | from Grammar |
string | wrapSegments(array $segments) Wrap the given value segments. | from Grammar |
string | wrapValue(string $value) Wrap a single string in keyword identifiers. | |
string | columnize(array $columns) Convert an array of column names into a delimited string. | from Grammar |
string | parameterize(array $values) Create query parameter place-holders for an array. | from Grammar |
string | parameter(mixed $value) Get the appropriate query parameter place-holder for a value. | from Grammar |
string | quoteString(string|array $value) Quote the given string literal. | from Grammar |
bool | isExpression(mixed $value) Determine if the given value is a raw expression. | from Grammar |
string | getValue(Expression $expression) Get the value of a raw expression. | from Grammar |
string | getDateFormat() Get the format for database stored dates. | |
string | getTablePrefix() Get the grammar's table prefix. | from Grammar |
$this | setTablePrefix(string $prefix) Set the grammar's table prefix. | from Grammar |
string | compileSelect(Builder $query) Compile a select query into SQL. | |
array | compileComponents(Builder $query) Compile the components necessary for a select clause. | from Grammar |
string | compileAggregate(Builder $query, array $aggregate) Compile an aggregated select clause. | from Grammar |
string|null | compileColumns(Builder $query, array $columns) Compile the "select *" portion of the query. | |
string | compileFrom(Builder $query, string $table) Compile the "from" portion of the query. | |
string | compileJoins(Builder $query, array $joins) Compile the "join" portions of the query. | from Grammar |
string | compileWheres(Builder $query) Compile the "where" portions of the query. | from Grammar |
array | compileWheresToArray(Builder $query) Get an array of all the where clauses for the query. | from Grammar |
string | concatenateWhereClauses(Builder $query, array $sql) Format the where clause statements into one string. | from Grammar |
string | whereRaw(Builder $query, array $where) Compile a raw where clause. | from Grammar |
string | whereBasic(Builder $query, array $where) Compile a basic where clause. | from Grammar |
string | whereIn(Builder $query, array $where) Compile a "where in" clause. | from Grammar |
string | whereNotIn(Builder $query, array $where) Compile a "where not in" clause. | from Grammar |
string | whereNotInRaw(Builder $query, array $where) Compile a "where not in raw" clause. | from Grammar |
string | whereInRaw(Builder $query, array $where) Compile a "where in raw" clause. | from Grammar |
string | whereNull(Builder $query, array $where) Compile a "where null" clause. | from Grammar |
string | whereNotNull(Builder $query, array $where) Compile a "where not null" clause. | from Grammar |
string | whereBetween(Builder $query, array $where) Compile a "between" where clause. | from Grammar |
string | whereBetweenColumns(Builder $query, array $where) Compile a "between" where clause. | from Grammar |
string | whereDate(Builder $query, array $where) Compile a "where date" clause. | |
string | whereTime(Builder $query, array $where) Compile a "where time" clause. | |
string | whereDay(Builder $query, array $where) Compile a "where day" clause. | from Grammar |
string | whereMonth(Builder $query, array $where) Compile a "where month" clause. | from Grammar |
string | whereYear(Builder $query, array $where) Compile a "where year" clause. | from Grammar |
string | dateBasedWhere(string $type, Builder $query, array $where) Compile a date based where clause. | from Grammar |
string | whereColumn(Builder $query, array $where) Compile a where clause comparing two columns. | from Grammar |
string | whereNested(Builder $query, array $where) Compile a nested where clause. | from Grammar |
string | whereSub(Builder $query, array $where) Compile a where condition with a sub-select. | from Grammar |
string | whereExists(Builder $query, array $where) Compile a where exists clause. | from Grammar |
string | whereNotExists(Builder $query, array $where) Compile a where exists clause. | from Grammar |
string | whereRowValues(Builder $query, array $where) Compile a where row values condition. | from Grammar |
string | whereJsonBoolean(Builder $query, array $where) Compile a "where JSON boolean" clause. | from Grammar |
string | whereJsonContains(Builder $query, array $where) Compile a "where JSON contains" clause. | from Grammar |
string | compileJsonContains(string $column, string $value) Compile a "JSON contains" statement into SQL. | |
string | prepareBindingForJsonContains(mixed $binding) Prepare the binding for a "JSON contains" statement. | |
string | whereJsonLength(Builder $query, array $where) Compile a "where JSON length" clause. | from Grammar |
string | compileJsonLength(string $column, string $operator, string $value) Compile a "JSON length" statement into SQL. | |
string | compileGroups(Builder $query, array $groups) Compile the "group by" portions of the query. | from Grammar |
string | compileHavings(Builder $query, array $havings) Compile the "having" portions of the query. | from Grammar |
string | compileHaving(array $having) Compile a single having clause. | from Grammar |
string | compileBasicHaving(array $having) Compile a basic having clause. | from Grammar |
string | compileHavingBetween(array $having) Compile a "between" having clause. | from Grammar |
string | compileOrders(Builder $query, array $orders) Compile the "order by" portions of the query. | from Grammar |
array | compileOrdersToArray(Builder $query, array $orders) Compile the query orders to an array. | from Grammar |
string | compileRandom(string $seed) Compile the random statement into SQL. | |
string | compileLimit(Builder $query, int $limit) Compile the "limit" portions of the query. | |
string | compileOffset(Builder $query, int $offset) Compile the "offset" portions of the query. | |
string | compileUnions(Builder $query) Compile the "union" queries attached to the main query. | from Grammar |
string | compileUnion(array $union) Compile a single union statement. | from Grammar |
string | wrapUnion(string $sql) Wrap a union subquery in parentheses. | |
string | compileUnionAggregate(Builder $query) Compile a union aggregate query into SQL. | from Grammar |
string | compileExists(Builder $query) Compile an exists statement into SQL. | |
string | compileInsert(Builder $query, array $values) Compile an insert statement into SQL. | from Grammar |
string | compileInsertOrIgnore(Builder $query, array $values) Compile an insert ignore statement into SQL. | from Grammar |
string | compileInsertGetId(Builder $query, array $values, string $sequence) Compile an insert and get ID statement into SQL. | from Grammar |
string | compileInsertUsing(Builder $query, array $columns, string $sql) Compile an insert statement using a subquery into SQL. | from Grammar |
string | compileUpdate(Builder $query, array $values) Compile an update statement into SQL. | from Grammar |
string | compileUpdateColumns(Builder $query, array $values) Compile the columns for an update statement. | from Grammar |
string | compileUpdateWithoutJoins(Builder $query, string $table, string $columns, string $where) Compile an update statement without joins into SQL. | from Grammar |
string | compileUpdateWithJoins(Builder $query, string $table, string $columns, string $where) Compile an update statement with joins into SQL. | |
string | compileUpsert(Builder $query, array $values, array $uniqueBy, array $update) Compile an "upsert" statement into SQL. | |
array | prepareBindingsForUpdate(array $bindings, array $values) Prepare the bindings for an update statement. | |
string | compileDelete(Builder $query) Compile a delete statement into SQL. | from Grammar |
string | compileDeleteWithoutJoins(Builder $query, string $table, string $where) Compile a delete statement without joins into SQL. | |
string | compileDeleteWithJoins(Builder $query, string $table, string $where) Compile a delete statement with joins into SQL. | from Grammar |
array | prepareBindingsForDelete(array $bindings) Prepare the bindings for a delete statement. | from Grammar |
array | compileTruncate(Builder $query) Compile a truncate table statement into SQL. | from Grammar |
string | compileLock(Builder $query, bool|string $value) Compile the lock into SQL. | |
bool | supportsSavepoints() Determine if the grammar supports savepoints. | from Grammar |
string | compileSavepoint(string $name) Compile the SQL statement to define a savepoint. | |
string | compileSavepointRollBack(string $name) Compile the SQL statement to execute a savepoint rollback. | |
string | wrapJsonSelector(string $value) Wrap the given JSON selector. | |
string | wrapJsonBooleanSelector(string $value) Wrap the given JSON selector for boolean values. | from Grammar |
string | wrapJsonBooleanValue(string $value) Wrap the given JSON boolean value. | |
array | wrapJsonFieldAndPath(string $column) Split the given JSON selector into the field and the optional path and wrap them separately. | from Grammar |
string | wrapJsonPath(string $value, string $delimiter = '->') Wrap the given JSON path. | from Grammar |
bool | isJsonSelector(string $value) Determine if the given string is a JSON selector. | from Grammar |
string | concatenate(array $segments) Concatenate an array of segments, removing empties. | from Grammar |
string | removeLeadingBoolean(string $value) Remove the leading boolean from a statement. | from Grammar |
array | getOperators() Get the grammar specific operators. | from Grammar |
string | compileAnsiOffset(Builder $query, array $components) Create a full ANSI offset clause for the query. | |
string | compileOver(string $orderings) Compile the over statement for a table expression. | |
string | compileTableExpression(string $sql, Builder $query) Compile a common table expression for a query. | |
string | compileRowConstraint(Builder $query) Compile the limit / offset row constraint for a query. | |
string | wrapTableValuedFunction(string $table) Wrap a table in keyword identifiers. |
Register a custom macro.
Mix another object into the class.
Checks if macro is registered.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Wrap an array of values.
Wrap a table in keyword identifiers.
Wrap a value in keyword identifiers.
Wrap a value that has an alias.
Wrap the given value segments.
Wrap a single string in keyword identifiers.
Convert an array of column names into a delimited string.
Create query parameter place-holders for an array.
Get the appropriate query parameter place-holder for a value.
Quote the given string literal.
Determine if the given value is a raw expression.
Get the value of a raw expression.
Get the format for database stored dates.
Get the grammar's table prefix.
Set the grammar's table prefix.
Compile a select query into SQL.
Compile the components necessary for a select clause.
Compile an aggregated select clause.
Compile the "select *" portion of the query.
Compile the "from" portion of the query.
Compile the "join" portions of the query.
Compile the "where" portions of the query.
Get an array of all the where clauses for the query.
Format the where clause statements into one string.
Compile a raw where clause.
Compile a basic where clause.
Compile a "where in" clause.
Compile a "where not in" clause.
Compile a "where not in raw" clause.
For safety, whereIntegerInRaw ensures this method is only used with integer values.
Compile a "where in raw" clause.
For safety, whereIntegerInRaw ensures this method is only used with integer values.
Compile a "where null" clause.
Compile a "where not null" clause.
Compile a "between" where clause.
Compile a "between" where clause.
Compile a "where date" clause.
Compile a "where time" clause.
Compile a "where day" clause.
Compile a "where month" clause.
Compile a "where year" clause.
Compile a date based where clause.
Compile a where clause comparing two columns.
.
Compile a nested where clause.
Compile a where condition with a sub-select.
Compile a where exists clause.
Compile a where exists clause.
Compile a where row values condition.
Compile a "where JSON boolean" clause.
Compile a "where JSON contains" clause.
Compile a "JSON contains" statement into SQL.
Prepare the binding for a "JSON contains" statement.
Compile a "where JSON length" clause.
Compile a "JSON length" statement into SQL.
Compile the "group by" portions of the query.
Compile the "having" portions of the query.
Compile a single having clause.
Compile a basic having clause.
Compile a "between" having clause.
Compile the "order by" portions of the query.
Compile the query orders to an array.
Compile the random statement into SQL.
Compile the "limit" portions of the query.
Compile the "offset" portions of the query.
Compile the "union" queries attached to the main query.
Compile a single union statement.
Wrap a union subquery in parentheses.
Compile a union aggregate query into SQL.
Compile an exists statement into SQL.
Compile an insert statement into SQL.
Compile an insert ignore statement into SQL.
Compile an insert and get ID statement into SQL.
Compile an insert statement using a subquery into SQL.
Compile an update statement into SQL.
Compile the columns for an update statement.
Compile an update statement without joins into SQL.
Compile an update statement with joins into SQL.
Compile an "upsert" statement into SQL.
Prepare the bindings for an update statement.
Compile a delete statement into SQL.
Compile a delete statement without joins into SQL.
Compile a delete statement with joins into SQL.
Prepare the bindings for a delete statement.
Compile a truncate table statement into SQL.
Compile the lock into SQL.
Determine if the grammar supports savepoints.
Compile the SQL statement to define a savepoint.
Compile the SQL statement to execute a savepoint rollback.
Wrap the given JSON selector.
Wrap the given JSON selector for boolean values.
Wrap the given JSON boolean value.
Split the given JSON selector into the field and the optional path and wrap them separately.
Wrap the given JSON path.
Determine if the given string is a JSON selector.
Concatenate an array of segments, removing empties.
Remove the leading boolean from a statement.
Get the grammar specific operators.
Create a full ANSI offset clause for the query.
Compile the over statement for a table expression.
Compile a common table expression for a query.
Compile the limit / offset row constraint for a query.
Wrap a table in keyword identifiers.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Database/Query/Grammars/SqlServerGrammar.html