Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • COciColumnSchema
  • COciCommandBuilder
  • COciSchema
  • COciTableSchema
  • Overview
  • Package
  • Class
  • Tree

Class COciSchema

COciSchema is the class for retrieving metadata information from an Oracle database.

CComponent
Extended by CDbSchema
Extended by COciSchema
Package: system\db\schema\oci
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Ricardo Grana <rickgrana@yahoo.com.br>
Located at x2engine/framework/db/schema/oci/COciSchema.php
Methods summary
public string
# quoteSimpleTableName( string $name )

Quotes a table name for use in a query. A simple table name does not schema prefix.

Quotes a table name for use in a query. A simple table name does not schema prefix.

Parameters

$name
string
$name table name

Returns

string
the properly quoted table name

Since

1.1.6

Overrides

CDbSchema::quoteSimpleTableName()
public string
# quoteSimpleColumnName( string $name )

Quotes a column name for use in a query. A simple column name does not contain prefix.

Quotes a column name for use in a query. A simple column name does not contain prefix.

Parameters

$name
string
$name column name

Returns

string
the properly quoted column name

Since

1.1.6

Overrides

CDbSchema::quoteSimpleColumnName()
protected CDbCommandBuilder
# createCommandBuilder( )

Creates a command builder for the database. This method may be overridden by child classes to create a DBMS-specific command builder.

Creates a command builder for the database. This method may be overridden by child classes to create a DBMS-specific command builder.

Returns

CDbCommandBuilder
command builder instance

Overrides

CDbSchema::createCommandBuilder()
public
# setDefaultSchema( string $schema )

Parameters

$schema
string
$schema default schema.
public string
# getDefaultSchema( )

Returns

string
default schema.
protected array
# getSchemaTableName( string $table )

Parameters

$table
string
$table table name with optional schema name prefix, uses default schema name prefix is not provided.

Returns

array
tuple as ($schemaName,$tableName)
protected CDbTableSchema
# loadTable( string $name )

Loads the metadata for the specified table.

Loads the metadata for the specified table.

Parameters

$name
string
$name table name

Returns

CDbTableSchema
driver dependent table metadata.
protected
# resolveTableNames( COciTableSchema $table, string $name )

Generates various kinds of table names.

Generates various kinds of table names.

Parameters

$table
COciTableSchema
$table the table instance
$name
string
$name the unquoted table name
protected boolean
# findColumns( COciTableSchema $table )

Collects the table column metadata.

Collects the table column metadata.

Parameters

$table
COciTableSchema
$table the table metadata

Returns

boolean
whether the table exists in the database
protected CDbColumnSchema
# createColumn( array $column )

Creates a table column.

Creates a table column.

Parameters

$column
array
$column column metadata

Returns

CDbColumnSchema
normalized column metadata
protected
# findConstraints( COciTableSchema $table )

Collects the primary and foreign key column details for the given table.

Collects the primary and foreign key column details for the given table.

Parameters

$table
COciTableSchema
$table the table metadata
protected array
# findTableNames( string $schema = '' )

Returns all table names in the database.

Returns all table names in the database.

Parameters

$schema
string
$schema the schema of the tables. Defaults to empty string, meaning the current or default schema. If not empty, the returned table names will be prefixed with the schema name.

Returns

array
all table names in the database.

Throws

CDbException
if current schema does not support fetching all table names

Overrides

CDbSchema::findTableNames()
public string
# renameTable( string $table, string $newName )

Builds a SQL statement for renaming a DB table.

Builds a SQL statement for renaming a DB table.

Parameters

$table
string
$table the table to be renamed. The name will be properly quoted by the method.
$newName
string
$newName the new table name. The name will be properly quoted by the method.

Returns

string
the SQL statement for renaming a DB table.

Since

1.1.6

Overrides

CDbSchema::renameTable()
public string
# alterColumn( string $table, string $column, string $type )

Builds a SQL statement for changing the definition of a column.

Builds a SQL statement for changing the definition of a column.

Parameters

$table
string
$table the table whose column is to be changed. The table name will be properly quoted by the method.
$column
string
$column the name of the column to be changed. The name will be properly quoted by the method.
$type
string
$type the new column type. The CDbSchema::getColumnType() method will be invoked to convert abstract column type (if any) into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL. For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'.

Returns

string
the SQL statement for changing the definition of a column.

Since

1.1.6

Overrides

CDbSchema::alterColumn()
public string
# dropIndex( string $name, string $table )

Builds a SQL statement for dropping an index.

Builds a SQL statement for dropping an index.

Parameters

$name
string
$name the name of the index to be dropped. The name will be properly quoted by the method.
$table
string
$table the table whose index is to be dropped. The name will be properly quoted by the method.

Returns

string
the SQL statement for dropping an index.

Since

1.1.6

Overrides

CDbSchema::dropIndex()
public
# resetSequence( CDbTableSchema $table, integer|null $value = null )

Resets the sequence value of a table's primary key. The sequence will be reset such that the primary key of the next new row inserted will have the specified value or max value of a primary key plus one (i.e. sequence trimming).

Resets the sequence value of a table's primary key. The sequence will be reset such that the primary key of the next new row inserted will have the specified value or max value of a primary key plus one (i.e. sequence trimming).

Note, behavior of this method has changed since 1.1.14 release. Please refer to the following issue for more details: https://github.com/yiisoft/yii/issues/2241

Parameters

$table
CDbTableSchema
$table the table schema whose primary key sequence will be reset
$value
integer|null
$value the value for the primary key of the next new row inserted. If this is not set, the next new row's primary key will have the max value of a primary key plus one (i.e. sequence trimming).

Since

1.1.13

Overrides

CDbSchema::resetSequence()
public
# checkIntegrity( boolean $check = true, string $schema = '' )

Enables or disables integrity check.

Enables or disables integrity check.

Parameters

$check
boolean
$check whether to turn on or off the integrity check.
$schema
string
$schema the schema of the tables. Defaults to empty string, meaning the current or default schema.

Since

1.1.14

Overrides

CDbSchema::checkIntegrity()
Methods inherited from CDbSchema
__construct(), addColumn(), addForeignKey(), addPrimaryKey(), compareTableNames(), createIndex(), createTable(), dropColumn(), dropForeignKey(), dropPrimaryKey(), dropTable(), getColumnType(), getCommandBuilder(), getDbConnection(), getTable(), getTableNames(), getTables(), quoteColumnName(), quoteTableName(), refresh(), renameColumn(), truncateTable()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public array $columnTypes array( 'pk' => 'NUMBER(10) NOT NULL PRIMARY KEY', 'bigpk' => 'NUMBER(20) NOT NULL PRIMARY KEY', 'string' => 'VARCHAR2(255)', 'text' => 'CLOB', 'integer' => 'NUMBER(10)', 'bigint' => 'NUMBER(20)', 'float' => 'NUMBER', 'decimal' => 'NUMBER', 'datetime' => 'TIMESTAMP', 'timestamp' => 'TIMESTAMP', 'time' => 'TIMESTAMP', 'date' => 'DATE', 'binary' => 'BLOB', 'boolean' => 'NUMBER(1)', 'money' => 'NUMBER(19,4)', )
#

the abstract column types mapped to physical column types.

the abstract column types mapped to physical column types.

Since

1.1.6
Magic properties summary
public string $defaultSchema
#

Default schema.

Default schema.

Magic properties inherited from CDbSchema
$commandBuilder, $dbConnection, $tableNames, $tables
API documentation generated by ApiGen 2.8.0