.

IDBDriver Interface Reference
[Interfaces]

Defines a db driver, e.g for MySQL or PostgreSQL. More...

Inheritance diagram for IDBDriver:
DBDriverMysql

List of all members.

Public Member Functions

  escape ($value)
  Escape given value.
  escape_database_entity ($obj, $type=self::FIELD)
  Escape given database object, like table, field etc.
  execute ($sql)
  Execute an SQL command (Insert, Update.
  explain ($sql)
  Explain the given query.
  get_db_name ()
  Returns name of DB.
  get_driver_name ()
  Return name of driver, e.g "mysql".
  get_host ()
  Returns host name of database.
  get_status ()
  Return current status.
  has_feature ($feature)
  Returns true, if a given feature is supported.
  initialize ($dbname, $user= '', $password= '', $host= 'localhost', $params=false)
  Connect to DB.
  last_insert_id ()
  Get last insert ID.
  make_default ()
  Make this driver the default driver.
  query ($sql)
  Execute a Select statement.
  quote ($value)
  Quote given value.
  trans_commit ()
  Commit transaction.
  trans_rollback ()
  Rollback transaction.
  trans_start ()
  Start transaction.

Public Attributes

const  ALIAS = 'ALIAS'
const  FEATURE_REPLACE = 'replace'
const  FIELD = 'FIELD'
const  TABLE = 'TABLE'

Detailed Description

Defines a db driver, e.g for MySQL or PostgreSQL.

Author:
Gerd Riesselmann

Definition at line 8 of file idbdriver.cls.php.


Member Function Documentation

IDBDriver::escape ( value  ) 

Escape given value.

Parameters:
mixed  $value
Returns:
string

Implemented in DBDriverMysql.

IDBDriver::escape_database_entity ( obj,
type = self::FIELD  
)

Escape given database object, like table, field etc.

Parameters:
string  $obj
string  $type What to escape, field, table, or alias

Implemented in DBDriverMysql.

IDBDriver::execute ( sql  ) 

Execute an SQL command (Insert, Update.

..)

Parameters:
string  $sql
Returns:
Status

Implemented in DBDriverMysql.

IDBDriver::explain ( sql  ) 

Explain the given query.

Since:
0.5.1
Parameters:
string  $sql
Returns:
IDBResultSet False if quey cant be explain or driver does not support it

Implemented in DBDriverMysql.

IDBDriver::get_db_name (  ) 

Returns name of DB.

Returns:
string

Implemented in DBDriverMysql.

IDBDriver::get_driver_name (  ) 

Return name of driver, e.g "mysql".

Lowercase!

Returns:
string

Implemented in DBDriverMysql.

IDBDriver::get_host (  ) 

Returns host name of database.

Returns:
string

Implemented in DBDriverMysql.

IDBDriver::get_status (  ) 

Return current status.

Returns:
Status

Implemented in DBDriverMysql.

IDBDriver::has_feature ( feature  ) 

Returns true, if a given feature is supported.

Parameters:
string  feature
Returns:
bool

Implemented in DBDriverMysql.

IDBDriver::initialize ( dbname,
user = '',
password = '',
host = 'localhost',
params = false  
)

Connect to DB.

Parameters:
string  $dbname Name of DB
string  $user Username
string  $password Password
string  $host Host
mixed  $params Driver dependend

Implemented in DBDriverMysql.

IDBDriver::last_insert_id (  ) 

Get last insert ID.

Implemented in DBDriverMysql.

IDBDriver::make_default (  ) 

Make this driver the default driver.

Returns:
Status

Implemented in DBDriverMysql.

IDBDriver::query ( sql  ) 

Execute a Select statement.

Parameters:
string  $sql
Returns:
IDBResultSet

Implemented in DBDriverMysql.

IDBDriver::quote ( value  ) 

Quote given value.

Parameters:
string  $value

Implemented in DBDriverMysql.

IDBDriver::trans_commit (  ) 

Commit transaction.

Implemented in DBDriverMysql.

IDBDriver::trans_rollback (  ) 

Rollback transaction.

Implemented in DBDriverMysql.

IDBDriver::trans_start (  ) 

Start transaction.

Implemented in DBDriverMysql.


Member Data Documentation

Definition at line 12 of file idbdriver.cls.php.

const IDBDriver::FEATURE_REPLACE = 'replace'

Definition at line 9 of file idbdriver.cls.php.

Definition at line 13 of file idbdriver.cls.php.

Definition at line 11 of file idbdriver.cls.php.


The documentation for this interface was generated from the following file: