Static Public Member Functions | |
static | getType ($nativeType) |
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 Oracle native types to Creole (JDBC) types. | |
static | $reverseMap = null |
Reverse mapping, created on demand. |
Definition at line 33 of file OCI8Types.php.
static OCI8Types::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.
int | $creoleType |
Reimplemented from CreoleTypes.
Definition at line 80 of file OCI8Types.php.
00081 { 00082 if (self::$reverseMap === null) { 00083 self::$reverseMap = array_flip(self::$typeMap); 00084 } 00085 return @self::$reverseMap[$creoleType]; 00086 }
static OCI8Types::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 62 of file OCI8Types.php.
References CreoleTypes::OTHER.
Referenced by OCI8TableInfo::initColumns().
00063 { 00064 $t = strtolower($nativeType); 00065 if (isset(self::$typeMap[$t])) { 00066 return self::$typeMap[$t]; 00067 } else { 00068 return CreoleTypes::OTHER; 00069 } 00070 }
OCI8Types::$reverseMap = null [static, private] |
OCI8Types::$typeMap [static, private] |
Initial value:
array( 'char' => CreoleTypes::CHAR, 'varchar2' => CreoleTypes::VARCHAR, 'long' => CreoleTypes::LONGVARCHAR, 'number' => CreoleTypes::NUMERIC, 'float' => CreoleTypes::FLOAT, 'integer' => CreoleTypes::INTEGER, 'smallint' => CreoleTypes::SMALLINT, 'double' => CreoleTypes::DOUBLE, 'raw' => CreoleTypes::VARBINARY, 'longraw' => CreoleTypes::LONGVARBINARY, 'date' => CreoleTypes::TIMESTAMP, 'blob' => CreoleTypes::BLOB, 'clob' => CreoleTypes::CLOB, 'varray' => CreoleTypes::ARR, )
Definition at line 36 of file OCI8Types.php.