SqlGeneratorInterface
in
An interface used by TableSchema objects.
Table of Contents
Methods
- addConstraintSql() : array<string|int, mixed>
- Generate the SQL statements to add the constraints to the table
- createSql() : array<string|int, mixed>
- Generate the SQL to create the Table.
- dropConstraintSql() : array<string|int, mixed>
- Generate the SQL statements to drop the constraints to the table
- dropSql() : array<string|int, mixed>
- Generate the SQL to drop a table.
- truncateSql() : array<string|int, mixed>
- Generate the SQL statements to truncate a table
Methods
addConstraintSql()
Generate the SQL statements to add the constraints to the table
public
addConstraintSql(Connection $connection) : array<string|int, mixed>
Parameters
- $connection : Connection
-
The connection to generate SQL for.
Return values
array<string|int, mixed> —SQL to add the constraints.
createSql()
Generate the SQL to create the Table.
public
createSql(Connection $connection) : array<string|int, mixed>
Uses the connection to access the schema dialect to generate platform specific SQL.
Parameters
- $connection : Connection
-
The connection to generate SQL for.
Return values
array<string|int, mixed> —List of SQL statements to create the table and the required indexes.
dropConstraintSql()
Generate the SQL statements to drop the constraints to the table
public
dropConstraintSql(Connection $connection) : array<string|int, mixed>
Parameters
- $connection : Connection
-
The connection to generate SQL for.
Return values
array<string|int, mixed> —SQL to drop a table.
dropSql()
Generate the SQL to drop a table.
public
dropSql(Connection $connection) : array<string|int, mixed>
Uses the connection to access the schema dialect to generate platform specific SQL.
Parameters
- $connection : Connection
-
The connection to generate SQL for.
Return values
array<string|int, mixed> —SQL to drop a table.
truncateSql()
Generate the SQL statements to truncate a table
public
truncateSql(Connection $connection) : array<string|int, mixed>
Parameters
- $connection : Connection
-
The connection to generate SQL for.
Return values
array<string|int, mixed> —SQL to truncate a table.