Schema management/reflection features for SQLServer.
string
'dbo'
_convertColumn( string $col , integer|null $length null , integer|null $precision null , integer|null $scale null )
Convert a column definition to the abstract types.
The returned type will be a type that Cake\Database\Type can handle.
$col
$length
optional null $precision
optional null $scale
optional null _convertOnClause( string $clause )
Convert string on clauses to the abstract ones.
$clause
Cake\Database\Schema\BaseSchema::_convertOnClause()
_defaultValue( string|null $default )
Manipulate the default value.
Sqlite includes quotes and bared NULLs in default values. We need to remove those.
$default
_foreignOnClause( string|null $on )
Generate an ON clause for a foreign key.
$on
Cake\Database\Schema\BaseSchema::_foreignOnClause()
_keySql( string $prefix , array $data )
Helper method for generating key SQL snippets.
$prefix
$data
addConstraintSql( Cake\Database\Schema\TableSchema $schema )
Generate the SQL queries needed to add foreign key constraints to the table
Cake\Database\Schema\TableSchema
$schema
columnSql( Cake\Database\Schema\TableSchema $schema , string $name )
Generate the SQL fragment for a single column in a table.
Cake\Database\Schema\TableSchema
$schema
$name
constraintSql( Cake\Database\Schema\TableSchema $schema , string $name )
Generate the SQL fragments for defining table constraints.
Cake\Database\Schema\TableSchema
$schema
$name
convertColumnDescription( Cake\Database\Schema\TableSchema $schema , array $row )
Convert field description results into abstract schema fields.
Cake\Database\Schema\TableSchema
$schema
$row
describeColumnSql
.convertForeignKeyDescription( Cake\Database\Schema\TableSchema $schema , array $row )
Convert a foreign key description into constraints on the Table object.
Cake\Database\Schema\TableSchema
$schema
The table object to append a constraint to.
$row
describeForeignKeySql
.convertIndexDescription( Cake\Database\Schema\TableSchema $schema , array $row )
Convert an index description results into abstract schema indexes or constraints.
Cake\Database\Schema\TableSchema
$schema
The table object to append an index or constraint to.
$row
describeIndexSql
.createTableSql( Cake\Database\Schema\TableSchema $schema , array $columns , array $constraints , array $indexes )
Generate the SQL to create a table.
Cake\Database\Schema\TableSchema
$schema
$columns
$constraints
$indexes
describeColumnSql( string $tableName , array $config )
Generate the SQL to describe a table.
$tableName
$config
describeForeignKeySql( string $tableName , array $config )
Generate the SQL to describe the foreign keys in a table.
$tableName
$config
describeIndexSql( string $tableName , array $config )
Generate the SQL to describe the indexes in a table.
$tableName
$config
dropConstraintSql( Cake\Database\Schema\TableSchema $schema )
Generate the SQL queries needed to drop foreign key constraints from the table
Cake\Database\Schema\TableSchema
$schema
indexSql( Cake\Database\Schema\TableSchema $schema , string $name )
Generate the SQL fragment for a single index in a table.
Cake\Database\Schema\TableSchema
$schema
$name
listTablesSql( array $config )
Generate the SQL to list the tables.
$config
The connection configuration to use for getting tables from.
truncateTableSql( Cake\Database\Schema\TableSchema $schema )
Generate the SQL to truncate a table.
Cake\Database\Schema\TableSchema
$schema
__construct( Cake\Database\Driver $driver )
Constructor
This constructor will connect the driver so that methods like columnSql() and others will fail when the driver has not been connected.
Cake\Database\Driver
$driver
_convertConstraintColumns( string|array $references )
Convert foreign key constraints references to a valid stringified list
$references
convertOptionsDescription( Cake\Database\Schema\TableSchema $schema , array $row )
Convert options data into table options.
Cake\Database\Schema\TableSchema
$schema
$row
describeOptionsSql( string $tableName , array $config )
Generate the SQL to describe table options
$tableName
$config
dropTableSql( Cake\Database\Schema\TableSchema $schema )
Generate the SQL to drop a table.
Cake\Database\Schema\TableSchema
$schema
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Database.Schema.SqlserverSchema.html