Class XML_Query2XML_Driver_DB

Description

Driver for the database abstraction layer PEAR DB.

usage:

  1.  $driver XML_Query2XML_Driver::factory(DB::connect(...));

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

XML_Query2XML_Driver
   |
   --XML_Query2XML_Driver_DB
Method Summary
XML_Query2XML_Driver_DB __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 DB_FETCHMODE_ASSOC.
  • access: public
XML_Query2XML_Driver_DB __construct ( $db)
  • DB_Common $db: An instance of a class that extends DB_Common.
getAllRecords (line 146)

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 an array containing the element 'query'.
  • 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 88)

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:08 +0200 by phpDocumentor 1.4.1