Class yii\db\cubrid\Schema

Inheritanceyii\db\cubrid\Schema » yii\db\Schema » yii\base\BaseObject
Implementsyii\base\Configurable, yii\db\ConstraintFinderInterface
Uses Traitsyii\db\ConstraintFinderTrait
Available since version2.0
Source Code https://github.com/yiisoft/yii2/blob/master/framework/db/cubrid/Schema.php

Schema is the class for retrieving metadata from a CUBRID database (version 9.3.x and higher).

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$columnSchemaClass string|array Column schema class or class config yii\db\Schema
$db yii\db\Connection The database connection yii\db\Schema
$defaultSchema string The default schema name used for the current session. yii\db\Schema
$exceptionMap array Map of DB errors and corresponding exceptions If left part is found in DB error message exception class from the right part is used. yii\db\cubrid\Schema
$typeMap array Mapping from physical column types (keys) to abstract column types (values) Please refer to [CUBRID manual](http://www. yii\db\cubrid\Schema

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$columnQuoteCharacter string|string[] Character used to quote column names. yii\db\Schema
$tableQuoteCharacter {@inheritdoc} yii\db\cubrid\Schema

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\BaseObject
__construct() Constructor. yii\base\BaseObject
__get() Returns the value of an object property. yii\base\BaseObject
__isset() Checks if a property is set, i.e. defined and not null. yii\base\BaseObject
__set() Sets value of an object property. yii\base\BaseObject
__unset() Sets an object property to null. yii\base\BaseObject
canGetProperty() Returns a value indicating whether a property can be read. yii\base\BaseObject
canSetProperty() Returns a value indicating whether a property can be set. yii\base\BaseObject
className() Returns the fully qualified name of this class. yii\base\BaseObject
convertException() Converts a DB exception to a more concrete one if possible. yii\db\Schema
createColumnSchemaBuilder() {@inheritdoc} yii\db\cubrid\Schema
createQueryBuilder() Creates a query builder for the CUBRID database. yii\db\cubrid\Schema
createSavepoint() Creates a new savepoint. yii\db\Schema
findUniqueIndexes() Returns all unique indexes for the given table. yii\db\Schema
getLastInsertID() Returns the ID of the last inserted row or sequence value. yii\db\Schema
getPdoType() Determines the PDO type for the given PHP data value. yii\db\cubrid\Schema
getQueryBuilder() yii\db\Schema
getRawTableName() Returns the actual name of a given table name. yii\db\Schema
getSchemaChecks() Returns check constraints for all tables in the database. yii\db\ConstraintFinderTrait
getSchemaDefaultValues() Returns default value constraints for all tables in the database. yii\db\ConstraintFinderTrait
getSchemaForeignKeys() Returns foreign keys for all tables in the database. yii\db\ConstraintFinderTrait
getSchemaIndexes() Returns indexes for all tables in the database. yii\db\ConstraintFinderTrait
getSchemaNames() Returns all schema names in the database, except system schemas. yii\db\Schema
getSchemaPrimaryKeys() Returns primary keys for all tables in the database. yii\db\ConstraintFinderTrait
getSchemaUniques() Returns unique constraints for all tables in the database. yii\db\ConstraintFinderTrait
getServerVersion() Returns a server version as a string comparable by \version_compare(). yii\db\Schema
getTableChecks() Obtains the check constraints information for the named table. yii\db\ConstraintFinderTrait
getTableDefaultValues() Obtains the default value constraints information for the named table. yii\db\ConstraintFinderTrait
getTableForeignKeys() Obtains the foreign keys information for the named table. yii\db\ConstraintFinderTrait
getTableIndexes() Obtains the indexes information for the named table. yii\db\ConstraintFinderTrait
getTableNames() Returns all table names in the database. yii\db\Schema
getTablePrimaryKey() Obtains the primary key for the named table. yii\db\ConstraintFinderTrait
getTableSchema() Obtains the metadata for the named table. yii\db\Schema
getTableSchemas() Returns the metadata for all tables in the database. yii\db\Schema
getTableUniques() Obtains the unique constraints information for the named table. yii\db\ConstraintFinderTrait
hasMethod() Returns a value indicating whether a method is defined. yii\base\BaseObject
hasProperty() Returns a value indicating whether a property is defined. yii\base\BaseObject
init() Initializes the object. yii\base\BaseObject
insert() Executes the INSERT command, returning primary key values. yii\db\Schema
isReadQuery() Returns a value indicating whether a SQL statement is for read purpose. yii\db\Schema
quoteColumnName() Quotes a column name for use in a query. yii\db\Schema
quoteSimpleColumnName() Quotes a simple column name for use in a query. yii\db\Schema
quoteSimpleTableName() Quotes a simple table name for use in a query. yii\db\Schema
quoteTableName() Quotes a table name for use in a query. yii\db\Schema
quoteValue() Quotes a string value for use in a query. yii\db\Schema
refresh() Refreshes the schema. yii\db\Schema
refreshTableSchema() Refreshes the particular table schema. yii\db\Schema
releaseSavepoint() {@inheritdoc} yii\db\cubrid\Schema
rollBackSavepoint() Rolls back to a previously created savepoint. yii\db\Schema
setTransactionIsolationLevel() {@inheritdoc} yii\db\cubrid\Schema
supportsSavepoint() yii\db\Schema
unquoteSimpleColumnName() Unquotes a simple column name. yii\db\Schema
unquoteSimpleTableName() Unquotes a simple table name. yii\db\Schema

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createColumnSchema() Creates a column schema for the database. yii\db\Schema
findSchemaNames() Returns all schema names in the database, including the default one but not system schemas. yii\db\Schema
findTableNames() {@inheritdoc} yii\db\cubrid\Schema
getCacheKey() Returns the cache key for the specified table name. yii\db\Schema
getCacheTag() Returns the cache tag name. yii\db\Schema
getColumnPhpType() Extracts the PHP type from abstract DB type. yii\db\Schema
getSchemaMetadata() Returns the metadata of the given type for all tables in the given schema. yii\db\ConstraintFinderTrait
getTableMetadata() Returns the metadata of the given type for the given table. yii\db\ConstraintFinderTrait
getTableNameParts() Splits full table name into parts yii\db\Schema
loadColumnSchema() Loads the column information into a \yii\db\cubrid\ColumnSchema object. yii\db\cubrid\Schema
loadTableChecks() {@inheritdoc} yii\db\cubrid\Schema
loadTableDefaultValues() {@inheritdoc} yii\db\cubrid\Schema
loadTableForeignKeys() {@inheritdoc} yii\db\cubrid\Schema
loadTableIndexes() {@inheritdoc} yii\db\cubrid\Schema
loadTablePrimaryKey() {@inheritdoc} yii\db\cubrid\Schema
loadTableSchema() {@inheritdoc} yii\db\cubrid\Schema
loadTableUniques() {@inheritdoc} yii\db\cubrid\Schema
normalizePdoRowKeyCase() Changes row's array key case to lower if PDO's one is set to uppercase. yii\db\Schema
resolveTableName() Resolves the table name and schema name (if any). yii\db\Schema
setTableMetadata() Sets the metadata of the given type for the given table. yii\db\Schema

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
SCHEMA_CACHE_VERSION 1 Schema cache version, to detect incompatibilities in cached values when the data format of the cache changes. yii\db\Schema
TYPE_BIGINT 'bigint' yii\db\Schema
TYPE_BIGPK 'bigpk' yii\db\Schema
TYPE_BINARY 'binary' yii\db\Schema
TYPE_BOOLEAN 'boolean' yii\db\Schema
TYPE_CHAR 'char' yii\db\Schema
TYPE_DATE 'date' yii\db\Schema
TYPE_DATETIME 'datetime' yii\db\Schema
TYPE_DECIMAL 'decimal' yii\db\Schema
TYPE_DOUBLE 'double' yii\db\Schema
TYPE_FLOAT 'float' yii\db\Schema
TYPE_INTEGER 'integer' yii\db\Schema
TYPE_JSON 'json' yii\db\Schema
TYPE_MONEY 'money' yii\db\Schema
TYPE_PK 'pk' yii\db\Schema
TYPE_SMALLINT 'smallint' yii\db\Schema
TYPE_STRING 'string' yii\db\Schema
TYPE_TEXT 'text' yii\db\Schema
TYPE_TIME 'time' yii\db\Schema
TYPE_TIMESTAMP 'timestamp' yii\db\Schema
TYPE_TINYINT 'tinyint' yii\db\Schema
TYPE_UBIGPK 'ubigpk' yii\db\Schema
TYPE_UPK 'upk' yii\db\Schema

Property Details

$exceptionMap public property

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 array $exceptionMap = ['Operation would have caused one or more unique constraint violations' => 'yii\db\IntegrityException']
$tableQuoteCharacter protected property
protected $tableQuoteCharacter '"'
$typeMap public property

Mapping from physical column types (keys) to abstract column types (values) Please refer to CUBRID manual for details on data types.

public array $typeMap = ['short' => self::TYPE_SMALLINT'smallint' => self::TYPE_SMALLINT'int' => self::TYPE_INTEGER'integer' => self::TYPE_INTEGER'bigint' => self::TYPE_BIGINT'numeric' => self::TYPE_DECIMAL'decimal' => self::TYPE_DECIMAL'float' => self::TYPE_FLOAT'real' => self::TYPE_FLOAT'double' => self::TYPE_DOUBLE'double precision' => self::TYPE_DOUBLE'monetary' => self::TYPE_MONEY'date' => self::TYPE_DATE'time' => self::TYPE_TIME'timestamp' => self::TYPE_TIMESTAMP'datetime' => self::TYPE_DATETIME'char' => self::TYPE_CHAR'varchar' => self::TYPE_STRING'char varying' => self::TYPE_STRING'nchar' => self::TYPE_CHAR'nchar varying' => self::TYPE_STRING'string' => self::TYPE_STRING'blob' => self::TYPE_BINARY'clob' => self::TYPE_BINARY'bit' => self::TYPE_INTEGER'bit varying' => self::TYPE_INTEGER'set' => self::TYPE_STRING'multiset' => self::TYPE_STRING'list' => self::TYPE_STRING'sequence' => self::TYPE_STRING'enum' => self::TYPE_STRING]

Method Details

createColumnSchemaBuilder() public method

{@inheritdoc}

public void createColumnSchemaBuilder ( $type, $length null )
$type
$length
createQueryBuilder() public method

Creates a query builder for the CUBRID database.

public yii\db\cubrid\QueryBuilder createQueryBuilder ( )
return yii\db\cubrid\QueryBuilder

Query builder instance

findTableNames() protected method

{@inheritdoc}

protected void findTableNames ( $schema '' )
$schema
getPdoType() public method

Determines the PDO type for the given PHP data value.

See also https://secure.php.net/manual/en/pdo.constants.php.

public integer getPdoType ( $data )
$data mixed

The data whose PDO type is to be determined

return integer

The PDO type

loadColumnSchema() protected method

Loads the column information into a \yii\db\cubrid\ColumnSchema object.

protected yii\db\ColumnSchema loadColumnSchema ( $info )
$info array

Column information

return yii\db\ColumnSchema

The column schema object

loadTableChecks() protected method

{@inheritdoc}

protected void loadTableChecks ( $tableName )
$tableName
throws yii\base\NotSupportedException

if this method is called.

loadTableDefaultValues() protected method

{@inheritdoc}

protected void loadTableDefaultValues ( $tableName )
$tableName
throws yii\base\NotSupportedException

if this method is called.

loadTableForeignKeys() protected method

{@inheritdoc}

protected void loadTableForeignKeys ( $tableName )
$tableName
loadTableIndexes() protected method

{@inheritdoc}

protected void loadTableIndexes ( $tableName )
$tableName
loadTablePrimaryKey() protected method

{@inheritdoc}

protected void loadTablePrimaryKey ( $tableName )
$tableName
loadTableSchema() protected method

{@inheritdoc}

protected void loadTableSchema ( $name )
$name
loadTableUniques() protected method

{@inheritdoc}

protected void loadTableUniques ( $tableName )
$tableName
releaseSavepoint() public method

{@inheritdoc}

public void releaseSavepoint ( $name )
$name
setTransactionIsolationLevel() public method
public void setTransactionIsolationLevel ( $level )
$level