MySqlGrammar
Extends
Properties
$modifiers string[]
The possible column modifiers.
$serials string[]
The possible column serials.
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 , Fluent $command , Connection $connection ) : array
Compile a create table command.
Parameters
- $blueprint Blueprint
- $command Fluent
- $connection Connection
compileCreateTable ( $blueprint , $command , $connection ) : array
Create the main create table clause.
Parameters
- $blueprint Blueprint
- $command 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 , Fluent $command ) : array
Compile an add column command.
Parameters
compileAutoIncrementStartingValues ( Blueprint $blueprint ) : array
Compile the auto-incrementing column starting values.
Parameters
- $blueprint Blueprint
compilePrimary ( Blueprint $blueprint , Fluent $command ) : string
Compile a primary key command.
Parameters
compileUnique ( Blueprint $blueprint , Fluent $command ) : string
Compile a unique key command.
Parameters
compileIndex ( Blueprint $blueprint , Fluent $command ) : string
Compile a plain index key command.
Parameters
compileFullText ( Blueprint $blueprint , Fluent $command ) : string
Compile a fulltext index key command.
Parameters
compileSpatialIndex ( Blueprint $blueprint , Fluent $command ) : string
Compile a spatial index key command.
Parameters
compileKey ( Blueprint $blueprint , Fluent $command , $type ) : string
Compile an index creation command.
Parameters
compileDrop ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop table command.
Parameters
compileDropIfExists ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop table (if exists) command.
Parameters
compileDropColumn ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop column command.
Parameters
compileDropPrimary ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop primary key command.
Parameters
compileDropUnique ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop unique key command.
Parameters
compileDropIndex ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop index command.
Parameters
compileDropFullText ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop fulltext index command.
Parameters
compileDropSpatialIndex ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop spatial index command.
Parameters
compileDropForeign ( Blueprint $blueprint , Fluent $command ) : string
Compile a drop foreign key command.
Parameters
compileRename ( Blueprint $blueprint , Fluent $command ) : string
Compile a rename table command.
Parameters
compileRenameIndex ( Blueprint $blueprint , Fluent $command ) : string
Compile a rename index command.
Parameters
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.
typeChar ( Fluent $column ) : string
Create the column definition for a char type.
Parameters
- $column Fluent
typeString ( Fluent $column ) : string
Create the column definition for a string type.
Parameters
- $column Fluent
typeTinyText ( Fluent $column ) : string
Create the column definition for a tiny text type.
Parameters
- $column Fluent
typeText ( Fluent $column ) : string
Create the column definition for a text type.
Parameters
- $column Fluent
typeMediumText ( Fluent $column ) : string
Create the column definition for a medium text type.
Parameters
- $column Fluent
typeLongText ( Fluent $column ) : string
Create the column definition for a long text type.
Parameters
- $column Fluent
typeBigInteger ( Fluent $column ) : string
Create the column definition for a big integer type.
Parameters
- $column Fluent
typeInteger ( Fluent $column ) : string
Create the column definition for an integer type.
Parameters
- $column Fluent
typeMediumInteger ( Fluent $column ) : string
Create the column definition for a medium integer type.
Parameters
- $column Fluent
typeTinyInteger ( Fluent $column ) : string
Create the column definition for a tiny integer type.
Parameters
- $column Fluent
typeSmallInteger ( Fluent $column ) : string
Create the column definition for a small integer type.
Parameters
- $column Fluent
typeFloat ( Fluent $column ) : string
Create the column definition for a float type.
Parameters
- $column Fluent
typeDouble ( Fluent $column ) : string
Create the column definition for a double type.
Parameters
- $column Fluent
typeDecimal ( Fluent $column ) : string
Create the column definition for a decimal type.
Parameters
- $column Fluent
typeBoolean ( Fluent $column ) : string
Create the column definition for a boolean type.
Parameters
- $column Fluent
typeEnum ( Fluent $column ) : string
Create the column definition for an enumeration type.
Parameters
- $column Fluent
typeSet ( Fluent $column ) : string
Create the column definition for a set enumeration type.
Parameters
- $column Fluent
typeJson ( Fluent $column ) : string
Create the column definition for a json type.
Parameters
- $column Fluent
typeJsonb ( Fluent $column ) : string
Create the column definition for a jsonb type.
Parameters
- $column Fluent
typeDate ( Fluent $column ) : string
Create the column definition for a date type.
Parameters
- $column Fluent
typeDateTime ( Fluent $column ) : string
Create the column definition for a date-time type.
Parameters
- $column Fluent
typeDateTimeTz ( Fluent $column ) : string
Create the column definition for a date-time (with time zone) type.
Parameters
- $column Fluent
typeTime ( Fluent $column ) : string
Create the column definition for a time type.
Parameters
- $column Fluent
typeTimeTz ( Fluent $column ) : string
Create the column definition for a time (with time zone) type.
Parameters
- $column Fluent
typeTimestamp ( Fluent $column ) : string
Create the column definition for a timestamp type.
Parameters
- $column Fluent
typeTimestampTz ( Fluent $column ) : string
Create the column definition for a timestamp (with time zone) type.
Parameters
- $column Fluent
typeYear ( Fluent $column ) : string
Create the column definition for a year type.
Parameters
- $column Fluent
typeBinary ( Fluent $column ) : string
Create the column definition for a binary type.
Parameters
- $column Fluent
typeUuid ( Fluent $column ) : string
Create the column definition for a uuid type.
Parameters
- $column Fluent
typeIpAddress ( Fluent $column ) : string
Create the column definition for an IP address type.
Parameters
- $column Fluent
typeMacAddress ( Fluent $column ) : string
Create the column definition for a MAC address type.
Parameters
- $column Fluent
typeGeometry ( Fluent $column ) : string
Create the column definition for a spatial Geometry type.
Parameters
- $column Fluent
typePoint ( Fluent $column ) : string
Create the column definition for a spatial Point type.
Parameters
- $column Fluent
typeLineString ( Fluent $column ) : string
Create the column definition for a spatial LineString type.
Parameters
- $column Fluent
typePolygon ( Fluent $column ) : string
Create the column definition for a spatial Polygon type.
Parameters
- $column Fluent
typeGeometryCollection ( Fluent $column ) : string
Create the column definition for a spatial GeometryCollection type.
Parameters
- $column Fluent
typeMultiPoint ( Fluent $column ) : string
Create the column definition for a spatial MultiPoint type.
Parameters
- $column Fluent
typeMultiLineString ( Fluent $column ) : string
Create the column definition for a spatial MultiLineString type.
Parameters
- $column Fluent
typeMultiPolygon ( Fluent $column ) : string
Create the column definition for a spatial MultiPolygon type.
Parameters
- $column Fluent
typeComputed ( Fluent $column ) : void
Create the column definition for a generated, computed column type.
Parameters
- $column Fluent
modifyVirtualAs ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a generated virtual column modifier.
Parameters
modifyStoredAs ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a generated stored column modifier.
Parameters
modifyUnsigned ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for an unsigned column modifier.
Parameters
modifyCharset ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a character set column modifier.
Parameters
modifyCollate ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a collation column modifier.
Parameters
modifyNullable ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a nullable column modifier.
Parameters
modifyInvisible ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for an invisible column modifier.
Parameters
modifyDefault ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a default column modifier.
Parameters
modifyIncrement ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for an auto-increment column modifier.
Parameters
modifyFirst ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a "first" column modifier.
Parameters
modifyAfter ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for an "after" column modifier.
Parameters
modifyComment ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a "comment" column modifier.
Parameters
modifySrid ( Blueprint $blueprint , Fluent $column ) : string|null
Get the SQL for a SRID column modifier.
Parameters
wrapValue ( $value ) : string
Wrap a single string in keyword identifiers.
Parameters
- $value string