Path

ez components / documentation / api reference / 2007.2 / databaseschema


DatabaseSchema: ezcDbSchemaPgsqlReader

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

Class: ezcDbSchemaPgsqlReader

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

Implemented Interfaces

Method Summary

public static string convertToGenericType( $typeString, &$typeLength, &$typePrecision )
Converts the native PostgreSQL type in $typeString to a generic DbSchema type.
public int getReaderType( )
Returns what type of schema reader this class implements.
public ezcDbSchema loadFromDb( $db )
Returns a ezcDbSchema object from the database that is referenced with $db.

Methods

convertToGenericType

string convertToGenericType( string $typeString, int &$typeLength, int &$typePrecision )
Converts the native PostgreSQL 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  

getReaderType

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

loadFromDb

ezcDbSchema loadFromDb( $db )
Returns a ezcDbSchema object from the database that is referenced with $db.

Parameters

Name Type Description
$db ezcDbHandler  

Last updated: Mon, 17 Dec 2007