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

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

Защищенные свойства (Protected)

Свойство Тип Описание
$_constraintsIdMap array Array containing the foreign keys constraints names Necessary for composite foreign keys to be handled

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

Метод Описание
addConstraintSql ( Table $table ) {@inheritDoc}
columnSql ( Table $table, $name ) {@inheritDoc}
constraintSql ( Table $table, $name ) {@inheritDoc}
convertColumnDescription ( Table $table, $row ) {@inheritDoc}
convertForeignKeyDescription ( Table $table, $row ) {@inheritDoc}
convertIndexDescription ( Table $table, $row ) {@inheritDoc}
createTableSql ( Table $table, $columns, $constraints, $indexes ) {@inheritDoc}
describeColumnSql ( $tableName, $config ) {@inheritDoc}
describeForeignKeySql ( $tableName, $config ) {@inheritDoc}
describeIndexSql ( $tableName, $config ) {@inheritDoc}
dropConstraintSql ( Table $table ) {@inheritDoc}
hasSequences ( ) : boolean Returns whether there is any table in this connection to SQLite containing sequences
indexSql ( Table $table, $name ) {@inheritDoc}
listTablesSql ( $config ) {@inheritDoc}
truncateTableSql ( Table $table ) {@inheritDoc}

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

Метод Описание
_convertColumn ( string $column ) : array Convert a column definition to the abstract types.
_defaultValue ( string | null $default ) : string | null Manipulate the default value.

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

_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.

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

Sqlite includes quotes and bared NULLs in default values. We need to remove those.
protected _defaultValue ( string | null $default ) : string | null
$default string | null The default value.
Результат string | null

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

SQLite can not properly handle adding a constraint to an existing table. This method is no-op
public addConstraintSql ( Table $table )
$table Table

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

{@inheritDoc}
public columnSql ( Table $table, $name )
$table Table

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

Note integer primary keys will return ''. This is intentional as Sqlite requires that integer primary keys be defined in the column definition.
public constraintSql ( Table $table, $name )
$table Table

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

{@inheritDoc}
public convertColumnDescription ( Table $table, $row )
$table Table

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

{@inheritDoc}
public convertForeignKeyDescription ( Table $table, $row )
$table Table

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

Since SQLite does not have a way to get metadata about all indexes at once, additional queries are done here. Sqlite constraint names are not stable, and the names for constraints will not match those used to create the table. This is a limitation in Sqlite's metadata features.
public convertIndexDescription ( Table $table, $row )
$table Table

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

{@inheritDoc}
public createTableSql ( Table $table, $columns, $constraints, $indexes )
$table Table

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

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

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

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

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

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

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

SQLite can not properly handle dropping a constraint to an existing table. This method is no-op
public dropConstraintSql ( Table $table )
$table Table

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

Returns whether there is any table in this connection to SQLite containing sequences
public hasSequences ( ) : boolean
Результат boolean

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

{@inheritDoc}
public indexSql ( Table $table, $name )
$table Table

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

{@inheritDoc}
public listTablesSql ( $config )

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

{@inheritDoc}
public truncateTableSql ( Table $table )
$table Table

Описание свойств

$_constraintsIdMap защищенное свойство

Array containing the foreign keys constraints names Necessary for composite foreign keys to be handled
protected array $_constraintsIdMap
Результат array