platform/api/laravel/Database/Schema/Grammars/MySqlGrammar.yaml

1169 lines
25 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: MySqlGrammar
class_comment: null
dependencies:
- name: Connection
type: class
source: Illuminate\Database\Connection
- name: Expression
type: class
source: Illuminate\Database\Query\Expression
- name: Blueprint
type: class
source: Illuminate\Database\Schema\Blueprint
- name: ColumnDefinition
type: class
source: Illuminate\Database\Schema\ColumnDefinition
- name: Fluent
type: class
source: Illuminate\Support\Fluent
- name: RuntimeException
type: class
source: RuntimeException
properties:
- name: modifiers
visibility: protected
comment: '# * The possible column modifiers.
# *
# * @var string[]'
- name: serials
visibility: protected
comment: '# * The possible column serials.
# *
# * @var string[]'
- name: fluentCommands
visibility: protected
comment: '# * The commands to be executed outside of create or alter command.
# *
# * @var string[]'
methods:
- name: compileCreateDatabase
visibility: public
parameters:
- name: name
- name: connection
comment: "# * The possible column modifiers.\n# *\n# * @var string[]\n# */\n# protected\
\ $modifiers = [\n# 'Unsigned', 'Charset', 'Collate', 'VirtualAs', 'StoredAs',\
\ 'Nullable',\n# 'Default', 'OnUpdate', 'Invisible', 'Increment', 'Comment', 'After',\
\ 'First',\n# ];\n# \n# /**\n# * The possible column serials.\n# *\n# * @var string[]\n\
# */\n# protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger',\
\ 'tinyInteger'];\n# \n# /**\n# * The commands to be executed outside of create\
\ or alter command.\n# *\n# * @var string[]\n# */\n# protected $fluentCommands\
\ = ['AutoIncrementStartingValues'];\n# \n# /**\n# * Compile a create database\
\ command.\n# *\n# * @param string $name\n# * @param \\Illuminate\\Database\\\
Connection $connection\n# * @return string"
- name: compileDropDatabaseIfExists
visibility: public
parameters:
- name: name
comment: '# * Compile a drop database if exists command.
# *
# * @param string $name
# * @return string'
- name: compileTables
visibility: public
parameters:
- name: database
comment: '# * Compile the query to determine the tables.
# *
# * @param string $database
# * @return string'
- name: compileViews
visibility: public
parameters:
- name: database
comment: '# * Compile the query to determine the views.
# *
# * @param string $database
# * @return string'
- name: compileColumns
visibility: public
parameters:
- name: database
- name: table
comment: '# * Compile the query to determine the columns.
# *
# * @param string $database
# * @param string $table
# * @return string'
- name: compileIndexes
visibility: public
parameters:
- name: database
- name: table
comment: '# * Compile the query to determine the indexes.
# *
# * @param string $database
# * @param string $table
# * @return string'
- name: compileForeignKeys
visibility: public
parameters:
- name: database
- name: table
comment: '# * Compile the query to determine the foreign keys.
# *
# * @param string $database
# * @param string $table
# * @return string'
- name: compileCreate
visibility: public
parameters:
- name: blueprint
- name: command
- name: connection
comment: '# * Compile a create table command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @param \Illuminate\Database\Connection $connection
# * @return string'
- name: compileCreateTable
visibility: protected
parameters:
- name: blueprint
- name: command
- name: connection
comment: '# * Create the main create table clause.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @param \Illuminate\Database\Connection $connection
# * @return string'
- name: compileCreateEncoding
visibility: protected
parameters:
- name: sql
- name: connection
- name: blueprint
comment: '# * Append the character set specifications to a command.
# *
# * @param string $sql
# * @param \Illuminate\Database\Connection $connection
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @return string'
- name: compileCreateEngine
visibility: protected
parameters:
- name: sql
- name: connection
- name: blueprint
comment: '# * Append the engine specifications to a command.
# *
# * @param string $sql
# * @param \Illuminate\Database\Connection $connection
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @return string'
- name: compileAdd
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile an add column command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileAutoIncrementStartingValues
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile the auto-incrementing column starting values.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileRenameColumn
visibility: public
parameters:
- name: blueprint
- name: command
- name: connection
comment: '# * Compile a rename column command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @param \Illuminate\Database\Connection $connection
# * @return array|string'
- name: compileLegacyRenameColumn
visibility: protected
parameters:
- name: blueprint
- name: command
- name: connection
comment: '# * Compile a rename column command for legacy versions of MySQL.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @param \Illuminate\Database\Connection $connection
# * @return string'
- name: compileChange
visibility: public
parameters:
- name: blueprint
- name: command
- name: connection
comment: '# * Compile a change column command into a series of SQL statements.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @param \Illuminate\Database\Connection $connection
# * @return array|string
# *
# * @throws \RuntimeException'
- name: compilePrimary
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a primary key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileUnique
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a unique key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileIndex
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a plain index key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileFullText
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a fulltext index key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileSpatialIndex
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a spatial index key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileKey
visibility: protected
parameters:
- name: blueprint
- name: command
- name: type
comment: '# * Compile an index creation command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @param string $type
# * @return string'
- name: compileDrop
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop table command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropIfExists
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop table (if exists) command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropColumn
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop column command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropPrimary
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop primary key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropUnique
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop unique key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropIndex
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop index command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropFullText
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop fulltext index command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropSpatialIndex
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop spatial index command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropForeign
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a drop foreign key command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileRename
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a rename table command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileRenameIndex
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a rename index command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: compileDropAllTables
visibility: public
parameters:
- name: tables
comment: '# * Compile the SQL needed to drop all tables.
# *
# * @param array $tables
# * @return string'
- name: compileDropAllViews
visibility: public
parameters:
- name: views
comment: '# * Compile the SQL needed to drop all views.
# *
# * @param array $views
# * @return string'
- name: compileEnableForeignKeyConstraints
visibility: public
parameters: []
comment: '# * Compile the command to enable foreign key constraints.
# *
# * @return string'
- name: compileDisableForeignKeyConstraints
visibility: public
parameters: []
comment: '# * Compile the command to disable foreign key constraints.
# *
# * @return string'
- name: compileTableComment
visibility: public
parameters:
- name: blueprint
- name: command
comment: '# * Compile a table comment command.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $command
# * @return string'
- name: typeChar
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a char type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeString
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a string type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeTinyText
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a tiny text type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeText
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a text type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeMediumText
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a medium text type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeLongText
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a long text type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeBigInteger
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a big integer type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeInteger
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for an integer type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeMediumInteger
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a medium integer type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeTinyInteger
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a tiny integer type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeSmallInteger
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a small integer type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeFloat
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a float type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeDouble
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a double type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeDecimal
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a decimal type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeBoolean
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a boolean type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeEnum
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for an enumeration type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeSet
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a set enumeration type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeJson
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a json type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeJsonb
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a jsonb type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeDate
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a date type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeDateTime
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a date-time type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeDateTimeTz
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a date-time (with time zone) type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeTime
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a time type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeTimeTz
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a time (with time zone) type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeTimestamp
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a timestamp type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeTimestampTz
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a timestamp (with time zone) type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeYear
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a year type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeBinary
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a binary type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeUuid
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a uuid type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeIpAddress
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for an IP address type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeMacAddress
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a MAC address type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeGeometry
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a spatial Geometry type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeGeography
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a spatial Geography type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return string'
- name: typeComputed
visibility: protected
parameters:
- name: column
comment: '# * Create the column definition for a generated, computed column type.
# *
# * @param \Illuminate\Support\Fluent $column
# * @return void
# *
# * @throws \RuntimeException'
- name: modifyVirtualAs
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a generated virtual column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyStoredAs
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a generated stored column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyUnsigned
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for an unsigned column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyCharset
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a character set column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyCollate
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a collation column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyNullable
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a nullable column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyInvisible
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for an invisible column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyDefault
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a default column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyOnUpdate
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for an "on update" column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyIncrement
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for an auto-increment column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyFirst
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a "first" column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyAfter
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for an "after" column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: modifyComment
visibility: protected
parameters:
- name: blueprint
- name: column
comment: '# * Get the SQL for a "comment" column modifier.
# *
# * @param \Illuminate\Database\Schema\Blueprint $blueprint
# * @param \Illuminate\Support\Fluent $column
# * @return string|null'
- name: wrapValue
visibility: protected
parameters:
- name: value
comment: '# * Wrap a single string in keyword identifiers.
# *
# * @param string $value
# * @return string'
- name: wrapJsonSelector
visibility: protected
parameters:
- name: value
comment: '# * Wrap the given JSON selector.
# *
# * @param string $value
# * @return string'
traits:
- Illuminate\Database\Connection
- Illuminate\Database\Query\Expression
- Illuminate\Database\Schema\Blueprint
- Illuminate\Database\Schema\ColumnDefinition
- Illuminate\Support\Fluent
- RuntimeException
interfaces: []