Class XML_Query2XML_Driver_MDB2

Description

Driver for the database abstraction layer PEAR MDB2.

usage:

  1.  $driver XML_Query2XML_Driver::factory(MDB2::factory(...));

Located in /Query2XML/Driver/MDB2.php (line 44)

XML_Query2XML_Driver
   |
   --XML_Query2XML_Driver_MDB2
Method Summary
XML_Query2XML_Driver_MDB2 __construct ( $db)
array getAllRecords (mixed $sql, string $configPath)
string preprocessQuery (mixed &$query, string $configPath)
Methods
Constructor __construct (line 60)

Constructor

  • throws: XML_Query2XML_DBException If the fetch mode cannot be set to MDB2_FETCHMODE_ASSOC.
  • access: public
XML_Query2XML_Driver_MDB2 __construct ( $db)
  • MDB2_Driver_Common $db: An instance of MDB2_Driver_Common.
getAllRecords (line 134)

Execute a SQL SELECT stement and fetch all records from the result set.

array getAllRecords (mixed $sql, string $configPath)
  • mixed $sql: The SQL query as a string or an array.
  • string $configPath: The config path; used for exception messages.

Redefinition of:
XML_Query2XML_Driver::getAllRecords()
This method, when implemented executes the query passed as the first argument and returns all records from the result set.
preprocessQuery (line 87)

Pre-processes a query specification and returns a string representation of the query.

This method will call parent::preprocessQuery(). Additionally it will verify $query['limit'] and $query['offset'].

  • return: The query statement as a string.
  • throws: XML_Query2XML_ConfigException If $query['limit'] or $query['offset'] is set but not numeric. This exception might also bubble up from parent::preprocessQuery().
  • access: public
string preprocessQuery (mixed &$query, string $configPath)
  • mixed &$query: A string or an array containing the element 'query'.
  • string $configPath: The config path; used for exception messages.

Redefinition of:
XML_Query2XML_Driver::preprocessQuery()
Pre-processes a query specification and returns a string representation of the query.

Inherited Methods

Inherited From XML_Query2XML_Driver

XML_Query2XML_Driver::factory()
XML_Query2XML_Driver::getAllRecords()
XML_Query2XML_Driver::preprocessQuery()

Documentation generated on Sun, 03 Apr 2011 13:13:09 +0200 by phpDocumentor 1.4.1