PHP Класс yii\db\pgsql\Schema

С версии: 2.0
Автор: Gevik Babakhani ([email protected])
Наследование: extends yii\db\Schema
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$defaultSchema the default schema used for the current session.
$typeMap mapping from physical column types (keys) to abstract column types (values)

Открытые методы

Метод Описание
createQueryBuilder ( ) : QueryBuilder 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.

Защищенные методы

Метод Описание
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 ) : ColumnSchema Loads the column information into a [[ColumnSchema]] object.
resolveTableNames ( yii\db\TableSchema $table, string $name ) Resolves the table name and schema name (if any).

Описание методов

createQueryBuilder() публичный Метод

Creates a query builder for the PostgreSQL database.
public createQueryBuilder ( ) : QueryBuilder
Результат QueryBuilder query builder instance

findColumns() защищенный Метод

Collects the metadata of table columns.
protected findColumns ( yii\db\TableSchema $table ) : boolean
$table yii\db\TableSchema the table metadata
Результат boolean whether the table exists in the database

findConstraints() защищенный Метод

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

findSchemaNames() защищенный Метод

This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception.
С версии: 2.0.4
protected findSchemaNames ( ) : array
Результат array all schema names in the database, except system schemas

findTableNames() защищенный Метод

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.
Результат array all table names in the database. The names have NO schema name prefix.

findUniqueIndexes() публичный Метод

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
Результат array all unique indexes for the given table.

findViewNames() защищенный Метод

Returns all views names in the database.
С версии: 2.0.9
protected findViewNames ( string $schema = '' ) : array
$schema string the schema of the views. Defaults to empty string, meaning the current or default schema.
Результат array all views names in the database. The names have NO schema name prefix.

getUniqueIndexInformation() защищенный Метод

Gets information about given table unique indexes.
protected getUniqueIndexInformation ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table metadata
Результат array with index and column names

getViewNames() публичный Метод

Returns all view names in the database.
С версии: 2.0.9
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.
Результат string[] all view names in the database.

insert() публичный Метод

public insert ( $table, $columns )

loadColumnSchema() защищенный Метод

Loads the column information into a [[ColumnSchema]] object.
protected loadColumnSchema ( array $info ) : ColumnSchema
$info array column information
Результат yii\db\ColumnSchema the column schema object

loadTableSchema() публичный Метод

Loads the metadata for the specified table.
public loadTableSchema ( string $name ) : yii\db\TableSchema | null
$name string table name
Результат yii\db\TableSchema | null driver dependent table metadata. Null if the table does not exist.

quoteSimpleTableName() публичный Метод

A simple table name has no schema prefix.
public quoteSimpleTableName ( string $name ) : string
$name string table name
Результат string the properly quoted table name

resolveTableNames() защищенный Метод

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

Описание свойств

$defaultSchema публичное свойство

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

$typeMap публичное свойство

mapping from physical column types (keys) to abstract column types (values)
См. также: http://www.postgresql.org/docs/current/static/datatype.html#DATATYPE-TABLE
public $typeMap