Class DBErrorToException

Description

This class wraps the pears DB functions so that when an error is generated a new DBException is thrown instead.

All the functions of the pear DB libary are supported. Since this class mirrors the same functions of the pear DB libary, the original pear DB documentation should be referenced when implementation details are required.

Located in /DBErrorToException.class.php (line 32)


	
			
Method Summary
DBErrorToException __construct (mixed $IncommingDBH)
int affectedRows ()
int autoCommit ([mixed $AC = FALSE], bool $onoff)
int autoExecute (string $table, array $fields_values, [integer $mode = DB_AUTOQUERY_INSERT], [string $where = FALSE])
resource autoPrepare (string $table, mixed $table_fields, [integer $mode = DB_AUTOQUERY_INSERT], [string $where = FALSE], array $fields_values)
int commit ()
object connect (mixed $dsn, [array $options = array()])
int createSequence (string $seq_name)
bool disconnect ()
int dropSequence (string $seq_name)
string escapeSimple (string $str)
mixed execute (resource $stmt, [mixed $data = array()])
int executeMultiple (resource $stmt, mixed $data)
bool freePrepared (resource $stmt, [bool $free_resource = true])
array getAll (string $query, [array $params = array()], [integer $fetchmode = DB_FETCHMODE_DEFAULT])
array getAssoc (string $query, [bool $force_array = FALSE], [array $params = array()], [integer $fetchmode = DB_FETCHMODE_DEFAULT], [bool $group = FALSE])
array getCol (string $query, mixed $col, [mixed $params = array()])
array getListOf (string $type)
array getOne (string $query, [mixed $params = array()])
mixed getOption (string $option)
array getRow (string $query, [array $params = array()], [int $fetchmode = DB_FETCHMODE_DEFAULT])
bool isError (mixed $value)
mixed limitQuery (string $query, int $from, int $count, [mixed $params = array()])
int nextId (string $seq_name, [bool $onDemand = TRUE])
resource prepare (string $query)
bool provides (string $feature)
mixed query (string $query, [mixed $params = array()])
string quote (string $string)
string quoteIdentifier (string $str)
mixed quoteSmart (mixed $in)
int rollback ()
void setFetchMode (int $fetchmode, [string $object_class = 'stdClass'])
int setOption (string $option, mixed $value)
array tableInfo (mixed $result, [int $mode = NULL])
Methods
Constructor __construct (line 35)
DBErrorToException __construct (mixed $IncommingDBH)
affectedRows (line 44)
  • access: public
int affectedRows ()
autoCommit (line 63)
  • access: public
int autoCommit ([mixed $AC = FALSE], bool $onoff)
  • bool $onoff
autoExecute (line 85)
  • access: public
int autoExecute (string $table, array $fields_values, [integer $mode = DB_AUTOQUERY_INSERT], [string $where = FALSE])
  • string $table
  • array $fields_values
  • integer $mode
  • string $where
autoPrepare (line 107)
  • access: public
resource autoPrepare (string $table, mixed $table_fields, [integer $mode = DB_AUTOQUERY_INSERT], [string $where = FALSE], array $fields_values)
  • string $table
  • array $fields_values
  • integer $mode
  • string $where
commit (line 125)
  • access: public
int commit ()
connect (line 145)
  • static:
  • access: public
object connect (mixed $dsn, [array $options = array()])
  • mixed $dsn
  • array $options
createSequence (line 164)
  • access: public
int createSequence (string $seq_name)
  • string $seq_name
disconnect (line 182)
  • access: public
bool disconnect ()
dropSequence (line 192)
  • access: public
int dropSequence (string $seq_name)
  • string $seq_name
escapeSimple (line 211)
  • access: public
string escapeSimple (string $str)
  • string $str
execute (line 222)
  • access: public
mixed execute (resource $stmt, [mixed $data = array()])
  • resource $stmt
  • mixed $data
executeMultiple (line 245)
  • access: public
int executeMultiple (resource $stmt, mixed $data)
  • resource $stmt
  • mixed $data
freePrepared (line 269)
  • access: public
bool freePrepared (resource $stmt, [bool $free_resource = true])
  • resource $stmt
  • bool $free_resource
getAll (line 281)
  • access: public
array getAll (string $query, [array $params = array()], [integer $fetchmode = DB_FETCHMODE_DEFAULT])
  • string $query
  • array $params
  • integer $fetchmode
getAssoc (line 304)
  • access: public
array getAssoc (string $query, [bool $force_array = FALSE], [array $params = array()], [integer $fetchmode = DB_FETCHMODE_DEFAULT], [bool $group = FALSE])
  • string $query
  • bool $force_array
  • array $params
  • integer $fetchmode
  • bool $group
getCol (line 325)
  • access: public
array getCol (string $query, mixed $col, [mixed $params = array()])
  • string $query
  • mixed $col
  • mixed $params
getListOf (line 344)
  • access: public
array getListOf (string $type)
  • string $type
getOne (line 364)
  • return: mixed
  • access: public
array getOne (string $query, [mixed $params = array()])
  • string $query
  • mixed $params
getOption (line 383)
  • access: public
mixed getOption (string $option)
  • string $option
getRow (line 404)
  • access: public
array getRow (string $query, [array $params = array()], [int $fetchmode = DB_FETCHMODE_DEFAULT])
  • string $query
  • array $params
  • int $fetchmode
isError (line 629)
  • static:
  • access: public
bool isError (mixed $value)
  • mixed $value
limitQuery (line 426)
  • access: public
mixed limitQuery (string $query, int $from, int $count, [mixed $params = array()])
  • string $query
  • int $from
  • int $count
  • mixed $params
nextId (line 450)
  • access: public
int nextId (string $seq_name, [bool $onDemand = TRUE])
  • string $seq_name
  • bool $onDemand
prepare (line 469)
  • access: public
resource prepare (string $query)
  • string $query
provides (line 488)
  • access: public
bool provides (string $feature)
  • string $feature
query (line 499)
  • access: public
mixed query (string $query, [mixed $params = array()])
  • string $query
  • mixed $params
quote (line 522)
  • access: public
string quote (string $string)
  • string $string
quoteIdentifier (line 532)
  • access: public
string quoteIdentifier (string $str)
  • string $str
quoteSmart (line 542)
  • access: public
mixed quoteSmart (mixed $in)
  • mixed $in
rollback (line 551)
  • access: public
int rollback ()
setFetchMode (line 570)
  • access: public
void setFetchMode (int $fetchmode, [string $object_class = 'stdClass'])
  • int $fetchmode
  • string $object_class
setOption (line 590)
  • access: public
int setOption (string $option, mixed $value)
  • string $option
  • mixed $value
tableInfo (line 610)
  • access: public
array tableInfo (mixed $result, [int $mode = NULL])
  • mixed $result
  • int $mode

Documentation generated on Wed, 07 Sep 2005 22:55:19 -0400 by phpDocumentor 1.3.0RC3