class Illuminate / Database / Query / Grammars / SqlServerGrammar
You are viewing an older version of the documentation. For the latest, please visit master documentation.

SqlServerGrammar

Extends

Properties

protected

$operators string[]

All of the available clause operators.

Default: array

Methods

public

compileSelect ( Builder $query ) : string

Compile a select query into SQL.

Parameters

protected

compileColumns ( Builder $query , $columns ) : string|null

Compile the "select *" portion of the query.

Parameters

protected

compileFrom ( Builder $query , $table ) : string

Compile the "from" portion of the query.

Parameters

protected

whereBitwise ( Builder $query , $where ) : string

{@inheritdoc}

Parameters

protected

whereDate ( Builder $query , $where ) : string

Compile a "where date" clause.

Parameters

protected

whereTime ( Builder $query , $where ) : string

Compile a "where time" clause.

Parameters

protected

compileJsonContains ( $column , $value ) : string

Compile a "JSON contains" statement into SQL.

Parameters

  • $column string
  • $value string
public

prepareBindingForJsonContains ( $binding ) : string

Prepare the binding for a "JSON contains" statement.

Parameters

  • $binding mixed
protected

compileJsonLength ( $column , $operator , $value ) : string

Compile a "JSON length" statement into SQL.

Parameters

  • $column string
  • $operator string
  • $value string
protected

compileHaving ( array $having ) : string

{@inheritdoc}

Parameters

  • $having array
protected

compileHavingBitwise ( $having ) : string

Compile a having clause involving a bitwise operator.

Parameters

  • $having array
protected

compileAnsiOffset ( Builder $query , $components ) : string

Create a full ANSI offset clause for the query.

Parameters

protected

compileOver ( $orderings ) : string

Compile the over statement for a table expression.

Parameters

  • $orderings string
protected

queryOrderContainsSubquery ( $query ) : bool

Determine if the query's order by clauses contain a subquery.

Parameters

protected

sortBindingsForSubqueryOrderBy ( $query ) : array

Move the order bindings to be after the "select" statement to account for an order by subquery.

Parameters

protected

compileTableExpression ( $sql , $query ) : string

Compile a common table expression for a query.

Parameters

protected

compileRowConstraint ( $query ) : string

Compile the limit / offset row constraint for a query.

Parameters

protected

compileDeleteWithoutJoins ( Builder $query , $table , $where ) : string

Compile a delete statement without joins into SQL.

Parameters

  • $query Builder
  • $table string
  • $where string
public

compileRandom ( $seed ) : string

Compile the random statement into SQL.

Parameters

  • $seed string
protected

compileLimit ( Builder $query , $limit ) : string

Compile the "limit" portions of the query.

Parameters

protected

compileOffset ( Builder $query , $offset ) : string

Compile the "offset" portions of the query.

Parameters

protected

compileLock ( Builder $query , $value ) : string

Compile the lock into SQL.

Parameters

protected

wrapUnion ( $sql ) : string

Wrap a union subquery in parentheses.

Parameters

  • $sql string
public

compileExists ( Builder $query ) : string

Compile an exists statement into SQL.

Parameters

protected

compileUpdateWithJoins ( Builder $query , $table , $columns , $where ) : string

Compile an update statement with joins into SQL.

Parameters

  • $query Builder
  • $table string
  • $columns string
  • $where string
public

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
public

prepareBindingsForUpdate ( array $bindings , array $values ) : array

Prepare the bindings for an update statement.

Parameters

  • $bindings array
  • $values array
public

compileSavepoint ( $name ) : string

Compile the SQL statement to define a savepoint.

Parameters

  • $name string
public

compileSavepointRollBack ( $name ) : string

Compile the SQL statement to execute a savepoint rollback.

Parameters

  • $name string
public

getDateFormat ( ) : string

Get the format for database stored dates.

protected

wrapValue ( $value ) : string

Wrap a single string in keyword identifiers.

Parameters

  • $value string
protected

wrapJsonSelector ( $value ) : string

Wrap the given JSON selector.

Parameters

  • $value string
protected

wrapJsonBooleanValue ( $value ) : string

Wrap the given JSON boolean value.

Parameters

  • $value string
public

wrapTable ( $table ) : string

Wrap a table in keyword identifiers.

Parameters

protected

wrapTableValuedFunction ( $table ) : string

Wrap a table in keyword identifiers.

Parameters

  • $table string