Static Public Member Functions | |
static | getType ($pgsqlType) |
This method returns the generic Creole (JDBC-like) type when given the native db type. | |
static | getNativeType ($creoleType) |
This method will return a native type that corresponds to the specified Creole (JDBC-like) type. | |
Static Private Attributes | |
static | $typeMap |
Map PostgreSQL native types to Creole (JDBC) types. | |
static | $reverseMap = null |
Reverse lookup map, created on demand. |
Definition at line 32 of file PgSQLTypes.php.
static PgSQLTypes::getNativeType | ( | $ | creoleType | ) | [static] |
This method will return a native type that corresponds to the specified Creole (JDBC-like) type.
If there is more than one matching native type, then the LAST defined native type will be returned.
Reimplemented from CreoleTypes.
Definition at line 93 of file PgSQLTypes.php.
Referenced by PgSQLTableInfo::processLengthScale().
00094 { 00095 if (self::$reverseMap === null) { 00096 self::$reverseMap = array_flip(self::$typeMap); 00097 } 00098 return @self::$reverseMap[$creoleType]; 00099 }
static PgSQLTypes::getType | ( | $ | nativeType | ) | [static] |
This method returns the generic Creole (JDBC-like) type when given the native db type.
string | $nativeType DB native type (e.g. 'TEXT', 'byetea', etc.). |
Reimplemented from CreoleTypes.
Definition at line 83 of file PgSQLTypes.php.
References CreoleTypes::OTHER.
Referenced by PgSQLTableInfo::initColumns().
00084 { 00085 $t = strtolower($pgsqlType); 00086 if (isset(self::$typeMap[$t])) { 00087 return self::$typeMap[$t]; 00088 } else { 00089 return CreoleTypes::OTHER; 00090 } 00091 }
PgSQLTypes::$reverseMap = null [static, private] |
PgSQLTypes::$typeMap [static, private] |