Grammar
abstract class Grammar extends Grammar
Properties
protected string | $tablePrefix | The grammar table prefix. |
from Grammar |
protected bool | $transactions | If this Grammar supports schema changes wrapped in a transaction. |
Methods
Wrap a value that has an alias.
Convert an array of column names into a delimited string.
Get the appropriate query parameter place-holder for a value.
Compile a rename column command.
Compile a change column command into a series of SQL statements.
Add the column modifiers to the definition.
Get the primary key command if it exists on the blueprint.
Add a prefix to an array of values.
Format a value so that it can be used in "default" clauses.
Create an empty Doctrine DBAL TableDiff from the Blueprint.
Check if this Grammar supports schema changes wrapped in a transaction.
Details
in
Grammar at line 22
array
wrapArray(array $values)
Wrap an array of values.
at line 192
string
wrapTable(Expression|string $table)
Wrap a table in keyword identifiers.
at line 206
string
wrap(Expression|string $value, bool $prefixAlias = false)
Wrap a value in keyword identifiers.
in
Grammar at line 72
protected string
wrapAliasedValue(string $value, bool $prefixAlias = false)
Wrap a value that has an alias.
in
Grammar at line 94
protected string
wrapSegments(array $segments)
Wrap the given value segments.
in
Grammar at line 109
protected string
wrapValue(string $value)
Wrap a single string in keyword identifiers.
in
Grammar at line 124
string
columnize(array $columns)
Convert an array of column names into a delimited string.
in
Grammar at line 135
string
parameterize(array $values)
Create query parameter place-holders for an array.
in
Grammar at line 146
string
parameter(mixed $value)
Get the appropriate query parameter place-holder for a value.
in
Grammar at line 157
bool
isExpression(mixed $value)
Determine if the given value is a raw expression.
in
Grammar at line 168
string
getValue(Expression $expression)
Get the value of a raw expression.
in
Grammar at line 178
string
getDateFormat()
Get the format for database stored dates.
in
Grammar at line 188
string
getTablePrefix()
Get the grammar's table prefix.
in
Grammar at line 199
$this
setTablePrefix(string $prefix)
Set the grammar's table prefix.
at line 30
array
compileRenameColumn(Blueprint $blueprint, Fluent $command, Connection $connection)
Compile a rename column command.
at line 45
array
compileChange(Blueprint $blueprint, Fluent $command, Connection $connection)
Compile a change column command into a series of SQL statements.
at line 57
string
compileForeign(Blueprint $blueprint, Fluent $command)
Compile a foreign key command.
at line 96
protected array
getColumns(Blueprint $blueprint)
Compile the blueprint's column definitions.
at line 118
protected string
getType(Fluent $column)
Get the SQL for the column data type.
at line 131
protected string
addModifiers(string $sql, Blueprint $blueprint, Fluent $column)
Add the column modifiers to the definition.
at line 149
protected Fluent|null
getCommandByName(Blueprint $blueprint, string $name)
Get the primary key command if it exists on the blueprint.
at line 165
protected array
getCommandsByName(Blueprint $blueprint, string $name)
Get all of the commands with a given name.
at line 179
array
prefixArray(string $prefix, array $values)
Add a prefix to an array of values.
at line 219
protected string
getDefaultValue(mixed $value)
Format a value so that it can be used in "default" clauses.
at line 237
TableDiff
getDoctrineTableDiff(Blueprint $blueprint, AbstractSchemaManager $schema)
Create an empty Doctrine DBAL TableDiff from the Blueprint.
at line 251
bool
supportsSchemaTransactions()
Check if this Grammar supports schema changes wrapped in a transaction.