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 string addCheck ( string $table, string $name, string $expression ) | ||
| $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 string addCommentOnColumn ( string $table, string $column, string $comment ) | ||
| $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 string addCommentOnTable ( string $table, string $comment ) | ||
| $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 string addDefaultValue ( string $table, string $name, string $column, mixed $value ) | ||
| $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 string addForeignKey ( string $table, string $name, array|string $columns, string $referenceTable, array|string $referenceColumns, string|null $delete = null, string|null $update = null ) | ||
| $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 string addPrimaryKey ( string $table, string $name, array|string $columns ) | ||
| $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 string addUnique ( string $table, string $name, array|string $columns ) | ||
| $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 string alterColumn ( string $table, string $column, \Yiisoft\Db\Schema\Column\ColumnInterface|string $type ) | ||
| $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 string checkIntegrity ( string $schema = '', string $table = '', boolean $check = true ) | ||
| $schema | string | |
| $table | string | |
| $check | boolean | |
public function checkIntegrity(string $schema = '', string $table = '', bool $check = true): string
{
return 'PRAGMA foreign_keys=' . (int) $check;
}
| public string createIndex ( string $table, string $name, array|string $columns, string|null $indexType = null, string|null $indexMethod = null ) | ||
| $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 string dropCheck ( string $table, string $name ) | ||
| $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 string dropColumn ( string $table, string $column ) | ||
| $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 string dropCommentFromColumn ( string $table, string $column ) | ||
| $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 string dropCommentFromTable ( string $table ) | ||
| $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 string dropDefaultValue ( string $table, string $name ) | ||
| $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 string dropForeignKey ( string $table, string $name ) | ||
| $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 string dropIndex ( string $table, string $name ) | ||
| $table | string | |
| $name | string | |
public function dropIndex(string $table, string $name): string
{
return 'DROP INDEX ' . $this->quoter->quoteTableName($name);
}
| public string dropPrimaryKey ( string $table, string $name ) | ||
| $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 string dropTable ( string $table, boolean $ifExists = false, boolean $cascade = false ) | ||
| $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 string dropUnique ( string $table, string $name ) | ||
| $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 string renameColumn ( string $table, string $oldName, string $newName ) | ||
| $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 string renameTable ( string $oldName, string $newName ) | ||
| $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 string truncateTable ( string $table ) | ||
| $table | string | |
public function truncateTable(string $table): string
{
return 'DELETE FROM ' . $this->quoter->quoteTableName($table);
}
Signup or Login in order to comment.