PHP Class yii\db\mssql\Schema

Since: 2.0
Author: Timur Ruziev ([email protected])
Inheritance: extends yii\db\Schema
Afficher le fichier Open project: yiisoft/yii2

Méthodes publiques

Свойство Type Description
$defaultSchema the default schema used for the current session.
$typeMap mapping from physical column types (keys) to abstract column types (values)

Méthodes publiques

Méthode Description
createQueryBuilder ( ) : QueryBuilder Creates a query builder for the MSSQL database.
createSavepoint ( $name )
findUniqueIndexes ( yii\db\mssql\TableSchema $table ) : array Returns all unique indexes for the given table.
loadTableSchema ( string $name ) : yii\db\mssql\TableSchema | null Loads the metadata for the specified 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.
releaseSavepoint ( $name )
rollBackSavepoint ( $name )

Méthodes protégées

Méthode Description
findColumns ( yii\db\mssql\TableSchema $table ) : boolean Collects the metadata of table columns.
findForeignKeys ( yii\db\mssql\TableSchema $table ) Collects the foreign key column details for the given table.
findPrimaryKeys ( yii\db\mssql\TableSchema $table ) Collects the primary key column details for the given table.
findTableConstraints ( yii\db\mssql\TableSchema $table, string $type ) : array Collects the constraint details for the given table and constraint type.
findTableNames ( string $schema = '' ) : array Returns all table names in the database.
loadColumnSchema ( array $info ) : ColumnSchema Loads the column information into a [[ColumnSchema]] object.
resolveTableNames ( yii\db\mssql\TableSchema $table, string $name ) Resolves the table name and schema name (if any).

Method Details

createQueryBuilder() public méthode

Creates a query builder for the MSSQL database.
public createQueryBuilder ( ) : QueryBuilder
Résultat QueryBuilder query builder interface.

createSavepoint() public méthode

public createSavepoint ( $name )

findColumns() protected méthode

Collects the metadata of table columns.
protected findColumns ( yii\db\mssql\TableSchema $table ) : boolean
$table yii\db\mssql\TableSchema the table metadata
Résultat boolean whether the table exists in the database

findForeignKeys() protected méthode

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

findPrimaryKeys() protected méthode

Collects the primary key column details for the given table.
protected findPrimaryKeys ( yii\db\mssql\TableSchema $table )
$table yii\db\mssql\TableSchema the table metadata

findTableConstraints() protected méthode

Collects the constraint details for the given table and constraint type.
Since: 2.0.4
protected findTableConstraints ( yii\db\mssql\TableSchema $table, string $type ) : array
$table yii\db\mssql\TableSchema
$type string either PRIMARY KEY or UNIQUE
Résultat array each entry contains index_name and field_name

findTableNames() protected méthode

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.
Résultat array all table names in the database. The names have NO schema name prefix.

findUniqueIndexes() public méthode

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

loadColumnSchema() protected méthode

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

loadTableSchema() public méthode

Loads the metadata for the specified table.
public loadTableSchema ( string $name ) : yii\db\mssql\TableSchema | null
$name string table name
Résultat yii\db\mssql\TableSchema | null driver dependent table metadata. Null if the table does not exist.

quoteSimpleColumnName() public méthode

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

quoteSimpleTableName() public méthode

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

releaseSavepoint() public méthode

public releaseSavepoint ( $name )

resolveTableNames() protected méthode

Resolves the table name and schema name (if any).
protected resolveTableNames ( yii\db\mssql\TableSchema $table, string $name )
$table yii\db\mssql\TableSchema the table metadata object
$name string the table name

rollBackSavepoint() public méthode

public rollBackSavepoint ( $name )

Property Details

$defaultSchema public_oe property

the default schema used for the current session.
public $defaultSchema

$typeMap public_oe property

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