MySqlGrammar
Extends
Properties
$modifiers string[]
The possible column modifiers.
$serials string[]
The possible column serials.
$fluentCommands string[]
The commands to be executed outside of create or alter command.
Methods
compileCreateDatabase ( $name , $connection ) : string
Compile a create database command.
Parameters
- $name string
- $connection Connection
compileDropDatabaseIfExists ( $name ) : string
Compile a drop database if exists command.
Parameters
- $name string
compileTableExists ( ) : string
Compile the query to determine the list of tables.
compileColumnListing ( ) : string
Compile the query to determine the list of columns.
compileCreate ( Blueprint $blueprint , Illuminate\...\Fluent $command , Connection $connection ) : string
Compile a create table command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
- $connection Connection
compileCreateTable ( $blueprint , $command , $connection ) : string
Create the main create table clause.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
- $connection Connection
compileCreateEncoding ( $sql , Connection $connection , Blueprint $blueprint ) : string
Append the character set specifications to a command.
Parameters
- $sql string
- $connection Connection
- $blueprint Blueprint
compileCreateEngine ( $sql , Connection $connection , Blueprint $blueprint ) : string
Append the engine specifications to a command.
Parameters
- $sql string
- $connection Connection
- $blueprint Blueprint
compileAdd ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile an add column command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileAutoIncrementStartingValues ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile the auto-incrementing column starting values.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileRenameColumn ( Blueprint $blueprint , Illuminate\...\Fluent $command , Connection $connection ) : array|string
Compile a rename column command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
- $connection Connection
compileChange ( Blueprint $blueprint , Illuminate\...\Fluent $command , Connection $connection ) : array|string
Compile a change column command into a series of SQL statements.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
- $connection Connection
compilePrimary ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a primary key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileUnique ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a unique key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a plain index key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileFullText ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a fulltext index key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileSpatialIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a spatial index key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileKey ( Blueprint $blueprint , Illuminate\...\Fluent $command , $type ) : string
Compile an index creation command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
- $type string
compileDrop ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop table command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropIfExists ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop table (if exists) command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropColumn ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop column command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropPrimary ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop primary key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropUnique ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop unique key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop index command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropFullText ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop fulltext index command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropSpatialIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop spatial index command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropForeign ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a drop foreign key command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileRename ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a rename table command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileRenameIndex ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a rename index command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
compileDropAllTables ( $tables ) : string
Compile the SQL needed to drop all tables.
Parameters
- $tables array
compileDropAllViews ( $views ) : string
Compile the SQL needed to drop all views.
Parameters
- $views array
compileGetAllTables ( ) : string
Compile the SQL needed to retrieve all table names.
compileGetAllViews ( ) : string
Compile the SQL needed to retrieve all view names.
compileEnableForeignKeyConstraints ( ) : string
Compile the command to enable foreign key constraints.
compileDisableForeignKeyConstraints ( ) : string
Compile the command to disable foreign key constraints.
compileTableComment ( Blueprint $blueprint , Illuminate\...\Fluent $command ) : string
Compile a table comment command.
Parameters
- $blueprint Blueprint
- $command Illuminate\...\Fluent
typeChar ( Illuminate\...\Fluent $column ) : string
Create the column definition for a char type.
Parameters
- $column Illuminate\...\Fluent
typeString ( Illuminate\...\Fluent $column ) : string
Create the column definition for a string type.
Parameters
- $column Illuminate\...\Fluent
typeTinyText ( Illuminate\...\Fluent $column ) : string
Create the column definition for a tiny text type.
Parameters
- $column Illuminate\...\Fluent
typeText ( Illuminate\...\Fluent $column ) : string
Create the column definition for a text type.
Parameters
- $column Illuminate\...\Fluent
typeMediumText ( Illuminate\...\Fluent $column ) : string
Create the column definition for a medium text type.
Parameters
- $column Illuminate\...\Fluent
typeLongText ( Illuminate\...\Fluent $column ) : string
Create the column definition for a long text type.
Parameters
- $column Illuminate\...\Fluent
typeBigInteger ( Illuminate\...\Fluent $column ) : string
Create the column definition for a big integer type.
Parameters
- $column Illuminate\...\Fluent
typeInteger ( Illuminate\...\Fluent $column ) : string
Create the column definition for an integer type.
Parameters
- $column Illuminate\...\Fluent
typeMediumInteger ( Illuminate\...\Fluent $column ) : string
Create the column definition for a medium integer type.
Parameters
- $column Illuminate\...\Fluent
typeTinyInteger ( Illuminate\...\Fluent $column ) : string
Create the column definition for a tiny integer type.
Parameters
- $column Illuminate\...\Fluent
typeSmallInteger ( Illuminate\...\Fluent $column ) : string
Create the column definition for a small integer type.
Parameters
- $column Illuminate\...\Fluent
typeFloat ( Illuminate\...\Fluent $column ) : string
Create the column definition for a float type.
Parameters
- $column Illuminate\...\Fluent
typeDouble ( Illuminate\...\Fluent $column ) : string
Create the column definition for a double type.
Parameters
- $column Illuminate\...\Fluent
typeDecimal ( Illuminate\...\Fluent $column ) : string
Create the column definition for a decimal type.
Parameters
- $column Illuminate\...\Fluent
typeBoolean ( Illuminate\...\Fluent $column ) : string
Create the column definition for a boolean type.
Parameters
- $column Illuminate\...\Fluent
typeEnum ( Illuminate\...\Fluent $column ) : string
Create the column definition for an enumeration type.
Parameters
- $column Illuminate\...\Fluent
typeSet ( Illuminate\...\Fluent $column ) : string
Create the column definition for a set enumeration type.
Parameters
- $column Illuminate\...\Fluent
typeJson ( Illuminate\...\Fluent $column ) : string
Create the column definition for a json type.
Parameters
- $column Illuminate\...\Fluent
typeJsonb ( Illuminate\...\Fluent $column ) : string
Create the column definition for a jsonb type.
Parameters
- $column Illuminate\...\Fluent
typeDate ( Illuminate\...\Fluent $column ) : string
Create the column definition for a date type.
Parameters
- $column Illuminate\...\Fluent
typeDateTime ( Illuminate\...\Fluent $column ) : string
Create the column definition for a date-time type.
Parameters
- $column Illuminate\...\Fluent
typeDateTimeTz ( Illuminate\...\Fluent $column ) : string
Create the column definition for a date-time (with time zone) type.
Parameters
- $column Illuminate\...\Fluent
typeTime ( Illuminate\...\Fluent $column ) : string
Create the column definition for a time type.
Parameters
- $column Illuminate\...\Fluent
typeTimeTz ( Illuminate\...\Fluent $column ) : string
Create the column definition for a time (with time zone) type.
Parameters
- $column Illuminate\...\Fluent
typeTimestamp ( Illuminate\...\Fluent $column ) : string
Create the column definition for a timestamp type.
Parameters
- $column Illuminate\...\Fluent
typeTimestampTz ( Illuminate\...\Fluent $column ) : string
Create the column definition for a timestamp (with time zone) type.
Parameters
- $column Illuminate\...\Fluent
typeYear ( Illuminate\...\Fluent $column ) : string
Create the column definition for a year type.
Parameters
- $column Illuminate\...\Fluent
typeBinary ( Illuminate\...\Fluent $column ) : string
Create the column definition for a binary type.
Parameters
- $column Illuminate\...\Fluent
typeUuid ( Illuminate\...\Fluent $column ) : string
Create the column definition for a uuid type.
Parameters
- $column Illuminate\...\Fluent
typeIpAddress ( Illuminate\...\Fluent $column ) : string
Create the column definition for an IP address type.
Parameters
- $column Illuminate\...\Fluent
typeMacAddress ( Illuminate\...\Fluent $column ) : string
Create the column definition for a MAC address type.
Parameters
- $column Illuminate\...\Fluent
typeGeometry ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial Geometry type.
Parameters
- $column Illuminate\...\Fluent
typePoint ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial Point type.
Parameters
- $column Illuminate\...\Fluent
typeLineString ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial LineString type.
Parameters
- $column Illuminate\...\Fluent
typePolygon ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial Polygon type.
Parameters
- $column Illuminate\...\Fluent
typeGeometryCollection ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial GeometryCollection type.
Parameters
- $column Illuminate\...\Fluent
typeMultiPoint ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial MultiPoint type.
Parameters
- $column Illuminate\...\Fluent
typeMultiLineString ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial MultiLineString type.
Parameters
- $column Illuminate\...\Fluent
typeMultiPolygon ( Illuminate\...\Fluent $column ) : string
Create the column definition for a spatial MultiPolygon type.
Parameters
- $column Illuminate\...\Fluent
typeComputed ( Illuminate\...\Fluent $column ) : void
Create the column definition for a generated, computed column type.
Parameters
- $column Illuminate\...\Fluent
modifyVirtualAs ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a generated virtual column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyStoredAs ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a generated stored column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyUnsigned ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for an unsigned column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyCharset ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a character set column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyCollate ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a collation column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyNullable ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a nullable column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyInvisible ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for an invisible column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyDefault ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a default column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyOnUpdate ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for an "on update" column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyIncrement ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for an auto-increment column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyFirst ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a "first" column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyAfter ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for an "after" column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifyComment ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a "comment" column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
modifySrid ( Blueprint $blueprint , Illuminate\...\Fluent $column ) : string|null
Get the SQL for a SRID column modifier.
Parameters
- $blueprint Blueprint
- $column Illuminate\...\Fluent
wrapValue ( $value ) : string
Wrap a single string in keyword identifiers.
Parameters
- $value string
wrapJsonSelector ( $value ) : string
Wrap the given JSON selector.
Parameters
- $value string