COciSchema
| Package | system.db.schema.oci |
|---|---|
| Inheritance | class COciSchema » CDbSchema » CComponent |
| Since | 1.0.5 |
| Version | $Id: COciSchema.php 1864 2010-03-08 22:32:22Z qiang.xue $ |
COciSchema is the class for retrieving metadata information from an Oracle database.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| commandBuilder | CDbCommandBuilder | the SQL command builder for this connection. | CDbSchema |
| dbConnection | CDbConnection | database connection. | CDbSchema |
| defaultSchema | string | default schema. | COciSchema |
| tableNames | array | Returns all table names in the database. | CDbSchema |
| tables | array | Returns the metadata for all tables in the database. | CDbSchema |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __call() | Calls the named method which is not a class method. | CComponent |
| __construct() | Constructor. | CDbSchema |
| __get() | Returns a property value, an event handler list or a behavior based on its name. | CComponent |
| __isset() | Checks if a property value is null. | CComponent |
| __set() | Sets value of a component property. | CComponent |
| __unset() | Sets a component property to be null. | CComponent |
| asa() | Returns the named behavior object. | CComponent |
| attachBehavior() | Attaches a behavior to this component. | CComponent |
| attachBehaviors() | Attaches a list of behaviors to the component. | CComponent |
| attachEventHandler() | Attaches an event handler to an event. | CComponent |
| canGetProperty() | Determines whether a property can be read. | CComponent |
| canSetProperty() | Determines whether a property can be set. | CComponent |
| checkIntegrity() | Enables or disables integrity check. | CDbSchema |
| compareTableNames() | Compares two table names. | CDbSchema |
| detachBehavior() | Detaches a behavior from the component. | CComponent |
| detachBehaviors() | Detaches all behaviors from the component. | CComponent |
| detachEventHandler() | Detaches an existing event handler. | CComponent |
| disableBehavior() | Disables an attached behavior. | CComponent |
| disableBehaviors() | Disables all behaviors attached to this component. | CComponent |
| enableBehavior() | Enables an attached behavior. | CComponent |
| enableBehaviors() | Enables all behaviors attached to this component. | CComponent |
| evaluateExpression() | Evaluates a PHP expression or callback under the context of this component. | CComponent |
| getCommandBuilder() | CDbSchema | |
| getDbConnection() | CDbSchema | |
| getDefaultSchema() | COciSchema | |
| getEventHandlers() | Returns the list of attached event handlers for an event. | CComponent |
| getTable() | Obtains the metadata for the named table. | CDbSchema |
| getTableNames() | Returns all table names in the database. | CDbSchema |
| getTables() | Returns the metadata for all tables in the database. | CDbSchema |
| hasEvent() | Determines whether an event is defined. | CComponent |
| hasEventHandler() | Checks whether the named event has attached handlers. | CComponent |
| hasProperty() | Determines whether a property is defined. | CComponent |
| quoteColumnName() | Quotes a column name for use in a query. | COciSchema |
| quoteTableName() | Quotes a table name for use in a query. | COciSchema |
| raiseEvent() | Raises an event. | CComponent |
| refresh() | Refreshes the schema. | CDbSchema |
| resetSequence() | Resets the sequence value of a table's primary key. | CDbSchema |
| setDefaultSchema() | COciSchema |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| createColumn() | Creates a table column. | COciSchema |
| createCommandBuilder() | Creates a command builder for the database. | COciSchema |
| createTable() | Creates a table instance representing the metadata for the named table. | COciSchema |
| findColumns() | Collects the table column metadata. | COciSchema |
| findConstraints() | Collects the primary and foreign key column details for the given table. | COciSchema |
| findTableNames() | Returns all table names in the database. | COciSchema |
| getSchemaTableName() | COciSchema | |
| resolveTableNames() | Generates various kinds of table names. | COciSchema |
Property Details
defaultSchema
property
default schema.
Method Details
createColumn()
method
|
protected CDbColumnSchema createColumn(array $column)
| ||
| $column | array | column metadata |
| {return} | CDbColumnSchema | normalized column metadata |
Creates a table column.
createCommandBuilder()
method
|
protected CDbCommandBuilder createCommandBuilder()
| ||
| {return} | CDbCommandBuilder | command builder instance |
Creates a command builder for the database. This method may be overridden by child classes to create a DBMS-specific command builder.
createTable()
method
|
protected CDbTableSchema createTable($name)
| ||
| $name | ||
| {return} | CDbTableSchema | driver dependent table metadata. |
Creates a table instance representing the metadata for the named table.
findColumns()
method
|
protected boolean findColumns(COciTableSchema $table)
| ||
| $table | COciTableSchema | the table metadata |
| {return} | boolean | whether the table exists in the database |
Collects the table column metadata.
findConstraints()
method
|
protected void findConstraints(COciTableSchema $table)
| ||
| $table | COciTableSchema | the table metadata |
Collects the primary and foreign key column details for the given table.
findTableNames()
method
|
protected array findTableNames($schema='')
| ||
| $schema | ||
| {return} | array | all table names in the database. |
Returns all table names in the database.
getDefaultSchema()
method
|
public string getDefaultSchema()
| ||
| {return} | string | default schema. |
getSchemaTableName()
method
|
protected array getSchemaTableName(string $table)
| ||
| $table | string | table name with optional schema name prefix, uses default schema name prefix is not provided. |
| {return} | array | tuple as ($schemaName,$tableName) |
quoteColumnName()
method
|
public string quoteColumnName(string $name)
| ||
| $name | string | column name |
| {return} | string | the properly quoted column name |
Quotes a column name for use in a query.
quoteTableName()
method
|
public string quoteTableName(string $name)
| ||
| $name | string | table name |
| {return} | string | the properly quoted table name |
Quotes a table name for use in a query.
resolveTableNames()
method
|
protected void resolveTableNames(COciTableSchema $table, string $name)
| ||
| $table | COciTableSchema | the table instance |
| $name | string | the unquoted table name |
Generates various kinds of table names.
setDefaultSchema()
method
|
public void setDefaultSchema(string $schema)
| ||
| $schema | string | default schema. |