Grammar
Extends
Properties
$transactions bool
If this Grammar supports schema changes wrapped in a transaction.
$fluentCommands array
The commands to be executed outside of create or alter command.
Methods
compileCreateDatabase ( $name , $connection ) : void
Compile a create database command.
Parameters
- $name string
- $connection Connection
compileDropDatabaseIfExists ( $name ) : void
Compile a drop database if exists command.
Parameters
- $name string
compileRenameColumn ( Blueprint $blueprint , Fluent $command , Connection $connection ) : array
Compile a rename column command.
Parameters
- $blueprint Blueprint
- $command Fluent
- $connection Connection
compileChange ( Blueprint $blueprint , Fluent $command , Connection $connection ) : array
Compile a change column command into a series of SQL statements.
Parameters
- $blueprint Blueprint
- $command Fluent
- $connection Connection
compileFulltext ( Blueprint $blueprint , Fluent $command ) : string
Compile a fulltext index key command.
Parameters
compileDropFullText ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop fulltext index command.
Parameters
compileForeign ( Blueprint $blueprint , Fluent $command ) : string
Compile a foreign key command.
Parameters
getColumns ( Blueprint $blueprint ) : array
Compile the blueprint's column definitions.
Parameters
- $blueprint Blueprint
getType ( Fluent $column ) : string
Get the SQL for the column data type.
Parameters
- $column Fluent
typeComputed ( Fluent $column ) : void
Create the column definition for a generated, computed column type.
Parameters
- $column Fluent
addModifiers ( $sql , Blueprint $blueprint , Fluent $column ) : string
Add the column modifiers to the definition.
Parameters
getCommandByName ( Blueprint $blueprint , $name ) : Fluent |null
Get the primary key command if it exists on the blueprint.
Parameters
- $blueprint Blueprint
- $name string
getCommandsByName ( Blueprint $blueprint , $name ) : array
Get all of the commands with a given name.
Parameters
- $blueprint Blueprint
- $name string
prefixArray ( $prefix , array $values ) : array
Add a prefix to an array of values.
Parameters
- $prefix string
- $values array
wrapTable ( $table ) : string
Wrap a table in keyword identifiers.
Parameters
- $table mixed
wrap ( $value , $prefixAlias ) : string
Wrap a value in keyword identifiers.
Parameters
- $value Expression |string
- $prefixAlias bool
getDefaultValue ( $value ) : string
Format a value so that it can be used in "default" clauses.
Parameters
- $value mixed
getDoctrineTableDiff ( Blueprint $blueprint , Doctrine\...\AbstractSchemaManager $schema ) : Doctrine\...\TableDiff
Create an empty Doctrine DBAL TableDiff from the Blueprint.
Parameters
- $blueprint Blueprint
- $schema Doctrine\...\AbstractSchemaManager
getFluentCommands ( ) : array
Get the fluent commands for the grammar.
supportsSchemaTransactions ( ) : bool
Check if this Grammar supports schema changes wrapped in a transaction.