Property | Type | Description | |
---|---|---|---|
$defaultSchema | the default schema used for the current session. | ||
$typeMap | mapping from physical column types (keys) to abstract column types (values) |
Method | Description | |
---|---|---|
createQueryBuilder ( ) : |
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 ) |
Method | 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 ) : |
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). |
public createQueryBuilder ( ) : |
||
return | query builder interface. |
protected findColumns ( yii\db\mssql\TableSchema $table ) : boolean | ||
$table | yii\db\mssql\TableSchema | the table metadata |
return | boolean | whether the table exists in the database |
protected findForeignKeys ( yii\db\mssql\TableSchema $table ) | ||
$table | yii\db\mssql\TableSchema | the table metadata |
protected findPrimaryKeys ( yii\db\mssql\TableSchema $table ) | ||
$table | yii\db\mssql\TableSchema | the table metadata |
protected findTableConstraints ( yii\db\mssql\TableSchema $table, string $type ) : array | ||
$table | yii\db\mssql\TableSchema | |
$type | string | either PRIMARY KEY or UNIQUE |
return | array | each entry contains index_name and field_name |
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. |
public findUniqueIndexes ( yii\db\mssql\TableSchema $table ) : array | ||
$table | yii\db\mssql\TableSchema | the table metadata |
return | array | all unique indexes for the given table. |
protected loadColumnSchema ( array $info ) : |
||
$info | array | column information |
return | the column schema object |
public loadTableSchema ( string $name ) : yii\db\mssql\TableSchema | null | ||
$name | string | table name |
return | yii\db\mssql\TableSchema | null | driver dependent table metadata. Null if the table does not exist. |
public quoteSimpleColumnName ( string $name ) : string | ||
$name | string | column name. |
return | string | the properly quoted column name. |
public quoteSimpleTableName ( string $name ) : string | ||
$name | string | table name. |
return | string | the properly quoted table name. |
protected resolveTableNames ( yii\db\mssql\TableSchema $table, string $name ) | ||
$table | yii\db\mssql\TableSchema | the table metadata object |
$name | string | the table name |
public $defaultSchema |