You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
abstract

Grammar

Extends

Uses

Properties

protected

$modifiers string[]

The possible column modifiers.

Default: []
protected

$transactions bool

If this Grammar supports schema changes wrapped in a transaction.

Default: false
protected

$fluentCommands array

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

Default: []

Methods

public

compileCreateDatabase ( $name , $connection ) : void

Compile a create database command.

Parameters

public

compileDropDatabaseIfExists ( $name ) : void

Compile a drop database if exists command.

Parameters

  • $name string
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

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

Compile a fulltext index key command.

Parameters

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

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

Compile a drop fulltext index command.

Parameters

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

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

Compile a foreign key command.

Parameters

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

getColumns ( Blueprint $blueprint ) : array

Compile the blueprint's added column definitions.

Parameters

protected

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

Get the SQL for the column data type.

Parameters

  • $column Illuminate\...\Fluent
protected

typeComputed ( Illuminate\...\Fluent $column ) : void

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

Parameters

  • $column Illuminate\...\Fluent
protected

addModifiers ( $sql , Blueprint $blueprint , Illuminate\...\Fluent $column ) : string

Add the column modifiers to the definition.

Parameters

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

getCommandByName ( Blueprint $blueprint , $name ) : Illuminate\...\Fluent|null

Get the primary key command if it exists on the blueprint.

Parameters

protected

getCommandsByName ( Blueprint $blueprint , $name ) : array

Get all of the commands with a given name.

Parameters

public

prefixArray ( $prefix , array $values ) : array

Add a prefix to an array of values.

Parameters

  • $prefix string
  • $values array
public

wrapTable ( $table ) : string

Wrap a table in keyword identifiers.

Parameters

  • $table mixed
public

wrap ( $value , $prefixAlias ) : string

Wrap a value in keyword identifiers.

Parameters

  • $value Illuminate\...\Fluent|Expression |string
  • $prefixAlias bool
protected

getDefaultValue ( $value ) : string

Format a value so that it can be used in "default" clauses.

Parameters

  • $value mixed
public

getDoctrineTableDiff ( Blueprint $blueprint , Doctrine\...\AbstractSchemaManager $schema ) : Doctrine\...\TableDiff

Create an empty Doctrine DBAL TableDiff from the Blueprint.

Parameters

  • $blueprint Blueprint
  • $schema Doctrine\...\AbstractSchemaManager
public

getFluentCommands ( ) : array

Get the fluent commands for the grammar.

public

supportsSchemaTransactions ( ) : bool

Check if this Grammar supports schema changes wrapped in a transaction.