PHP Класс Cake\Database\Schema\PostgresSchema

Наследование: extends Cake\Database\Schema\BaseSchema
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
addConstraintSql ( Cake\Database\Schema\Table $table ) {@inheritDoc}
columnSql ( Cake\Database\Schema\Table $table, $name ) {@inheritDoc}
constraintSql ( Cake\Database\Schema\Table $table, $name ) {@inheritDoc}
convertColumnDescription ( Cake\Database\Schema\Table $table, $row ) {@inheritDoc}
convertForeignKeyDescription ( Cake\Database\Schema\Table $table, $row ) {@inheritDoc}
convertIndexDescription ( Cake\Database\Schema\Table $table, $row ) {@inheritDoc}
createTableSql ( Cake\Database\Schema\Table $table, $columns, $constraints, $indexes ) {@inheritDoc}
describeColumnSql ( $tableName, $config ) {@inheritDoc}
describeForeignKeySql ( $tableName, $config ) {@inheritDoc}
describeIndexSql ( $tableName, $config ) {@inheritDoc}
dropConstraintSql ( Cake\Database\Schema\Table $table ) {@inheritDoc}
dropTableSql ( Cake\Database\Schema\Table $table ) : array Generate the SQL to drop a table.
indexSql ( Cake\Database\Schema\Table $table, $name ) {@inheritDoc}
listTablesSql ( $config ) {@inheritDoc}
truncateTableSql ( Cake\Database\Schema\Table $table ) {@inheritDoc}

Защищенные методы

Метод Описание
_convertColumn ( string $column ) : array Convert a column definition to the abstract types.
_convertConstraint ( Cake\Database\Schema\Table $table, string $name, string $type, array $row ) : void Add/update a constraint into the schema object.
_convertOnClause ( $clause ) {@inheritDoc}
_defaultValue ( string | null $default ) : string | null Manipulate the default value.
_keySql ( string $prefix, array $data ) : string Helper method for generating key SQL snippets.

Описание методов

_convertColumn() защищенный Метод

The returned type will be a type that Cake\Database\Type can handle.
protected _convertColumn ( string $column ) : array
$column string The column type + length
Результат array Array of column information.

_convertConstraint() защищенный Метод

Add/update a constraint into the schema object.
protected _convertConstraint ( Cake\Database\Schema\Table $table, string $name, string $type, array $row ) : void
$table Cake\Database\Schema\Table The table to update.
$name string The index name.
$type string The index type.
$row array The metadata record to update with.
Результат void

_convertOnClause() защищенный Метод

{@inheritDoc}
protected _convertOnClause ( $clause )

_defaultValue() защищенный Метод

Postgres includes sequence data and casting information in default values. We need to remove those.
protected _defaultValue ( string | null $default ) : string | null
$default string | null The default value.
Результат string | null

_keySql() защищенный Метод

Helper method for generating key SQL snippets.
protected _keySql ( string $prefix, array $data ) : string
$prefix string The key prefix
$data array Key data.
Результат string

addConstraintSql() публичный Метод

{@inheritDoc}
public addConstraintSql ( Cake\Database\Schema\Table $table )
$table Cake\Database\Schema\Table

columnSql() публичный Метод

{@inheritDoc}
public columnSql ( Cake\Database\Schema\Table $table, $name )
$table Cake\Database\Schema\Table

constraintSql() публичный Метод

{@inheritDoc}
public constraintSql ( Cake\Database\Schema\Table $table, $name )
$table Cake\Database\Schema\Table

convertColumnDescription() публичный Метод

{@inheritDoc}
public convertColumnDescription ( Cake\Database\Schema\Table $table, $row )
$table Cake\Database\Schema\Table

convertForeignKeyDescription() публичный Метод

{@inheritDoc}
public convertForeignKeyDescription ( Cake\Database\Schema\Table $table, $row )
$table Cake\Database\Schema\Table

convertIndexDescription() публичный Метод

{@inheritDoc}
public convertIndexDescription ( Cake\Database\Schema\Table $table, $row )
$table Cake\Database\Schema\Table

createTableSql() публичный Метод

{@inheritDoc}
public createTableSql ( Cake\Database\Schema\Table $table, $columns, $constraints, $indexes )
$table Cake\Database\Schema\Table

describeColumnSql() публичный Метод

{@inheritDoc}
public describeColumnSql ( $tableName, $config )

describeForeignKeySql() публичный Метод

{@inheritDoc}
public describeForeignKeySql ( $tableName, $config )

describeIndexSql() публичный Метод

{@inheritDoc}
public describeIndexSql ( $tableName, $config )

dropConstraintSql() публичный Метод

{@inheritDoc}
public dropConstraintSql ( Cake\Database\Schema\Table $table )
$table Cake\Database\Schema\Table

dropTableSql() публичный Метод

Generate the SQL to drop a table.
public dropTableSql ( Cake\Database\Schema\Table $table ) : array
$table Cake\Database\Schema\Table Table instance
Результат array SQL statements to drop a table.

indexSql() публичный Метод

{@inheritDoc}
public indexSql ( Cake\Database\Schema\Table $table, $name )
$table Cake\Database\Schema\Table

listTablesSql() публичный Метод

{@inheritDoc}
public listTablesSql ( $config )

truncateTableSql() публичный Метод

{@inheritDoc}
public truncateTableSql ( Cake\Database\Schema\Table $table )
$table Cake\Database\Schema\Table