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

Class: XML_Query2XML_Driver

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

Class Overview


Abstract driver class.


Author(s):

Version:

  • Release: 1.7.2

Methods


Child classes:

XML_Query2XML_Driver_PDO
Driver for the database abstraction layer PDO.
XML_Query2XML_Driver_MDB2
Driver for the database abstraction layer PEAR MDB2.
XML_Query2XML_Driver_LDAP
Driver for Net_LDAP.
XML_Query2XML_Driver_LDAP2
Driver for Net_LDAP2.
XML_Query2XML_Driver_Array
Array-based driver.
XML_Query2XML_Driver_ADOdb
Driver for the database abstraction layer ADOdb.
XML_Query2XML_Driver_DB
Driver for the database abstraction layer PEAR DB.

Inherited Variables

Inherited Methods


Class Details

[line 2564]
Abstract driver class.

usage:

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



[ Top ]


Method Detail

factory   [line 2638]

XML_Query2XML_Driver factory( mixed $backend)

Factory method.
  • Return: An instance of a driver class that extends XML_Query2XML_Driver.
  • Throws: XML_Query2XML_DriverException If $backend already is a PEAR_Error.
  • Throws: XML_Query2XML_ConfigException If $backend is not an instance of a child class of MDB2_Driver_Common, PDO, DB_common, ADOConnection, Net_LDAP2 or Net_LDAP.
  • Access: public

Overridden in child classes as:

XML_Query2XML_Driver_Array::factory()
Factory method

Parameters:

mixed   $backend   —  An instance of MDB2_Driver_Common, PDO, DB_common, ADOConnection, Net_LDAP2 or Net_LDAP.

[ Top ]

getAllRecords   [line 2579]

array getAllRecords( mixed $sql, string $configPath)

This method, when implemented executes the query passed as the first argument and returns all records from the result set.

The format of the first argument depends on the driver being used.

  • Return: An array of records. Each record itself will be an associative array.
  • Abstract:
  • Throws: XML_Query2XML_DriverException If some driver related error occures.
  • Access: public

Overridden in child classes as:

XML_Query2XML_Driver_PDO::getAllRecords()
Execute a SQL SELECT stement and fetch all records from the result set.
XML_Query2XML_Driver_MDB2::getAllRecords()
Execute a SQL SELECT stement and fetch all records from the result set.
XML_Query2XML_Driver_LDAP::getAllRecords()
Execute a LDAP query stement and fetch all results.
XML_Query2XML_Driver_LDAP2::getAllRecords()
Execute a LDAP query stement and fetch all results.
XML_Query2XML_Driver_Array::getAllRecords()
Returns all records from a named result set.
XML_Query2XML_Driver_ADOdb::getAllRecords()
Execute a SQL SELECT statement and fetch all records from the result set.
XML_Query2XML_Driver_DB::getAllRecords()
Execute a SQL SELECT stement and fetch 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 2597]

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

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

The returned string will be used for logging purposes. It does not need to be valid SQL.

If $query is a string, it will be changed to array('query' => $query).

  • Return: The query statement as a string.
  • Throws: XML_Query2XML_ConfigException If $query is an array but does not contain the element 'query'.
  • Access: public

Overridden in child classes as:

XML_Query2XML_Driver_MDB2::preprocessQuery()
Pre-processes a query specification and returns a string representation of the query.
XML_Query2XML_Driver_LDAP::preprocessQuery()
Pre-processes LDAP query specifications.
XML_Query2XML_Driver_LDAP2::preprocessQuery()
Pre-processes LDAP query specifications.
XML_Query2XML_Driver_DB::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.