SQLServer
class SQLServer extends Compiler
Compiles SQL Server queries.
Traits
Constants
JSON_PATH_SEPARATOR |
JSON path separator. |
Properties
static protected | $dateFormat | {@inheritdoc} | |
protected Query | $query | Query builder. | from Compiler |
protected array | $params | Query parameters. | from Compiler |
Methods
Compiles subquery, merges parameters and returns subquery SQL.
Returns an escaped identifier.
Builds a JSON value getter.
Builds a JSON value setter.
Returns a comma-separated list of compiled columns.
Compiles the FROM clause.
Returns raw SQL or a paramter placeholder.
Returns a comma-separated list of parameters.
Compiles ORDER BY clauses.
Compiles LIMIT clauses.
Compiles OFFSET clauses.
Details
in Compiler at line 81
static string
setDateFormat(string $dateFormat)
Sets the date format.
in Compiler at line 91
static string
getDateFormat()
Gets the date format.
in Compiler at line 121
protected string
subquery(Subquery $subquery, bool $enclose = true)
Compiles subquery, merges parameters and returns subquery SQL.
at line 31
string
escapeIdentifier(string $identifier)
Returns an escaped identifier.
in Compiler at line 168
array
escapeIdentifiers(array $identifiers)
Returns an array of escaped identifiers.
in Compiler at line 184
protected bool
hasJsonPath(string $string)
Does the string have a JSON path?
at line 39
protected string
buildJsonGet(string $column, array $segments)
Builds a JSON value getter.
at line 47
protected string
buildJsonSet(string $column, array $segments, string $param)
Builds a JSON value setter.
in Compiler at line 220
string
escapeTable(string $table)
Escapes a table name.
in Compiler at line 238
protected string
setOperations(array $setOperations)
Compiles set operations.
in Compiler at line 261
string
table(mixed $table)
Compiles a table.
in Compiler at line 287
string
escapeColumn(string $column)
Escapes a column name.
in Compiler at line 312
protected string
compileColumnName(string $column)
Compiles a column name.
in Compiler at line 333
string
column(mixed $column, bool $allowAlias = false)
Compiles a column.
in Compiler at line 360
string
columns(array $columns, bool $allowAlias = false)
Returns a comma-separated list of compiled columns.
at line 55
string
from($from)
Compiles the FROM clause.
in Compiler at line 390
protected string
param(mixed $param, bool $enclose = true)
Returns raw SQL or a paramter placeholder.
in Compiler at line 419
protected string
params(array $params, bool $enclose = true)
Returns a comma-separated list of parameters.
in Compiler at line 437
protected string
between(array $where)
Compiles BETWEEN clauses.
in Compiler at line 448
protected string
in(array $where)
Compiles IN clauses.
in Compiler at line 461
protected string
null(array $where)
Compiles IS NULL clauses.
in Compiler at line 472
protected string
exists(array $where)
Compiles EXISTS clauses.
in Compiler at line 483
protected string
where(array $where)
Compiles WHERE conditions.
in Compiler at line 503
protected string
whereRaw(array $where)
Compiles a raw WHERE condition.
in Compiler at line 514
protected string
nestedWhere(array $where)
Compiles nested WHERE conditions.
in Compiler at line 525
protected string
whereConditions(array $wheres)
Compiles WHERE conditions.
in Compiler at line 547
protected string
wheres(array $wheres)
Compiles WHERE clauses.
in Compiler at line 563
protected string
joinCondition(array $condition)
Compiles a JOIN condition.
in Compiler at line 574
protected string
nestedJoinCondition(array $condition)
Compiles nested JOIN condition.
in Compiler at line 609
protected string
joins(array $joins)
Compiles JOIN clauses.
in Compiler at line 632
protected string
groupings(array $groupings)
Compiles GROUP BY clauses.
at line 70
protected string
orderings(array $orderings)
Compiles ORDER BY clauses.
in Compiler at line 666
protected string
havingCondictions(array $havings)
Compiles HAVING conditions.
in Compiler at line 688
protected string
havings(array $havings)
Compiles HAVING clauses.
at line 83
protected string
limit(int $limit = null)
Compiles LIMIT clauses.
at line 98
protected string
offset(int $offset = null)
Compiles OFFSET clauses.
in Compiler at line 726
protected string
lock(bool|string|null $lock)
Compiles locking clause.
in Compiler at line 736
array
select()
Compiles a SELECT query.
in Compiler at line 761
protected string
insertWithValues(array $values)
Returns a INSERT query with values.
in Compiler at line 777
protected string
insertWithoutValues()
Returns a INSERT query without values.
in Compiler at line 788
array
insert(array $values = [])
Compiles a INSERT query.
in Compiler at line 810
protected string
updateColumns(array $columns)
Compiles update columns.
in Compiler at line 841
array
update(array $values)
Compiles a UPDATE query.
in Compiler at line 858
array
delete()
Compiles a DELETE query.
in JsonPathBuilderTrait at line 26
protected string
buildJsonPath(array $segments)
Builds a JSON path.