You are viewing an older version of the documentation. For the latest, please visit master documentation.
abstract

Grammar

Extends

Properties

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 , Fluent $command , Connection $connection ) : array

Compile a rename column command.

Parameters

public

compileChange ( Blueprint $blueprint , Fluent $command , Connection $connection ) : array

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

Parameters

public

compileFulltext ( Blueprint $blueprint , Fluent $command ) : string

Compile a fulltext index key command.

Parameters

public

compileDropFullText ( Blueprint $blueprint , Fluent $command ) : string

Compile a drop fulltext index command.

Parameters

public

compileForeign ( Blueprint $blueprint , Fluent $command ) : string

Compile a foreign key command.

Parameters

protected

getColumns ( Blueprint $blueprint ) : array

Compile the blueprint's column definitions.

Parameters

protected

getType ( Fluent $column ) : string

Get the SQL for the column data type.

Parameters

protected

typeComputed ( Fluent $column ) : void

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

Parameters

protected

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

Add the column modifiers to the definition.

Parameters

protected

getCommandByName ( Blueprint $blueprint , $name ) : 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

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.