Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
Keyword

Class TOracleMetaData

TComponent
   |
   --TDbMetaData
      |
      --TOracleMetaData

TOracleMetaData loads Oracle database table and column information.

Since: 3.1
Author: Marcos Nobre <marconobre[at]gmail[dot]com>

Method Summary
protected  string
assertIdentifier ( string $name)
protected  TOracleTableInfo
createNewTableInfo ( string $schemaName, string $tableName)
protected  TOracleTableInfo
createTableInfo ( string $table)
Get the column definitions for given table.
protected  array
getConstraintKeys ( string $schemaName, string $tableName)
Gets the primary and foreign key column details for the given table.
string
protected  array
getForeignKeys ( string $src)
Gets foreign relationship constraint keys and table name
protected  boolean
getIsView ( string $schemaName, string $tableName)
protected  array
getPrimaryKeys ( string $src)
Gets the primary key field names
protected  array
getSchemaTableName ( string $table)
protected  string
getSequenceName ( mixed $tableInfo, mixed $src)
protected  string
protected  boolean
isForeignKeyColumn ( string $columnId, TOracleTableInfo $tableInfo)
protected  boolean
isPrecisionType ( mixed $type)
protected  void
processColumn ( TOracleTableInfo $tableInfo, array $col)
void
setDefaultSchema ( string $schema)
Methods Inherited From TDbMetaData
TDbMetaData::createCommandBuilder(), TDbMetaData::getDbConnection(), TDbMetaData::getInstance(), TDbMetaData::getTableInfo(), TDbMetaData::getTableInfoClass()
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Method Details

assertIdentifier

protected string assertIdentifier (string $name )

Input
string$nametable name, schema name or column name.
Output
string a valid identifier.
Exception
throwsTDbException when table name contains a double quote (").

createNewTableInfo

protected TOracleTableInfo createNewTableInfo (string $schemaName , string $tableName )

Input
string$schemaNametable schema name
string$tableNametable name.
Output
Exception

createTableInfo

protected TOracleTableInfo createTableInfo (string $table )

Get the column definitions for given table.

Input
string$tabletable name.
Output
TOracleTableInfo table information.
Exception

getConstraintKeys

protected array getConstraintKeys (string $schemaName , string $tableName )

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

Input
string$schemaNameschema name
string$tableNametable name.
Output
array tuple ($primary, $foreign)
Exception

getDefaultSchema

public string getDefaultSchema ()

Output
string default schema.
Exception

getForeignKeys

protected array getForeignKeys (string $src )

Gets foreign relationship constraint keys and table name

Input
string$srcOracle foreign key definition
Output
array foreign relationship table name and keys, null otherwise
Exception

getIsView

protected boolean getIsView (string $schemaName , string $tableName )

Input
string$schemaNametable schema name
string$tableNametable name.
Output
boolean true if the table is a view.
Exception

getPrimaryKeys

protected array getPrimaryKeys (string $src )

Gets the primary key field names

Input
string$srcOracle primary key definition
Output
array primary key field names.
Exception

getSchemaTableName

protected array getSchemaTableName (string $table )

Input
string$tabletable name with optional schema name prefix, uses default schema name prefix is not provided.
Output
array tuple as ($schemaName,$tableName)
Exception

getSequenceName

protected string getSequenceName (mixed $tableInfo , mixed $src )

Input
mixed$tableInfo
mixed$src
Output
string serial name if found, null otherwise.
Exception

getTableInfoClass

protected string getTableInfoClass ()

Output
string TDbTableInfo class name.
Exception

isForeignKeyColumn

protected boolean isForeignKeyColumn (string $columnId , TOracleTableInfo $tableInfo )

Input
string$columnIdcolumn name.
TOracleTableInfo$tableInfotable information.
Output
boolean true if column is a foreign key.
Exception

isPrecisionType

protected boolean isPrecisionType (mixed $type )

Input
mixed$type
Output
boolean true if column type if "numeric", "interval" or begins with "time".
Exception

processColumn

protected void processColumn (TOracleTableInfo $tableInfo , array $col )

Input
TOracleTableInfo$tableInfotable information.
array$colcolumn information.
Output
Exception

setDefaultSchema

public void setDefaultSchema (string $schema )

Input
string$schemadefault schema.
Output
Exception