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 PostgreSQL database. | |
findUniqueIndexes ( yii\db\TableSchema $table ) : array | Returns all unique indexes for the given table. | |
getViewNames ( string $schema = '', boolean $refresh = false ) : string[] | Returns all view names in the database. | |
insert ( $table, $columns ) | ||
loadTableSchema ( string $name ) : yii\db\TableSchema | null | Loads the metadata for the specified table. | |
quoteSimpleTableName ( string $name ) : string | Quotes a table name for use in a query. |
Method | Description | |
---|---|---|
findColumns ( yii\db\TableSchema $table ) : boolean | Collects the metadata of table columns. | |
findConstraints ( yii\db\TableSchema $table ) | Collects the foreign key column details for the given table. | |
findSchemaNames ( ) : array | Returns all schema names in the database, including the default one but not system schemas. | |
findTableNames ( string $schema = '' ) : array | Returns all table names in the database. | |
findViewNames ( string $schema = '' ) : array | Returns all views names in the database. | |
getUniqueIndexInformation ( yii\db\TableSchema $table ) : array | Gets information about given table unique indexes. | |
loadColumnSchema ( array $info ) : |
Loads the column information into a [[ColumnSchema]] object. | |
resolveTableNames ( yii\db\TableSchema $table, string $name ) | Resolves the table name and schema name (if any). |
public createQueryBuilder ( ) : |
||
return | query builder instance |
protected findColumns ( yii\db\TableSchema $table ) : boolean | ||
$table | yii\db\TableSchema | the table metadata |
return | boolean | whether the table exists in the database |
protected findConstraints ( yii\db\TableSchema $table ) | ||
$table | yii\db\TableSchema | the table metadata |
protected findSchemaNames ( ) : array | ||
return | array | all schema names in the database, except system schemas |
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\TableSchema $table ) : array | ||
$table | yii\db\TableSchema | the table metadata |
return | array | all unique indexes for the given table. |
protected findViewNames ( string $schema = '' ) : array | ||
$schema | string | the schema of the views. Defaults to empty string, meaning the current or default schema. |
return | array | all views names in the database. The names have NO schema name prefix. |
protected getUniqueIndexInformation ( yii\db\TableSchema $table ) : array | ||
$table | yii\db\TableSchema | the table metadata |
return | array | with index and column names |
public getViewNames ( string $schema = '', boolean $refresh = false ) : string[] | ||
$schema | string | the schema of the views. Defaults to empty string, meaning the current or default schema name. If not empty, the returned view names will be prefixed with the schema name. |
$refresh | boolean | whether to fetch the latest available view names. If this is false, view names fetched previously (if available) will be returned. |
return | string[] | all view names in the database. |
protected loadColumnSchema ( array $info ) : |
||
$info | array | column information |
return | the column schema object |
public loadTableSchema ( string $name ) : yii\db\TableSchema | null | ||
$name | string | table name |
return | yii\db\TableSchema | null | driver dependent table metadata. Null if the table does not exist. |
public quoteSimpleTableName ( string $name ) : string | ||
$name | string | table name |
return | string | the properly quoted table name |
protected resolveTableNames ( yii\db\TableSchema $table, string $name ) | ||
$table | yii\db\TableSchema | the table metadata object |
$name | string | the table name |
public $defaultSchema |