MDB2
[ class tree: MDB2 ] [ index: MDB2 ] [ all elements ]

Class: MDB2_Driver_Datatype_Common

Source Location: /MDB2-2.0.0beta4/MDB2/Driver/Datatype/Common.php

Class Overview


MDB2_Driver_Common: Base class that is extended by each MDB2 driver


Author(s):

Variables

Methods


Child classes:

MDB2_Driver_Datatype_ibase
MDB2 Firebird/Interbase driver
MDB2_Driver_Datatype_fbsql
MDB2 FrontbaseSQL driver
MDB2_Driver_Datatype_oci8
MDB2 OCI8 driver
MDB2_Driver_Datatype_pgsql
MDB2 PostGreSQL driver
MDB2_Driver_Datatype_sqlite
MDB2 SQLite driver
MDB2_Driver_Datatype_mssql
MDB2 MS SQL driver
MDB2_Driver_Datatype_mysqli
MDB2 MySQL driver

Inherited Variables

Inherited Methods


Class Details

[line 60]
MDB2_Driver_Common: Base class that is extended by each MDB2 driver


[ Top ]


Class Variables

$db_index =

[line 74]


Type:   mixed


[ Top ]

$valid_types = array(
        'text'      => true,
        'boolean'   => true,
        'integer'   => true,
        'decimal'   => true,
        'float'     => true,
        'date'      => true,
        'time'      => true,
        'timestamp' => true,
        'clob'      => true,
        'blob'      => true,
    )

[line 62]


Type:   mixed


[ Top ]



Method Detail

MDB2_Driver_Datatype_Common (Constructor)   [line 86]

MDB2_Driver_Datatype_Common MDB2_Driver_Datatype_Common( $db_index)


Parameters:

   $db_index   — 

[ Top ]

__construct (Constructor)   [line 81]

MDB2_Driver_Datatype_Common __construct( $db_index)

Constructor

Parameters:

   $db_index   — 

[ Top ]

compareDefinition   [line 597]

array compareDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied
  • Return: containg all changes that will need to be applied
  • Access: public

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

convertResult   [line 196]

mixed convertResult( mixed $value, int $type)

convert a value to a RDBMS indepdenant MDB2 type
  • Return: converted value or a MDB2 error on failure
  • Access: public

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::convertResult()
convert a value to a RDBMS independent MDB2 type
MDB2_Driver_Datatype_fbsql::convertResult()
convert a value to a RDBMS indepdenant MDB2 type
MDB2_Driver_Datatype_oci8::convertResult()
convert a value to a RDBMS indepdenant MDB2 type
MDB2_Driver_Datatype_pgsql::convertResult()
convert a value to a RDBMS independent MDB2 type
MDB2_Driver_Datatype_sqlite::convertResult()
convert a value to a RDBMS indepdenant MDB2 type
MDB2_Driver_Datatype_mssql::convertResult()
convert a value to a RDBMS indepdenant MDB2 type
MDB2_Driver_Datatype_mysqli::convertResult()
convert a value to a RDBMS indepdenant MDB2 type

Parameters:

mixed   $value   —  value to be converted
int   $type   —  constant that specifies which type to convert to

[ Top ]

convertResultRow   [line 216]

mixed convertResultRow( $types, array $row, resource $result)

convert a result row
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

resource   $result   —  result identifier
array   $row   —  array with data
   $types   — 

[ Top ]

createLOB   [line 1267]

integer createLOB( array $arguments)

Create a handler object of a specified class with functions to retrieve data from a large object data stream.
  • Return: handle value that should be passed as argument insubsequent calls to functions that retrieve data from the large object input stream.
  • Access: public

Parameters:

array   $arguments   — 

An associative array with parameters to create the handler object. The array indexes are the names of the parameters and the array values are the respective parameter values.

Some parameters are specific of the class of each type of handler object that is created. The following parameters are common to all handler object classes:

type

Name of the type of the built-in supported class that will be used to create the handler object. There are currently four built-in types of handler object classes: data, resultlob, inputfile and outputfile.

The data handler class is the default class. It simply reads data from a given data string.

The resultlob handler class is meant to read data from a large object retrieved from a query result. This class is not used directly by applications.

The inputfile handler class is meant to read data from a file to use in prepared queries with large object field parameters.

The outputfile handler class is meant to write to a file data from result columns with large object fields. The functions to read from this type of large object do not return any data. Instead, the data is just written to the output file with the data retrieved from a specified large object handle.

class

Name of the class of the handler object that will be created if the Type argument is not specified. This argument should be used when you need to specify a custom handler class.

database

Database object as returned by MDB2::connect. This is an option argument needed by some handler classes like resultlob.

The following arguments are specific of the inputfile handler class:

file

Integer handle value of a file already opened for writing.

file_name

Name of a file to be opened for writing if the File argument is not specified.

The following arguments are specific of the outputfile handler class:

file

Integer handle value of a file already opened for writing.

file_name

Name of a file to be opened for writing if the File argument is not specified.

buffer_length

Integer value that specifies the length of a buffer that will be used to read from the specified large object.

LOB

Integer handle value that specifies a large object from which the data to be stored in the output file will be written.

result

Integer handle value as returned by the function MDB2::query() or MDB2::execute() that specifies the result set that contains the large object value to be retrieved. If the LOB argument is specified, this argument is ignored.

row

Integer value that specifies the number of the row of the result set that contains the large object value to be retrieved. If the LOB argument is specified, this argument is ignored.

field

Integer or string value that specifies the number or the name of the column of the result set that contains the large object value to be retrieved. If the LOB argument is specified, this argument is ignored.

binary

Boolean value that specifies whether the large object column to be retrieved is of binary type (blob) or otherwise is of character type (clob). If the LOB argument is specified, this argument is ignored.

The following argument is specific of the data handler class:

data

String of data that will be returned by the class when it requested with the readLOB() method.

The following argument is specific of the resultlob handler class:

resultLOB

Integer handle value of a large object result row field.


[ Top ]

destroyLOB   [line 1468]

void destroyLOB( integer $lob)

Free any resources allocated during the lifetime of the large object handler object.
  • Access: public

Parameters:

integer   $lob   —  argument handle that is returned by the MDB2::createLOB() method.

[ Top ]

endOfLOB   [line 1433]

boolean endOfLOB( integer $lob)

Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
  • Return: flag that indicates whether it was reached the end of the large object input stream
  • Access: public

Parameters:

integer   $lob   —  argument handle that is returned by the MDB2::createLOB() method.

[ Top ]

freeBLOBValue   [line 1016]

void freeBLOBValue( int $value)

free a binary large object
  • Access: public

Parameters:

int   $value   —  lob index

[ Top ]

freeCLOBValue   [line 984]

void freeCLOBValue( int $value)

free a character large object
  • Access: public

Parameters:

int   $value   —  lob index

[ Top ]

getDeclaration   [line 252]

string getDeclaration( string $type, string $name, string $field)

Obtain DBMS specific SQL code portion needed to declare of the given type
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: public

Parameters:

string   $type   —  type to which the value should be converted to
string   $name   —  name the field to be declared.
string   $field   —  definition of the field

[ Top ]

implodeArray   [line 1489]

string implodeArray( array $array, [string $type = false])

apply a type to all values of an array and return as a comma seperated string useful for generating IN statements
  • Return: comma seperated values
  • Access: public

Parameters:

array   $array   —  data array
string   $type   —  determines type of the field

[ Top ]

quote   [line 823]

string quote( string $value, [string $type = null])

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: public

Parameters:

string   $value   —  text string value that is intended to be converted.
string   $type   —  type to which the value should be converted to

[ Top ]

readLOB   [line 1394]

mixed readLOB( integer $lob, &$data, integer $length, string $data)

Read data from large object input stream.

Parameters:

integer   $lob   —  argument handle that is returned by the MDB2::createLOB() method.
string   $data   —  reference to a variable that will hold data to be read from the large object input stream
integer   $length   —  value that indicates the largest ammount ofdata to be read from the large object input stream.
   &$data   — 

[ Top ]

setLOBFile   [line 1318]

mixed setLOBFile( int $lob, string $file)

retrieve LOB from the database
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: protected

Parameters:

int   $lob   —  handle to a lob created by the createLOB() function
string   $file   —  name of the file into which the LOb should be fetched

[ Top ]

setResultTypes   [line 114]

mixed setResultTypes( &$result, string $types, resource $result)

Define the list of types to be associated with the columns of a given result set.

This function may be called before invoking fetchRow(), fetchOne() fetchCole() and fetchAll() so that the necessary data type conversions are performed on the data to be retrieved by them. If this function is not called, the type of all result set columns is assumed to be text, thus leading to not perform any conversions.

  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: public

Parameters:

resource   $result   —  result identifier
string   $types   —  array variable that lists the data types to be expected in the result set columns. If this array contains less types than the number of columns that are returned in the result set, the remaining columns are assumed to be of the type text. Currently, the types clob and blob are not fully supported.
   &$result   — 

[ Top ]

_baseConvertResult   [line 144]

object a _baseConvertResult( mixed $value, int $type)

general type conversion method
  • Return: MDB2 error on failure
  • Access: protected

Parameters:

mixed   $value   —  refernce to a value to be converted
int   $type   —  constant that specifies which type to convert to

[ Top ]

_compareBLOBDefinition   [line 709]

array _compareBLOBDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an BLOB field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareBooleanDefinition   [line 773]

array _compareBooleanDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an boolean field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareCLOBDefinition   [line 693]

array _compareCLOBDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an CLOB field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareDateDefinition   [line 725]

array _compareDateDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an date field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareDecimalDefinition   [line 805]

array _compareDecimalDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an decimal field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareFloatDefinition   [line 789]

array _compareFloatDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an float field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareIntegerDefinition   [line 647]

array _compareIntegerDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an integer field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareTextDefinition   [line 670]

array _compareTextDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an text field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareTimeDefinition   [line 741]

array _compareTimeDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an time field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_compareTimestampDefinition   [line 757]

array _compareTimestampDefinition( array $current, array $previous)

Obtain an array of changes that may need to applied to an timestamp field
  • Return: containg all changes that will need to be applied
  • Access: protected

Parameters:

array   $current   —  new definition
array   $previous   —  old definition

[ Top ]

_destroyResultLOB   [line 1449]

void _destroyResultLOB( int $lob)

Free any resources allocated during the lifetime of the large object handler object.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_destroyResultLOB()
Free any resources allocated during the lifetime of the large object handler object.
MDB2_Driver_Datatype_pgsql::_destroyResultLOB()
Free any resources allocated during the lifetime of the large object handler object.

Parameters:

int   $lob   —  handle to a lob created by the createLOB() function

[ Top ]

_endOfResultLOB   [line 1411]

mixed _endOfResultLOB( int $lob)

Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
  • Return: true or false on success, a MDB2 error on failure
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_endOfResultLOB()
Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.
MDB2_Driver_Datatype_pgsql::_endOfResultLOB()
Determine whether it was reached the end of the large object and therefore there is no more data to be read for the its input stream.

Parameters:

int   $lob   —  handle to a lob created by the createLOB() function

[ Top ]

_getBLOBDeclaration   [line 392]

string _getBLOBDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getBLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare a binary large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getBLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getBLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getBLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare a binary large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getBLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getBLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getBLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an binary large object type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

length Integer value that determines the maximum length of the large object field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getBooleanDeclaration   [line 422]

string _getBooleanDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_fbsql::_getBooleanDeclaration()
Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getBooleanDeclaration()
Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getBooleanDeclaration()
Obtain DBMS specific SQL code portion needed to declare a boolean type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

default Boolean value to be used as default for this field.

notnullL Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getCLOBDeclaration   [line 360]

string _getCLOBDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getCLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare a character large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getCLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getCLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getCLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare a character large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getCLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getCLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getCLOBDeclaration()
Obtain DBMS specific SQL code portion needed to declare an character large object type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

length Integer value that determines the maximum length of the large object field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getDateDeclaration   [line 453]

string _getDateDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getDateDeclaration()
Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getDateDeclaration()
Obtain DBMS specific SQL code portion needed to declare an date type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getDateDeclaration()
Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getDateDeclaration()
Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getDateDeclaration()
Obtain DBMS specific SQL code portion needed to declare an date type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getDateDeclaration()
Obtain DBMS specific SQL code portion needed to declare a date type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getDateDeclaration()
Obtain DBMS specific SQL code portion needed to declare an date type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

default Date value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getDecimalDeclaration   [line 577]

string _getDecimalDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getDecimalDeclaration()
Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getDecimalDeclaration()
Obtain DBMS specific SQL code portion needed to declare an decimal type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getDecimalDeclaration()
Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getDecimalDeclaration()
Obtain DBMS specific SQL code portion needed to declare a decimal type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getDecimalDeclaration()
Obtain DBMS specific SQL code portion needed to declare an decimal type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getDecimalDeclaration()
Obtain DBMS specific SQL code portion needed to declare an decimal type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getDecimalDeclaration()
Obtain DBMS specific SQL code portion needed to declare an decimal type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

default Decimal value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getFloatDeclaration   [line 546]

string _getFloatDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getFloatDeclaration()
Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getFloatDeclaration()
Obtain DBMS specific SQL code portion needed to declare an float type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getFloatDeclaration()
Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getFloatDeclaration()
Obtain DBMS specific SQL code portion needed to declare a float type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getFloatDeclaration()
Obtain DBMS specific SQL code portion needed to declare an float type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getFloatDeclaration()
Obtain DBMS specific SQL code portion needed to declare an float type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getFloatDeclaration()
Obtain DBMS specific SQL code portion needed to declare an float type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

default Float value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getIntegerDeclaration   [line 287]

string _getIntegerDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_fbsql::_getIntegerDeclaration()
Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getIntegerDeclaration()
Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getIntegerDeclaration()
Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getIntegerDeclaration()
Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getIntegerDeclaration()
Obtain DBMS specific SQL code portion needed to declare an integer type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

unsigned Boolean flag that indicates whether the field should be declared as unsigned integer if possible.

default Integer value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getTextDeclaration   [line 326]

string _getTextDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getTextDeclaration()
Obtain DBMS specific SQL code portion needed to declare a text type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getTextDeclaration()
Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getTextDeclaration()
Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getTextDeclaration()
Obtain DBMS specific SQL code portion needed to declare a text type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getTextDeclaration()
Obtain DBMS specific SQL code portion needed to declare an text type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

length Integer value that determines the maximum length of the text field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS.

default Text value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getTimeDeclaration   [line 515]

string _getTimeDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getTimeDeclaration()
Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getTimeDeclaration()
Obtain DBMS specific SQL code portion needed to declare an time type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getTimeDeclaration()
Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getTimeDeclaration()
Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getTimeDeclaration()
Obtain DBMS specific SQL code portion needed to declare an time type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getTimeDeclaration()
Obtain DBMS specific SQL code portion needed to declare a time field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getTimeDeclaration()
Obtain DBMS specific SQL code portion needed to declare an time type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

default Time value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_getTimestampDeclaration   [line 484]

string _getTimestampDeclaration( string $name, array $field)

Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE.
  • Return: DBMS specific SQL code portion that should be used to declare the specified field.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_getTimestampDeclaration()
Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_fbsql::_getTimestampDeclaration()
Obtain DBMS specific SQL code portion needed to declare an timestamp type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_oci8::_getTimestampDeclaration()
Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_pgsql::_getTimestampDeclaration()
Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_sqlite::_getTimestampDeclaration()
Obtain DBMS specific SQL code portion needed to declare an timestamp type field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mssql::_getTimestampDeclaration()
Obtain DBMS specific SQL code portion needed to declare a timestamp field to be used in statements like CREATE TABLE.
MDB2_Driver_Datatype_mysqli::_getTimestampDeclaration()
Obtain DBMS specific SQL code portion needed to declare an timestamp type field to be used in statements like CREATE TABLE.

Parameters:

string   $name   —  name the field to be declared.
array   $field   — 

associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows:

default Timestamp value to be used as default for this field.

notnull Boolean flag that indicates whether this field is constrained to not be set to null.


[ Top ]

_quoteBLOB   [line 1002]

string _quoteBLOB( $value $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_quoteBLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_fbsql::_quoteBLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_oci8::_quoteBLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_pgsql::_quoteBLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_mssql::_quoteBLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_mysqli::_quoteBLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

$value   $value   — 

[ Top ]

_quoteBoolean   [line 1034]

string _quoteBoolean( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_quoteBoolean()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_fbsql::_quoteBoolean()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_pgsql::_quoteBoolean()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_mssql::_quoteBoolean()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_quoteCLOB   [line 970]

string _quoteCLOB( $value $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_quoteCLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_oci8::_quoteCLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_pgsql::_quoteCLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

$value   $value   — 

[ Top ]

_quoteDate   [line 1051]

string _quoteDate( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_fbsql::_quoteDate()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_oci8::_quoteDate()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_quoteDecimal   [line 1119]

string _quoteDecimal( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_quoteDecimal()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_fbsql::_quoteDecimal()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_oci8::_quoteDecimal()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_pgsql::_quoteDecimal()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_sqlite::_quoteDecimal()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_mssql::_quoteDecimal()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_mysqli::_quoteDecimal()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_quoteFloat   [line 1102]

string _quoteFloat( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_fbsql::_quoteFloat()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_oci8::_quoteFloat()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_pgsql::_quoteFloat()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_sqlite::_quoteFloat()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_mssql::_quoteFloat()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_mysqli::_quoteFloat()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_quoteInteger   [line 879]

string _quoteInteger( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_quoteLOB   [line 952]

string _quoteLOB( $value $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_quoteLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_pgsql::_quoteLOB()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

$value   $value   — 

[ Top ]

_quoteText   [line 896]

string _quoteText( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that already contains any DBMS specific escaped character sequences.
  • Access: protected

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_quoteTime   [line 1085]

string _quoteTime( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_fbsql::_quoteTime()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_oci8::_quoteTime()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_quoteTimestamp   [line 1068]

string _quoteTimestamp( string $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_fbsql::_quoteTimestamp()
Convert a text value into a DBMS specific format that is suitable to compose query statements.
MDB2_Driver_Datatype_oci8::_quoteTimestamp()
Convert a text value into a DBMS specific format that is suitable to compose query statements.

Parameters:

string   $value   —  text string value that is intended to be converted.

[ Top ]

_readFile   [line 914]

string _readFile( $value $value)

Convert a text value into a DBMS specific format that is suitable to compose query statements.
  • Return: text string that represents the given argument value in a DBMS specific format.
  • Access: protected

Parameters:

$value   $value   — 

[ Top ]

_readResultLOB   [line 1364]

mixed _readResultLOB( int $lob, &$data, int $length, blob $data)

Read data from large object input stream.
  • Return: length on success, a MDB2 error on failure
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_readResultLOB()
Read data from large object input stream.
MDB2_Driver_Datatype_pgsql::_readResultLOB()
Read data from large object input stream.

Parameters:

int   $lob   —  handle to a lob created by the createLOB() function
blob   $data   —  reference to a variable that will hold data to be read from the large object input stream
int   $length   —  integer value that indicates the largest ammount of data to be read from the large object input stream.
   &$data   — 

[ Top ]

_retrieveLOB   [line 1340]

mixed _retrieveLOB( int $lob)

retrieve LOB from the database
  • Return: MDB2_OK on success, a MDB2 error on failure
  • Access: protected

Overridden in child classes as:

MDB2_Driver_Datatype_ibase::_retrieveLOB()
retrieve LOB from the database
MDB2_Driver_Datatype_oci8::_retrieveLOB()
retrieve LOB from the database
MDB2_Driver_Datatype_pgsql::_retrieveLOB()
retrieve LOB from the database

Parameters:

int   $lob   —  handle to a lob created by the createLOB() function

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:20:15 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.