class Illuminate / Database / Schema / Grammars / MySqlGrammar
You are viewing an older version of the documentation. For the latest, please visit master documentation.

MySqlGrammar

Extends

Properties

protected

$modifiers string[]

The possible column modifiers.

Default: array
protected

$serials string[]

The possible column serials.

Default: array

Methods

public

compileCreateDatabase ( $name , $connection ) : string

Compile a create database command.

Parameters

public

compileDropDatabaseIfExists ( $name ) : string

Compile a drop database if exists command.

Parameters

  • $name string
public

compileTableExists ( ) : string

Compile the query to determine the list of tables.

public

compileColumnListing ( ) : string

Compile the query to determine the list of columns.

public

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

Compile a create table command.

Parameters

protected

compileCreateTable ( $blueprint , $command , $connection ) : array

Create the main create table clause.

Parameters

protected

compileCreateEncoding ( $sql , Connection $connection , Blueprint $blueprint ) : string

Append the character set specifications to a command.

Parameters

protected

compileCreateEngine ( $sql , Connection $connection , Blueprint $blueprint ) : string

Append the engine specifications to a command.

Parameters

public

compileAdd ( Blueprint $blueprint , Fluent $command ) : array

Compile an add column command.

Parameters

public

compileAutoIncrementStartingValues ( Blueprint $blueprint ) : array

Compile the auto-incrementing column starting values.

Parameters

public

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

Compile a primary key command.

Parameters

public

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

Compile a unique key command.

Parameters

public

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

Compile a plain index key command.

Parameters

public

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

Compile a fulltext index key command.

Parameters

public

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

Compile a spatial index key command.

Parameters

protected

compileKey ( Blueprint $blueprint , Fluent $command , $type ) : string

Compile an index creation command.

Parameters

public

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

Compile a drop table command.

Parameters

public

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

Compile a drop table (if exists) command.

Parameters

public

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

Compile a drop column command.

Parameters

public

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

Compile a drop primary key command.

Parameters

public

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

Compile a drop unique key command.

Parameters

public

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

Compile a drop index command.

Parameters

public

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

Compile a drop fulltext index command.

Parameters

public

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

Compile a drop spatial index command.

Parameters

public

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

Compile a drop foreign key command.

Parameters

public

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

Compile a rename table command.

Parameters

public

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

Compile a rename index command.

Parameters

public

compileDropAllTables ( $tables ) : string

Compile the SQL needed to drop all tables.

Parameters

  • $tables array
public

compileDropAllViews ( $views ) : string

Compile the SQL needed to drop all views.

Parameters

  • $views array
public

compileGetAllTables ( ) : string

Compile the SQL needed to retrieve all table names.

public

compileGetAllViews ( ) : string

Compile the SQL needed to retrieve all view names.

public

compileEnableForeignKeyConstraints ( ) : string

Compile the command to enable foreign key constraints.

public

compileDisableForeignKeyConstraints ( ) : string

Compile the command to disable foreign key constraints.

protected

typeChar ( Fluent $column ) : string

Create the column definition for a char type.

Parameters

protected

typeString ( Fluent $column ) : string

Create the column definition for a string type.

Parameters

protected

typeTinyText ( Fluent $column ) : string

Create the column definition for a tiny text type.

Parameters

protected

typeText ( Fluent $column ) : string

Create the column definition for a text type.

Parameters

protected

typeMediumText ( Fluent $column ) : string

Create the column definition for a medium text type.

Parameters

protected

typeLongText ( Fluent $column ) : string

Create the column definition for a long text type.

Parameters

protected

typeBigInteger ( Fluent $column ) : string

Create the column definition for a big integer type.

Parameters

protected

typeInteger ( Fluent $column ) : string

Create the column definition for an integer type.

Parameters

protected

typeMediumInteger ( Fluent $column ) : string

Create the column definition for a medium integer type.

Parameters

protected

typeTinyInteger ( Fluent $column ) : string

Create the column definition for a tiny integer type.

Parameters

protected

typeSmallInteger ( Fluent $column ) : string

Create the column definition for a small integer type.

Parameters

protected

typeFloat ( Fluent $column ) : string

Create the column definition for a float type.

Parameters

protected

typeDouble ( Fluent $column ) : string

Create the column definition for a double type.

Parameters

protected

typeDecimal ( Fluent $column ) : string

Create the column definition for a decimal type.

Parameters

protected

typeBoolean ( Fluent $column ) : string

Create the column definition for a boolean type.

Parameters

protected

typeEnum ( Fluent $column ) : string

Create the column definition for an enumeration type.

Parameters

protected

typeSet ( Fluent $column ) : string

Create the column definition for a set enumeration type.

Parameters

protected

typeJson ( Fluent $column ) : string

Create the column definition for a json type.

Parameters

protected

typeJsonb ( Fluent $column ) : string

Create the column definition for a jsonb type.

Parameters

protected

typeDate ( Fluent $column ) : string

Create the column definition for a date type.

Parameters

protected

typeDateTime ( Fluent $column ) : string

Create the column definition for a date-time type.

Parameters

protected

typeDateTimeTz ( Fluent $column ) : string

Create the column definition for a date-time (with time zone) type.

Parameters

protected

typeTime ( Fluent $column ) : string

Create the column definition for a time type.

Parameters

protected

typeTimeTz ( Fluent $column ) : string

Create the column definition for a time (with time zone) type.

Parameters

protected

typeTimestamp ( Fluent $column ) : string

Create the column definition for a timestamp type.

Parameters

protected

typeTimestampTz ( Fluent $column ) : string

Create the column definition for a timestamp (with time zone) type.

Parameters

protected

typeYear ( Fluent $column ) : string

Create the column definition for a year type.

Parameters

protected

typeBinary ( Fluent $column ) : string

Create the column definition for a binary type.

Parameters

protected

typeUuid ( Fluent $column ) : string

Create the column definition for a uuid type.

Parameters

protected

typeIpAddress ( Fluent $column ) : string

Create the column definition for an IP address type.

Parameters

protected

typeMacAddress ( Fluent $column ) : string

Create the column definition for a MAC address type.

Parameters

public

typeGeometry ( Fluent $column ) : string

Create the column definition for a spatial Geometry type.

Parameters

public

typePoint ( Fluent $column ) : string

Create the column definition for a spatial Point type.

Parameters

public

typeLineString ( Fluent $column ) : string

Create the column definition for a spatial LineString type.

Parameters

public

typePolygon ( Fluent $column ) : string

Create the column definition for a spatial Polygon type.

Parameters

public

typeGeometryCollection ( Fluent $column ) : string

Create the column definition for a spatial GeometryCollection type.

Parameters

public

typeMultiPoint ( Fluent $column ) : string

Create the column definition for a spatial MultiPoint type.

Parameters

public

typeMultiLineString ( Fluent $column ) : string

Create the column definition for a spatial MultiLineString type.

Parameters

public

typeMultiPolygon ( Fluent $column ) : string

Create the column definition for a spatial MultiPolygon type.

Parameters

protected

typeComputed ( Fluent $column ) : void

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

Parameters

protected

modifyVirtualAs ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a generated virtual column modifier.

Parameters

protected

modifyStoredAs ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a generated stored column modifier.

Parameters

protected

modifyUnsigned ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for an unsigned column modifier.

Parameters

protected

modifyCharset ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a character set column modifier.

Parameters

protected

modifyCollate ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a collation column modifier.

Parameters

protected

modifyNullable ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a nullable column modifier.

Parameters

protected

modifyInvisible ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for an invisible column modifier.

Parameters

protected

modifyDefault ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a default column modifier.

Parameters

protected

modifyIncrement ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for an auto-increment column modifier.

Parameters

protected

modifyFirst ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a "first" column modifier.

Parameters

protected

modifyAfter ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for an "after" column modifier.

Parameters

protected

modifyComment ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a "comment" column modifier.

Parameters

protected

modifySrid ( Blueprint $blueprint , Fluent $column ) : string|null

Get the SQL for a SRID column modifier.

Parameters

protected

wrapValue ( $value ) : string

Wrap a single string in keyword identifiers.

Parameters

  • $value string