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

Class: MDB2_Driver_Datatype_mysqli

Source Location: /MDB2_Driver_mysqli-1.5.0b4/MDB2/Driver/Datatype/mysqli.php

Class Overview

MDB2_Driver_Datatype_Common
   |
   --MDB2_Driver_Datatype_mysqli

MDB2 MySQLi driver


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 58]
MDB2 MySQLi driver


[ Top ]


Method Detail

getDeclaration   [line 106]

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 ]

getTypeDeclaration   [line 146]

string getTypeDeclaration( 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: public

Parameters:

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 ]

mapPrepareDatatype   [line 609]

string mapPrepareDatatype( string $type)

Maps an MDB2 datatype to native prepare type
  • Access: public

Parameters:

string   $type     

[ Top ]

matchPattern   [line 387]

string matchPattern( array $pattern, [string $operator = null], [string $field = null])

build a pattern matching string
  • Return: SQL pattern
  • Access: public

Parameters:

array   $pattern     even keys are strings, odd are patterns (% and _)
string   $operator     optional pattern operator (LIKE, ILIKE and maybe others in the future)
string   $field     optional field name that is being matched against (might be required when emulating ILIKE)

[ Top ]

_getDecimalDeclaration   [line 349]

string _getDecimalDeclaration( string $name, string $field)

Obtain DBMS specific SQL code portion needed to declare an 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

Parameters:

string   $name     name the field to be declared.
string   $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 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 312]

string _getFloatDeclaration( string $name, string $field)

Obtain DBMS specific SQL code portion needed to declare an 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

Parameters:

string   $name     name the field to be declared.
string   $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 float if possible.

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 257]

string _getIntegerDeclaration( string $name, string $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

Parameters:

string   $name     name the field to be declared.
string   $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 ]

_mapNativeDatatype   [line 441]

array _mapNativeDatatype( array $field)

Maps a native array description of a field to a MDB2 datatype and length
  • Return: containing the various possible types, length, sign, fixed
  • Access: public

Parameters:

array   $field     native field description

[ Top ]


Documentation generated on Tue, 23 Oct 2012 18:30:45 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.