CreoleTypes Class Reference

Inherited by MSSQLTypes, MySQLTypes, OCI8Types, PgSQLTypes, and SQLiteTypes.

List of all members.

Public Member Functions

Public Attributes


Member Function Documentation

CreoleTypes::BOOLEAN ()

 

CreoleTypes::BIGINT ()

 

CreoleTypes::SMALLINT ()

 

CreoleTypes::TINYINT ()

 

CreoleTypes::INTEGER ()

 

CreoleTypes::CHAR ()

 

CreoleTypes::VARCHAR ()

 

CreoleTypes::TEXT ()

 

CreoleTypes::FLOAT ()

 

CreoleTypes::DOUBLE ()

 

CreoleTypes::DATE ()

 

CreoleTypes::TIME ()

 

CreoleTypes::TIMESTAMP ()

 

CreoleTypes::VARBINARY ()

 

CreoleTypes::NUMERIC ()

 

CreoleTypes::BLOB ()

 

CreoleTypes::CLOB ()

 

CreoleTypes::LONGVARCHAR ()

 

CreoleTypes::DECIMAL ()

 

CreoleTypes::REAL ()

 

CreoleTypes::BINARY ()

 

CreoleTypes::LONGVARBINARY ()

 

CreoleTypes::YEAR ()

 

CreoleTypes::ARR ()

 

this is "ARRAY" from JDBC types

CreoleTypes::OTHER ()

 

CreoleTypes::getType ( $  nativeType)

 

This method returns the generic Creole (JDBC-like) type when given the native db type.

Parameters:
string $nativeType DB native type (e.g. 'TEXT', 'byetea', etc.).

Returns int Creole native type (e.g. Types::LONGVARCHAR, Types::BINARY, etc.).

Reimplemented in MSSQLTypes, MySQLTypes, OCI8Types, and PgSQLTypes.

CreoleTypes::getNativeType ( $  creoleType)

 

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.

Returns string Native type string.

Reimplemented in MSSQLTypes, MySQLTypes, OCI8Types, and PgSQLTypes.

CreoleTypes::getAffix ( $  creoleType)

 

Gets the "affix" to use for ResultSet::get*() and PreparedStatement::set*() methods. $setter = 'set' . CreoleTypes::getAffix(CreoleTypes::INTEGER); $stmt->$setter(1, $intval); // or $getter = 'get' . CreoleTypes::getAffix(CreoleTypes::TIMESTAMP); $timestamp = $rs->$getter();

Parameters:
int $creoleType The Creole types.

Returns mixed The default affix for getting/setting cols of this type on success, SQLException if $creoleType does not correspond to an affix

CreoleTypes::getAffixForValue ( $  value)

 

Given a PHP variable, returns the correct affix (for getter/setter) to use based on the PHP type of the variable.

Parameters:
mixed The PHP value for which to get affix.

Returns string

CreoleTypes::getCreoleName ( $  creoleType)

 

Given the integer type, this method will return the corresponding type name.

Parameters:
int $creoleType the integer Creole type.

Returns string The name of the Creole type (e.g. 'VARCHAR').

CreoleTypes::getCreoleCode ( $  creoleTypeName)

 

Given the name of a type (e.g. 'VARCHAR') this method will return the corresponding integer.

Parameters:
string $creoleTypeName The case-sensisive (must be uppercase) name of the Creole type (e.g. 'VARCHAR').

Returns int the Creole type.

& CreoleTypes::getInstance ()

 

Reimplemented in MSSQLTypes, MySQLTypes, OCI8Types, and PgSQLTypes.


Member Data Documentation

CreoleTypes::$affixMap = null

 

Map of Creole type integers to the setter/getter affix.

CreoleTypes::$creoleTypeMap = null

 

Map of Creole type integers to their textual name.


This file is part of the Creole[php4] library.


Copyright © 2004 Hans Lellelid  
Creole[php4] CVS