Path

ez components / documentation / api reference / 2008.2.3 / databaseschema


eZ Components 2008.2.3

DatabaseSchema: ezcDbSchemaOracleReader

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcDbSchemaOracleReader

Handler for Oracle connections representing a DB schema. [source]

Implemented Interfaces

Parents

ezcDbSchemaCommonSqlReader
   |
   --ezcDbSchemaOracleReader

Method Summary

public static string convertToGenericType( $typeString, &$typeLength, $typePrecision, $typeLength )
Converts the native Oracle type in $typeString to a generic DbSchema type.
protected ezcDbSchema fetchSchema( )
Loops over all the tables in the database and extracts schema information.
protected array(string=>ezcDbSchemaField) fetchTableFields( $tableName )
Fetch fields definition for the table $tableName
protected array(string=>ezcDbSchemaIndex) fetchTableIndexes( $tableName )
Loops over all the indexes in the table $table and extracts information.

Inherited Methods

From ezcDbSchemaCommonSqlReader :
public int ezcDbSchemaCommonSqlReader::getReaderType()
Returns what type of schema reader this class implements.
public ezcDbSchema ezcDbSchemaCommonSqlReader::loadFromDb()
Returns an ezcDbSchema created from the database schema in the database referenced by $db
protected ezcDbSchema ezcDbSchemaCommonSqlReader::processSchema()
Loops over all the table names in the array and extracts schema information.

Methods

convertToGenericType

string convertToGenericType( string $typeString, &$typeLength, int $typePrecision, int $typeLength )
Converts the native Oracle type in $typeString to a generic DbSchema type.
This method converts a string like "VARCHAR2" to the generic DbSchema type and uses parameters $typeLength and $typePrecision to detect emulated types char(1) == 'boolean', number(N) == "decimal".

Parameters

Name Type Description
$typeString string  
$typeLength int  
$typePrecision int  
&$typeLength  

fetchSchema

ezcDbSchema fetchSchema( )
Loops over all the tables in the database and extracts schema information.
This method extracts information about a database's schema from the database itself and returns this schema as an ezcDbSchema object.

fetchTableFields

array(string=>ezcDbSchemaField) fetchTableFields( string $tableName )
Fetch fields definition for the table $tableName
This method loops over all the fields in the table $tableName and returns an array with the field specification. The key in the returned array is the name of the field.

Parameters

Name Type Description
$tableName string  

fetchTableIndexes

array(string=>ezcDbSchemaIndex) fetchTableIndexes( string $tableName )
Loops over all the indexes in the table $table and extracts information.
This method extracts information about the table $tableName's indexes from the database and returns this schema as an array of ezcDbSchemaIndex objects. The key in the array is the index' name.

Parameters

Name Type Description
$tableName string  

Last updated: Mon, 11 May 2009