class Illuminate / Database / Schema / Grammars / SqlServerGrammar
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

SqlServerGrammar

Extends

Properties

protected

$transactions bool

If this Grammar supports schema changes wrapped in a transaction.

Default: true
protected

$modifiers string[]

The possible column modifiers.

Default: array
protected

$serials string[]

The columns available as serials.

Default: array
protected

$fluentCommands string[]

The commands to be executed outside of create or alter command.

Default: array

Methods

public

compileCreateDatabase ( $name , $connection ) : string

Compile a create database command.

Parameters

public

compileDropDatabaseIfExists ( $name ) : string

Compile a drop database if exists command.

Parameters

  • $name string
public

compileTableExists ( ) : string

Compile the query to determine if a table exists.

public

compileColumnListing ( $table ) : string

Compile the query to determine the list of columns.

Parameters

  • $table string
public

compileCreate ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a create table command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileAdd ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a column addition table command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileRenameColumn ( Blueprint $blueprint , Illuminate\...\Fluent $command , Connection $connection ) : array|string

Compile a rename column command.

Parameters

public

compileChange ( Blueprint $blueprint , Illuminate\...\Fluent $command , Connection $connection ) : array|string

Compile a change column command into a series of SQL statements.

Parameters

public

compilePrimary ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a primary key command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileUnique ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a unique key command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a plain index key command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileSpatialIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a spatial index key command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDefault ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string|null

Compile a default command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDrop ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop table command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropIfExists ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop table (if exists) command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropAllTables ( ) : string

Compile the SQL needed to drop all tables.

public

compileDropColumn ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop column command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropDefaultConstraint ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop default constraint command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropPrimary ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop primary key command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropUnique ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop unique key command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop index command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropSpatialIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop spatial index command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileDropForeign ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a drop foreign key command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileRename ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a rename table command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileRenameIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string

Compile a rename index command.

Parameters

  • $blueprint Blueprint
  • $command Illuminate\...\Fluent
public

compileEnableForeignKeyConstraints ( ) : string

Compile the command to enable foreign key constraints.

public

compileDisableForeignKeyConstraints ( ) : string

Compile the command to disable foreign key constraints.

public

compileDropAllForeignKeys ( ) : string

Compile the command to drop all foreign keys.

public

compileDropAllViews ( ) : string

Compile the command to drop all views.

public

compileGetAllTables ( ) : string

Compile the SQL needed to retrieve all table names.

public

compileGetAllViews ( ) : string

Compile the SQL needed to retrieve all view names.

protected

typeChar ( Illuminate\...\Fluent $column ) : string

Create the column definition for a char type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeString ( Illuminate\...\Fluent $column ) : string

Create the column definition for a string type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeTinyText ( Illuminate\...\Fluent $column ) : string

Create the column definition for a tiny text type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeText ( Illuminate\...\Fluent $column ) : string

Create the column definition for a text type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeMediumText ( Illuminate\...\Fluent $column ) : string

Create the column definition for a medium text type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeLongText ( Illuminate\...\Fluent $column ) : string

Create the column definition for a long text type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeInteger ( Illuminate\...\Fluent $column ) : string

Create the column definition for an integer type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeBigInteger ( Illuminate\...\Fluent $column ) : string

Create the column definition for a big integer type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeMediumInteger ( Illuminate\...\Fluent $column ) : string

Create the column definition for a medium integer type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeTinyInteger ( Illuminate\...\Fluent $column ) : string

Create the column definition for a tiny integer type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeSmallInteger ( Illuminate\...\Fluent $column ) : string

Create the column definition for a small integer type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeFloat ( Illuminate\...\Fluent $column ) : string

Create the column definition for a float type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeDouble ( Illuminate\...\Fluent $column ) : string

Create the column definition for a double type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeDecimal ( Illuminate\...\Fluent $column ) : string

Create the column definition for a decimal type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeBoolean ( Illuminate\...\Fluent $column ) : string

Create the column definition for a boolean type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeEnum ( Illuminate\...\Fluent $column ) : string

Create the column definition for an enumeration type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeJson ( Illuminate\...\Fluent $column ) : string

Create the column definition for a json type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeJsonb ( Illuminate\...\Fluent $column ) : string

Create the column definition for a jsonb type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeDate ( Illuminate\...\Fluent $column ) : string

Create the column definition for a date type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeDateTime ( Illuminate\...\Fluent $column ) : string

Create the column definition for a date-time type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeDateTimeTz ( Illuminate\...\Fluent $column ) : string

Create the column definition for a date-time (with time zone) type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeTime ( Illuminate\...\Fluent $column ) : string

Create the column definition for a time type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeTimeTz ( Illuminate\...\Fluent $column ) : string

Create the column definition for a time (with time zone) type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeTimestamp ( Illuminate\...\Fluent $column ) : string

Create the column definition for a timestamp type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeTimestampTz ( Illuminate\...\Fluent $column ) : string

Create the column definition for a timestamp (with time zone) type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeYear ( Illuminate\...\Fluent $column ) : string

Create the column definition for a year type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeBinary ( Illuminate\...\Fluent $column ) : string

Create the column definition for a binary type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeUuid ( Illuminate\...\Fluent $column ) : string

Create the column definition for a uuid type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeIpAddress ( Illuminate\...\Fluent $column ) : string

Create the column definition for an IP address type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeMacAddress ( Illuminate\...\Fluent $column ) : string

Create the column definition for a MAC address type.

Parameters

  • $column Illuminate\...\Fluent
public

typeGeometry ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial Geometry type.

Parameters

  • $column Illuminate\...\Fluent
public

typePoint ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial Point type.

Parameters

  • $column Illuminate\...\Fluent
public

typeLineString ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial LineString type.

Parameters

  • $column Illuminate\...\Fluent
public

typePolygon ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial Polygon type.

Parameters

  • $column Illuminate\...\Fluent
public

typeGeometryCollection ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial GeometryCollection type.

Parameters

  • $column Illuminate\...\Fluent
public

typeMultiPoint ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial MultiPoint type.

Parameters

  • $column Illuminate\...\Fluent
public

typeMultiLineString ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial MultiLineString type.

Parameters

  • $column Illuminate\...\Fluent
public

typeMultiPolygon ( Illuminate\...\Fluent $column ) : string

Create the column definition for a spatial MultiPolygon type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeComputed ( Illuminate\...\Fluent $column ) : string|null

Create the column definition for a generated, computed column type.

Parameters

  • $column Illuminate\...\Fluent
protected

modifyCollate ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null

Get the SQL for a collation column modifier.

Parameters

  • $blueprint Blueprint
  • $column Illuminate\...\Fluent
protected

modifyNullable ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null

Get the SQL for a nullable column modifier.

Parameters

  • $blueprint Blueprint
  • $column Illuminate\...\Fluent
protected

modifyDefault ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null

Get the SQL for a default column modifier.

Parameters

  • $blueprint Blueprint
  • $column Illuminate\...\Fluent
protected

modifyIncrement ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null

Get the SQL for an auto-increment column modifier.

Parameters

  • $blueprint Blueprint
  • $column Illuminate\...\Fluent
protected

modifyPersisted ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null

Get the SQL for a generated stored column modifier.

Parameters

  • $blueprint Blueprint
  • $column Illuminate\...\Fluent
public

wrapTable ( $table ) : string

Wrap a table in keyword identifiers.

Parameters

public

quoteString ( $value ) : string

Quote the given string literal.

Parameters

  • $value string|array