PHP Class yii\db\sqlite\Schema

Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends yii\db\Schema
Show file Open project: yiisoft/yii2

Public Properties

Property Type Description
$typeMap mapping from physical column types (keys) to abstract column types (values)

Public Methods

Method Description
createColumnSchemaBuilder ( $type, $length = null ) : yii\db\sqlite\ColumnSchemaBuilder
createQueryBuilder ( ) : QueryBuilder Creates a query builder for the MySQL database.
findUniqueIndexes ( yii\db\TableSchema $table ) : array Returns all unique indexes for the given table.
quoteSimpleColumnName ( string $name ) : string Quotes a column name for use in a query.
quoteSimpleTableName ( string $name ) : string Quotes a table name for use in a query.
setTransactionIsolationLevel ( string $level ) Sets the isolation level of the current transaction.

Protected Methods

Method Description
findColumns ( yii\db\TableSchema $table ) : boolean Collects the table column metadata.
findConstraints ( yii\db\TableSchema $table ) Collects the foreign key column details for the given table.
findTableNames ( string $schema = '' ) : array Returns all table names in the database.
loadColumnSchema ( array $info ) : ColumnSchema Loads the column information into a [[ColumnSchema]] object.
loadTableSchema ( string $name ) : yii\db\TableSchema Loads the metadata for the specified table.

Method Details

createColumnSchemaBuilder() public method

public createColumnSchemaBuilder ( $type, $length = null ) : yii\db\sqlite\ColumnSchemaBuilder
return yii\db\sqlite\ColumnSchemaBuilder column schema builder instance

createQueryBuilder() public method

This method may be overridden by child classes to create a DBMS-specific query builder.
public createQueryBuilder ( ) : QueryBuilder
return QueryBuilder query builder instance

findColumns() protected method

Collects the table column metadata.
protected findColumns ( yii\db\TableSchema $table ) : boolean
$table yii\db\TableSchema the table metadata
return boolean whether the table exists in the database

findConstraints() protected method

Collects the foreign key column details for the given table.
protected findConstraints ( yii\db\TableSchema $table )
$table yii\db\TableSchema the table metadata

findTableNames() protected method

Returns all table names in the database.
protected findTableNames ( string $schema = '' ) : array
$schema string the schema of the tables. Defaults to empty string, meaning the current or default schema.
return array all table names in the database. The names have NO schema name prefix.

findUniqueIndexes() public method

Each array element is of the following structure: php [ 'IndexName1' => ['col1' [, ...]], 'IndexName2' => ['col2' [, ...]], ]
public findUniqueIndexes ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table metadata
return array all unique indexes for the given table.

loadColumnSchema() protected method

Loads the column information into a [[ColumnSchema]] object.
protected loadColumnSchema ( array $info ) : ColumnSchema
$info array column information
return yii\db\ColumnSchema the column schema object

loadTableSchema() protected method

Loads the metadata for the specified table.
protected loadTableSchema ( string $name ) : yii\db\TableSchema
$name string table name
return yii\db\TableSchema driver dependent table metadata. Null if the table does not exist.

quoteSimpleColumnName() public method

A simple column name has no prefix.
public quoteSimpleColumnName ( string $name ) : string
$name string column name
return string the properly quoted column name

quoteSimpleTableName() public method

A simple table name has no schema prefix.
public quoteSimpleTableName ( string $name ) : string
$name string table name
return string the properly quoted table name

setTransactionIsolationLevel() public method

Sets the isolation level of the current transaction.
See also: http://www.sqlite.org/pragma.html#pragma_read_uncommitted
public setTransactionIsolationLevel ( string $level )
$level string The transaction isolation level to use for this transaction. This can be either [[Transaction::READ_UNCOMMITTED]] or [[Transaction::SERIALIZABLE]].

Property Details

$typeMap public property

mapping from physical column types (keys) to abstract column types (values)
public $typeMap