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

Class: XML_Query2XML_Driver_MDB2

Source Location: /XML_Query2XML-1.7.2/XML/Query2XML/Driver/MDB2.php

Class Overview

XML_Query2XML_Driver
   |
   --XML_Query2XML_Driver_MDB2

Driver for the database abstraction layer PEAR MDB2.


Author(s):

Version:

  • Release: 1.7.2

Copyright:

  • 2006 Lukas Feiler

Methods


Inherited Variables

Inherited Methods

Class: XML_Query2XML_Driver

XML_Query2XML_Driver::factory()
Factory method.
XML_Query2XML_Driver::getAllRecords()
This method, when implemented executes the query passed as the first argument and returns all records from the result set.
XML_Query2XML_Driver::preprocessQuery()
Pre-processes a query specification and returns a string representation of the query.

Class Details

[line 44]
Driver for the database abstraction layer PEAR MDB2.

usage:

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



[ Top ]


Method Detail

__construct (Constructor)   [line 60]

XML_Query2XML_Driver_MDB2 __construct( MDB2_Driver_Common $db)

Constructor
  • Throws: XML_Query2XML_DBException If the fetch mode cannot be set to MDB2_FETCHMODE_ASSOC.
  • Access: public

Parameters:

MDB2_Driver_Common   $db   —  An instance of MDB2_Driver_Common.

[ Top ]

getAllRecords   [line 134]

array getAllRecords( mixed $sql, string $configPath)

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

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

Parameters:

mixed   $sql   —  The SQL query as a string or an array.
string   $configPath   —  The config path; used for exception messages.

[ Top ]

preprocessQuery   [line 87]

string preprocessQuery( mixed &$query, string $configPath)

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

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

Parameters:

mixed   &$query   —  A string or an array containing the element 'query'.
string   $configPath   —  The config path; used for exception messages.

[ Top ]


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