DatabaseSchema: ezcDbSchemaMysqlReader
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDbSchemaMysqlReader
|
Handler for files containing PHP arrays that represent DB schema. [
source]
Implemented Interfaces
Parents
ezcDbSchemaCommonSqlReader
|
--ezcDbSchemaMysqlReader
Method Summary
|
public static string |
convertToGenericType(
$typeString, &$typeLength, &$typePrecision )
Converts the native MySQL 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 :
Methods
convertToGenericType
string convertToGenericType(
string
$typeString, int
&$typeLength, int
&$typePrecision )
Converts the native MySQL type in $typeString to a generic DbSchema type.
This method converts a string like "float(5,10)" to the generic DbSchema type and uses the by-reference parameters $typeLength and $typePrecision to communicate the optional length and precision of the field's type.
Parameters
| Name |
Type |
Description |
$typeString |
string |
|
&$typeLength |
int |
|
&$typePrecision |
int |
|
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