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

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

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

Свойство Тип Описание
$exceptionMap map of DB errors and corresponding exceptions If left part is found in DB error message exception class from the right part is used.

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

Метод Описание
createColumnSchemaBuilder ( $type, $length = null )
createQueryBuilder ( )
findUniqueIndexes ( yii\db\TableSchema $table ) : array Returns all unique indexes for the given table.
getLastInsertID ( string $sequenceName = '' ) : string
init ( )
insert ( $table, $columns )
loadTableSchema ( $name )
quoteSimpleTableName ( $name )
releaseSavepoint ( $name )

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

Метод Описание
createColumn ( array $column ) : ColumnSchema Creates ColumnSchema instance
extractColumnSize ( ColumnSchema $column, string $dbType, string $precision, string $scale, string $length ) Extracts size, precision and scale information from column's DB type.
extractColumnType ( ColumnSchema $column, string $dbType, string $precision, string $scale, string $length ) Extracts the data types for the given column
findColumns ( yii\db\TableSchema $table ) : boolean Collects the table column metadata.
findConstraints ( yii\db\TableSchema $table ) Finds constraints and fills them into TableSchema object passed
findSchemaNames ( )
findTableNames ( $schema = '' )
getTableSequenceName ( string $tableName ) : string | null Sequence name of table
resolveTableNames ( yii\db\TableSchema $table, string $name ) Resolves the table name and schema name (if any).

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

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

Creates ColumnSchema instance
protected createColumn ( array $column ) : ColumnSchema
$column array
Результат yii\db\ColumnSchema

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

public createColumnSchemaBuilder ( $type, $length = null )

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

public createQueryBuilder ( )

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

Extracts size, precision and scale information from column's DB type.
protected extractColumnSize ( ColumnSchema $column, string $dbType, string $precision, string $scale, string $length )
$column yii\db\ColumnSchema
$dbType string the column's DB type
$precision string total number of digits. This parameter is available since version 2.0.4.
$scale string number of digits on the right of the decimal separator. This parameter is available since version 2.0.4.
$length string length for character types. This parameter is available since version 2.0.4.

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

Extracts the data types for the given column
protected extractColumnType ( ColumnSchema $column, string $dbType, string $precision, string $scale, string $length )
$column yii\db\ColumnSchema
$dbType string DB type
$precision string total number of digits. This parameter is available since version 2.0.4.
$scale string number of digits on the right of the decimal separator. This parameter is available since version 2.0.4.
$length string length for character types. This parameter is available since version 2.0.4.

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

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

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

Finds constraints and fills them into TableSchema object passed
protected findConstraints ( yii\db\TableSchema $table )
$table yii\db\TableSchema

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

protected findSchemaNames ( )

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

protected findTableNames ( $schema = '' )

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

Each array element is of the following structure: php [ 'IndexName1' => ['col1' [, ...]], 'IndexName2' => ['col2' [, ...]], ]
С версии: 2.0.4
public findUniqueIndexes ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table metadata
Результат array all unique indexes for the given table.

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

См. также: http://www.php.net/manual/en/function.PDO-lastInsertId.php -> Oracle does not support this Returns the ID of the last inserted row or sequence value.
public getLastInsertID ( string $sequenceName = '' ) : string
$sequenceName string name of the sequence object (required by some DBMS)
Результат string the row ID of the last row inserted, or the last value retrieved from the sequence object

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

Sequence name of table
protected getTableSequenceName ( string $tableName ) : string | null
$tableName string
Результат string | null whether the sequence exists

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

public init ( )

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

public insert ( $table, $columns )

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

public loadTableSchema ( $name )

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

public quoteSimpleTableName ( $name )

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

public releaseSavepoint ( $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

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

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

map of DB errors and corresponding exceptions If left part is found in DB error message exception class from the right part is used.
public $exceptionMap