$wrapper
$wrapper : string
The keyword identifier for the database system.
$connection : \Laravel\Database\Connection
The database connection instance for the grammar.
foreign(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for creating a foreign key.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a drop table command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
__construct(\Laravel\Database\Connection $connection) : void
Create a new database grammar instance.
LaravelDatabaseConnection | $connection |
parameterize(array $values) : string
Create query parameters from an array of values.
Returns "?, ?, ?", which may be used as PDO place-holders $parameters = $grammar->parameterize(array(1, 2, 3));
// Returns "?, "Taylor"" since an expression is used
$parameters = $grammar->parameterize(array(1, DB::raw('Taylor')));
array | $values |
parameter(mixed $value) : string
Get the appropriate query parameter string for a value.
// Returns a "?" PDO place-holder $value = $grammar->parameter('Taylor Otwell');
// Returns "Taylor Otwell" as the raw value of the expression
$value = $grammar->parameter(DB::raw('Taylor Otwell'));
mixed | $value |
create(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : array
Generate the SQL statements for a table creation command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
add(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : array
Generate the SQL statements for a table modification command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
primary(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for creating a primary key.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
unique(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for creating a unique index.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
fulltext(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for creating a full-text index.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
index(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for creating a regular index.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
rename(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a rename table command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop_column(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a drop column command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop_primary(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a drop primary key command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop_unique(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a drop unique key command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop_fulltext(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a drop full-text key command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop_index(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a drop unique key command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop_foreign(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Drop a foreign key constraint from the table.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
drop_constraint(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Drop a constraint from the table.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
type(\Laravel\Fluent $column) : string
Get the appropriate data type definition for the column.
LaravelFluent | $column |
columns(\Laravel\Database\Schema\Table $table) : array
Create the individual column definitions for the table.
LaravelDatabaseSchemaTable | $table |
unsigned(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $column) : string
Get the SQL syntax for indicating if a column is unsigned.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $column |
nullable(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $column) : string
Get the SQL syntax for indicating if a column is nullable.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $column |
defaults(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $column) : string
Get the SQL syntax for specifying a default value on a column.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $column |
incrementer(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $column) : string
Get the SQL syntax for defining an auto-incrementing column.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $column |
key(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command, string $type) : string
Generate the SQL statement for creating a new index.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command | |
string | $type |
drop_key(\Laravel\Database\Schema\Table $table, \Laravel\Fluent $command) : string
Generate the SQL statement for a drop key command.
LaravelDatabaseSchemaTable | $table | |
LaravelFluent | $command |
type_string(\Laravel\Fluent $column) : string
Generate the data-type definition for a string.
LaravelFluent | $column |
type_integer(\Laravel\Fluent $column) : string
Generate the data-type definition for an integer.
LaravelFluent | $column |
type_float(\Laravel\Fluent $column) : string
Generate the data-type definition for an integer.
LaravelFluent | $column |
type_decimal(\Laravel\Fluent $column) : string
Generate the data-type definition for a decimal.
LaravelFluent | $column |
type_boolean(\Laravel\Fluent $column) : string
Generate the data-type definition for a boolean.
LaravelFluent | $column |
type_date(\Laravel\Fluent $column) : string
Generate the data-type definition for a date.
LaravelFluent | $column |
type_timestamp(\Laravel\Fluent $column) : string
Generate the data-type definition for a timestamp.
LaravelFluent | $column |
type_text(\Laravel\Fluent $column) : string
Generate the data-type definition for a text column.
LaravelFluent | $column |
type_blob(\Laravel\Fluent $column) : string
Generate the data-type definition for a blob.
LaravelFluent | $column |
Documentation created by phpDocumentor