creole.drivers.odbc
[ class tree: creole.drivers.odbc ] [ index: creole.drivers.odbc ] [ all elements ]

Class: ODBCTypes

Source Location: /creole/drivers/odbc/ODBCTypes.php

Class Overview

CreoleTypes
   |
   --ODBCTypes

ODBC types / type map.


Author(s):

Version:

  • $Revision: 1.1 $

Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: CreoleTypes

CreoleTypes::getAffix()
Gets the "affix" to use for ResultSet::get*() and PreparedStatement::set*() methods.
CreoleTypes::getCreoleCode()
Given the name of a type (e.g. 'VARCHAR') this method will return the corresponding integer.
CreoleTypes::getCreoleName()
Given the integer type, this method will return the corresponding type name.
CreoleTypes::getNativeType()
This method will return a native type that corresponds to the specified Creole (JDBC-like) type.
CreoleTypes::getType()
This method returns the generic Creole (JDBC-like) type when given the native db type.

Class Details

[line 32]
ODBC types / type map.



Tags:

version:  $Revision: 1.1 $
author:  Dave Lawson <dlawson@masterytech.com>


[ Top ]


Class Variables

$reverseMap =  null

[line 42]

Reverse mapping, created on demand.



Tags:

static:  
access:  protected

Type:   mixed


[ Top ]

$typeMap =  null

[line 37]

Map ODBC native types to Creole (JDBC) types.



Tags:

static:  
access:  protected

Type:   mixed


[ Top ]



Class Methods


method getNativeType [line 178]

string getNativeType( int $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.




Tags:

return:  Native type string.
static:  
access:  public


Overrides CreoleTypes::getNativeType() (This method will return a native type that corresponds to the specified Creole (JDBC-like) type.)

Parameters:

int   $creoleType  

[ Top ]

method getType [line 156]

int getType( string $nativeType)

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



Tags:

return:  Creole native type (e.g. CreoleTypes::LONGVARCHAR, CreoleTypes::BINARY, etc.).
static:  
access:  public


Overrides CreoleTypes::getType() (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.).

[ Top ]

method loadTypeMap [line 51]

void loadTypeMap( [mixed $conn = null])

Loads the map of ODBC data types to Creole (JDBC) types.

NOTE: This function cannot map DBMS-specific datatypes. If you use a driver which implements DBMS-specific datatypes, you will need to modify/extend this class to add the correct mapping.




Tags:

static:  
access:  public


[ Top ]


Documentation generated on Mon, 23 Aug 2004 21:52:30 -0400 by phpDocumentor 1.3.0RC3