Abstract Class Horde_Rdo_Adapter

Description

Database adapter abstract parent class for Rdo.

  • abstract:

Located in /Rdo/lib/Horde/Rdo/Adapter.php (line 13)


	
			
Direct descendents
Class Description
 class Horde_Rdo_Adapter_Mysqli MySQL Improved Horde_Rdo adapter
 class Horde_Rdo_Adapter_Oci8
Abstract class Horde_Rdo_Adapter_Pdo PDO Horde_Rdo_Adapter generic implementation. Provides most functionality but must be extended with a concrete implementation to fill in database-specific details.
Variable Summary
Method Summary
 static void factory ( $adapter,  $options)
 Horde_Rdo_Adapter __construct ([array $options = array()])
 void commit ()
 void count (mixed $query, [Horde_Rdo_Mapper $mapper = null])
 integer create (Horde_Rdo_Mapper $mapper, array $fields)
 integer delete (Horde_Rdo_Mapper $mapper, array|Horde_Rdo_Query $query)
 integer execute (string $sql, [array $bindParams = array()])
 void exists (mixed $query, [Horde_Rdo_Mapper $mapper = null])
 void getOption (string $option)
 void loadModel (Horde_Rdo_Model $model)
 mixed query (Horde_Rdo_Query $query)
 mixed queryCol (Horde_Rdo_Query $query)
 mixed queryOne (Horde_Rdo_Query $query)
 void rollBack ()
 PDOStatement select (string $sql, [array $bindParams = array()])
 mixed selectCol (string $sql, [ $bindParams = array()])
 mixed selectOne (string $sql, [ $bindParams = array()])
 void setOption (string $option, string $value)
 integer update (Horde_Rdo_Mapper $mapper, scalar $id, array $fields)
Variables
Horde_Rdo_Query_Builder $dml = null (line 43)

DML query generator.

  • access: public
array $_options = array() (line 50)

Options for this Adapter.

  • access: protected
Methods
static factory (line 17)
  • access: public
static void factory ( $adapter,  $options)
  • $adapter
  • $options
Constructor __construct (line 58)

Horde_Rdo_Adapter constructor. Sets options and sets up a connection if necessary.

  • access: public
Horde_Rdo_Adapter __construct ([array $options = array()])
  • array $options: Connection options.

Redefined in descendants as:
beginTransaction (line 287)
  • abstract:
  • access: public
void beginTransaction ()

Redefined in descendants as:
commit (line 291)
  • abstract:
  • access: public
void commit ()

Redefined in descendants as:
count (line 102)
  • access: public
void count (mixed $query, [Horde_Rdo_Mapper $mapper = null])
create (line 168)

Create a backend object.

  • return: The new object's primary key value, or throw an exception if any errors occur.
  • access: public
integer create (Horde_Rdo_Mapper $mapper, array $fields)
  • Horde_Rdo_Mapper $mapper: The Mapper creating the object.
  • array $fields: Hash of field names/new values.
delete (line 225)

Delete one or more objects from the database.

  • return: Number of objects deleted.
  • access: public
integer delete (Horde_Rdo_Mapper $mapper, array|Horde_Rdo_Query $query)
execute (line 283)

Use for INSERT, UPDATE, DELETE, and other queries that don't return rows. Returns number of affected rows.

  • return: The number of rows affected by $sql.
  • abstract:
  • access: public
integer execute (string $sql, [array $bindParams = array()])
  • string $sql: The query to run.
  • array $bindParams: Any parameters to bind to the query.

Redefined in descendants as:
exists (line 89)
  • access: public
void exists (mixed $query, [Horde_Rdo_Mapper $mapper = null])
getOption (line 69)

Get one of the options for this Adapter.

  • access: public
void getOption (string $option)
  • string $option: The option to get.
loadModel (line 157)

Get a description of the database table that $model is going to reflect.

  • abstract:
  • access: public
void loadModel (Horde_Rdo_Model $model)

Redefined in descendants as:
query (line 118)

Use for SELECT and anything that returns rows.

  • return: Result set.
  • access: public
mixed query (Horde_Rdo_Query $query)
queryCol (line 145)

Return a single column from a query.

  • return: The first column of all rows matched by $query.
  • access: public
mixed queryCol (Horde_Rdo_Query $query)
queryOne (line 132)

Return a single value from a query. Useful for quickly getting a value such as with a COUNT(*) query.

  • return: The first value of the first row matched by $query.
  • access: public
mixed queryOne (Horde_Rdo_Query $query)
rollBack (line 295)
  • abstract:
  • access: public
void rollBack ()

Redefined in descendants as:
select (line 253)

Use for SELECT and anything that returns rows.

  • return: Result set.
  • abstract:
  • access: public
PDOStatement select (string $sql, [array $bindParams = array()])
  • string $sql: A full SQL query to run.
  • array $bindParams: Any parameters to bind to the query.

Redefined in descendants as:
selectCol (line 272)

Return a single column from a query.

  • return: The first column of all rows matched by $sql.
  • abstract:
  • access: public
mixed selectCol (string $sql, [ $bindParams = array()])
  • string $sql: The SQL to get one column from.
  • $bindParams

Redefined in descendants as:
selectOne (line 263)

Return a single value from a query. Useful for quickly getting a value such as with a COUNT(*) query.

  • return: The first value of the first row matched by $sql.
  • abstract:
  • access: public
mixed selectOne (string $sql, [ $bindParams = array()])
  • string $sql: The SQL to get one result from.
  • $bindParams

Redefined in descendants as:
setOption (line 80)

Set one of the options for this Adapter.

  • access: public
void setOption (string $option, string $value)
  • string $option: The option to set.
  • string $value: The option's value.
update (line 198)

Updates a backend object.

  • return: Number of objects updated.
  • access: public
integer update (Horde_Rdo_Mapper $mapper, scalar $id, array $fields)
  • Horde_Rdo_Mapper $mapper: The Mapper requesting the update.
  • scalar $id: The unique key of the object being updated.
  • array $fields: Hash of field names/new values.

Documentation generated on Sun, 30 Jan 2011 05:14:59 +0000 by phpDocumentor 1.4.3