Final Class Yiisoft\Db\Sqlite\DDLQueryBuilder
| Inheritance | Yiisoft\Db\Sqlite\DDLQueryBuilder » Yiisoft\Db\QueryBuilder\AbstractDDLQueryBuilder |
|---|
Implements a (Data Definition Language) SQL statements for SQLite Server.
Public Methods
Method Details
| public addCheck( string $table, string $name, string $expression ): string | ||
| $table | string | |
| $name | string | |
| $expression | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function addCheck(string $table, string $name, string $expression): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public addCommentOnColumn( string $table, string $column, string $comment ): string | ||
| $table | string | |
| $column | string | |
| $comment | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function addCommentOnColumn(string $table, string $column, string $comment): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public addCommentOnTable( string $table, string $comment ): string | ||
| $table | string | |
| $comment | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function addCommentOnTable(string $table, string $comment): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public addDefaultValue( string $table, string $name, string $column, mixed $value ): string | ||
| $table | string | |
| $name | string | |
| $column | string | |
| $value | mixed | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function addDefaultValue(string $table, string $name, string $column, mixed $value): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public addForeignKey( string $table, string $name, array|string $columns, string $referenceTable, array|string $referenceColumns, string|null $delete = null, string|null $update = null ): string | ||
| $table | string | |
| $name | string | |
| $columns | array|string | |
| $referenceTable | string | |
| $referenceColumns | array|string | |
| $delete | string|null | |
| $update | string|null | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function addForeignKey(
string $table,
string $name,
array|string $columns,
string $referenceTable,
array|string $referenceColumns,
?string $delete = null,
?string $update = null,
): string {
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public addPrimaryKey( string $table, string $name, array|string $columns ): string | ||
| $table | string | |
| $name | string | |
| $columns | array|string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function addPrimaryKey(string $table, string $name, array|string $columns): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public addUnique( string $table, string $name, array|string $columns ): string | ||
| $table | string | |
| $name | string | |
| $columns | array|string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function addUnique(string $table, string $name, array|string $columns): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public alterColumn( string $table, string $column, \Yiisoft\Db\Schema\Column\ColumnInterface|string $type ): string | ||
| $table | string | |
| $column | string | |
| $type | \Yiisoft\Db\Schema\Column\ColumnInterface|string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function alterColumn(string $table, string $column, ColumnInterface|string $type): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public checkIntegrity( string $schema = '', string $table = '', boolean $check = true ): string | ||
| $schema | string | |
| $table | string | |
| $check | boolean | |
public function checkIntegrity(string $schema = '', string $table = '', bool $check = true): string
{
return 'PRAGMA foreign_keys=' . (int) $check;
}
| public createIndex( string $table, string $name, array|string $columns, string|null $indexType = null, string|null $indexMethod = null ): string | ||
| $table | string | |
| $name | string | |
| $columns | array|string | |
| $indexType | string|null | |
| $indexMethod | string|null | |
public function createIndex(
string $table,
string $name,
array|string $columns,
?string $indexType = null,
?string $indexMethod = null,
): string {
$tableParts = explode('.', $table);
$schema = null;
if (count($tableParts) === 2) {
[$schema, $table] = $tableParts;
}
return 'CREATE ' . (!empty($indexType) ? $indexType . ' ' : '') . 'INDEX '
. $this->quoter->quoteTableName((!empty($schema) ? $schema . '.' : '') . $name)
. ' ON '
. $this->quoter->quoteTableName($table)
. ' (' . $this->queryBuilder->buildColumns($columns) . ')';
}
| public dropCheck( string $table, string $name ): string | ||
| $table | string | |
| $name | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropCheck(string $table, string $name): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public dropColumn( string $table, string $column ): string | ||
| $table | string | |
| $column | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropColumn(string $table, string $column): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public dropCommentFromColumn( string $table, string $column ): string | ||
| $table | string | |
| $column | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropCommentFromColumn(string $table, string $column): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public dropCommentFromTable( string $table ): string | ||
| $table | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropCommentFromTable(string $table): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public dropDefaultValue( string $table, string $name ): string | ||
| $table | string | |
| $name | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropDefaultValue(string $table, string $name): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public dropForeignKey( string $table, string $name ): string | ||
| $table | string | |
| $name | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropForeignKey(string $table, string $name): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public dropIndex( string $table, string $name ): string | ||
| $table | string | |
| $name | string | |
public function dropIndex(string $table, string $name): string
{
return 'DROP INDEX ' . $this->quoter->quoteTableName($name);
}
| public dropPrimaryKey( string $table, string $name ): string | ||
| $table | string | |
| $name | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropPrimaryKey(string $table, string $name): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public dropTable( string $table, boolean $ifExists = false, boolean $cascade = false ): string | ||
| $table | string | |
| $ifExists | boolean | |
| $cascade | boolean | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support cascade drop table. |
|---|---|---|
public function dropTable(string $table, bool $ifExists = false, bool $cascade = false): string
{
if ($cascade) {
throw new NotSupportedException('SQLite doesn\'t support cascade drop table.');
}
return parent::dropTable($table, $ifExists, false);
}
| public dropUnique( string $table, string $name ): string | ||
| $table | string | |
| $name | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function dropUnique(string $table, string $name): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public renameColumn( string $table, string $oldName, string $newName ): string | ||
| $table | string | |
| $oldName | string | |
| $newName | string | |
| throws | \Yiisoft\Db\Exception\NotSupportedException |
SQLite doesn't support this method. |
|---|---|---|
public function renameColumn(string $table, string $oldName, string $newName): string
{
throw new NotSupportedException(__METHOD__ . ' is not supported by SQLite.');
}
| public renameTable( string $oldName, string $newName ): string | ||
| $oldName | string | |
| $newName | string | |
public function renameTable(string $oldName, string $newName): string
{
return 'ALTER TABLE '
. $this->quoter->quoteTableName($oldName)
. ' RENAME TO '
. $this->quoter->quoteTableName($newName);
}
| public truncateTable( string $table ): string | ||
| $table | string | |
public function truncateTable(string $table): string
{
return 'DELETE FROM ' . $this->quoter->quoteTableName($table);
}
Signup or Login in order to comment.