Path

ez components / documentation / api reference / 2009.1.2 / databaseschema


eZ Components 2009.1.2

DatabaseSchema: ezcDbSchemaCommonSqlReader

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

Class: ezcDbSchemaCommonSqlReader

An abstract class that implements some common functionality required by multiple database backends. [source]

Implemented Interfaces

Descendents

Child Class Description
ezcDbSchemaMysqlReader Handler for files containing PHP arrays that represent DB schema.
ezcDbSchemaPgsqlReader Handler for PostgreSQL connections representing a DB schema.
ezcDbSchemaOracleReader Handler for Oracle connections representing a DB schema.
ezcDbSchemaSqliteReader Handler for SQLite connections representing a DB schema.

Method Summary

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

Methods

getReaderType

int getReaderType( )
Returns what type of schema reader this class implements.
This method always returns ezcDbSchema::DATABASE

loadFromDb

ezcDbSchema loadFromDb( $db )
Returns an ezcDbSchema created from the database schema in the database referenced by $db
This method analyses the current database referenced by $db and creates a schema definition out of this. This schema definition is returned as an (@link ezcDbSchema) object.

Parameters

Name Type Description
$db ezcDbHandler  

processSchema

ezcDbSchema processSchema( $tables )
Loops over all the table names in the array 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.

Parameters

Name Type Description
$tables array(string)  

Last updated: Tue, 01 Sep 2009