Zeta Components Manual :: Docs For Class ezcDbSchemaCommonSqlReader
DatabaseSchema::ezcDbSchemaCommonSqlReader
Class ezcDbSchemaCommonSqlReader
An abstract class that implements some common functionality required by multiple database backends.
Source for this file: /DatabaseSchema/src/handlers/common_sql_reader.php
Implements interfaces:
| Version: | //autogentag// |
Descendants
| Child Class | Description |
|---|---|
| ezcDbSchemaMysqlReader | Handler for files containing PHP arrays that represent DB schema. |
| ezcDbSchemaPgsqlReader | Handler for PostgreSQL connections representing a DB schema. |
| ezcDbSchemaSqliteReader | Handler for SQLite connections representing a DB schema. |
| ezcDbSchemaOracleReader | Handler for Oracle 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
Returns what type of schema reader this class implements.
This method always returns ezcDbSchema::DATABASE
Implementation of:
| Method | Description |
|---|---|
ezcDbSchemaReader::getReaderType() |
Returns what type of schema reader this class implements. |
loadFromDb
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 |
Implementation of:
| Method | Description |
|---|---|
ezcDbSchemaDbReader::loadFromDb() |
Returns an ezcDbSchema created from the database schema in the database referenced by $db |
processSchema
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) |