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

File: MDB2_datatype_testcase.php

Source Location: /MDB2-2.4.0/tests/MDB2_datatype_testcase.php

Page Details:

Includes:

require_once('MDB2_testcase.php') [line 46]

datatype_test_callback [line 68]

mixed datatype_test_callback( &$db, string $method, array $aParameters, MDB2 $db)

A test callback function to be used in the test class below for ensuring that custom datatype callback features are handled correctly.
  • Return: Returns the appropriate value depending on the method that called the function. See MDB2_Driver_Datatype_Common for details of the expected return values of the five possible calling methods.


Parameters

MDB2   $db   The MDB2 database reource object.
string   $method   The name of the MDB2_Driver_Datatype_Common method the callback function was called from. One of "getValidTypes", "convertResult", "getDeclaration", "compareDefinition", "quote" and "mapPrepareDatatype". See MDB2_Driver_Datatype_Common for the details of what each method does.
array   $aParameters   An array of parameters, being the parameters that were passed to the method calling the callback function.
   &$db  
[ Top ]



nativetype_test_callback [line 121]

array nativetype_test_callback( &$db, array $aFields, MDB2 $db)

A test callback function to be used in the test class below for ensuring that custom nativetype to datatype mapping is handled correctly.
  • Return: Returns an array of the following items:
    1. => An array of possible MDB2 datatypes. As this is a custom type, always has one entry, "test".
    2. => The length of the type, if defined by the nativetype, otherwise null.
    3. => A boolean value indicating the "unsigned" nature of numeric fields. Always null in this case, as this custom test type is not numeric.
    4. => A boolean value indicating the "fixed" nature of text fields. Always bull in this case, as this custom test type is not textual.


Parameters

MDB2   $db   The MDB2 database reource object.
array   $aFields   The standard array of fields produced from the MySQL command "SHOW COLUMNS". See http://dev.mysql.com/doc/refman/5.0/en/describe.html for more details on the format of the fields. "type" The nativetype column type "null" "YES" or "NO" "key" "PRI", "UNI", "MUL", or null "default" The default value of the column "extra" "auto_increment", or null
   &$db  
[ Top ]



Documentation generated on Tue, 13 Mar 2007 17:00:40 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.