cvs: php4 /pear/DB common.php

From: Date: Sat, 19 Jan 2002 07:22:48 +0000
Subject: cvs: php4 /pear/DB common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2003@lists.php.net to get a copy of this message
cox Sat Jan 19 02:22:48 2002 EDT Modified files: /php4/pear/DB common.php Log: ws

Index: php4/pear/DB/common.php diff -u php4/pear/DB/common.php:1.76 php4/pear/DB/common.php:1.77 --- php4/pear/DB/common.php:1.76 Sat Dec 29 01:36:57 2001 +++ php4/pear/DB/common.php Sat Jan 19 02:22:48 2002 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: common.php,v 1.76 2001/12/29 06:36:57 ssb Exp $ +// $Id: common.php,v 1.77 2002/01/19 07:22:48 cox Exp $ // // Base class for DB implementations. // @@ -34,82 +34,82 @@ * assoc of capabilities for this DB implementation * $features['limit'] => 'emulate' => emulate with fetch row by number * 'alter' => alter the query - * false => no support for limit queries + * false => no support for limit queries * @var array - */ + */ var $features; - + /** * assoc mapping native error codes to DB ones * @var array - */ + */ var $errorcode_map; - + /** * DB type (mysql, oci8, odbc etc.) * @var string */ var $type; - + /** * @var string - */ + */ var $prepare_tokens; /** * @var string - */ + */ var $prepare_types; /** * @var string - */ + */ var $prepared_queries; /** * @var integer - */ + */ var $prepare_maxstmt = 0; /** * @var string - */ + */ var $last_query = ''; /** * @var integer - */ + */ var $fetchmode = DB_FETCHMODE_ORDERED; /** * @var string - */ + */ var $fetchmode_object_class = 'stdClass'; - + /** * for limit queries, the row to start fetching * @var integer - */ + */ var $limit_from = null; /** * for limit queries, the number of rows to fetch - * @var integer - */ + * @var integer + */ var $limit_count = null; /** * $options["persistent"] -> boolean persistent connection true|false? * $options["optimize"] -> string 'performance' or 'portability' - * $options["debug"] -> integer numeric debug level - * @var array - */ + * $options["debug"] -> integer numeric debug level + * @var array + */ var $options = array( - 'persistent' => false, - 'optimize' => 'performance', - 'debug' => 0 + 'persistent' => false, + 'optimize' => 'performance', + 'debug' => 0 ); - + /** * DB handle * @var resource @@ -159,7 +159,7 @@ * in a query (preserved for compatibility issues, quote() is preffered). * * @return string quoted string - * @access public + * @access public * @see quote() */ function quoteString($string) @@ -193,7 +193,7 @@ * Tell whether a DB implementation or its backend extension * supports a given feature. * - * @param array $feature name of the feature (see the DB class doc) + * @param array $feature name of the feature (see the DB class doc) * @return bool whether this DB implementation supports $feature * @access public */ @@ -216,7 +216,7 @@ * * @return int a portable DB error code, or FALSE if this DB * implementation has no mapping for the given error code. - * + * * @access public */ @@ -354,7 +354,7 @@ * * @param string $option option name * @param mixed $value value for the option - * + * * @return mixed DB_OK or DB_Error */ function setOption($option, $value) @@ -387,7 +387,7 @@ // {{{ prepare() /** - * Prepares a query for multiple execution with execute(). + * Prepares a query for multiple execution with execute(). * With some database backends, this is emulated. * prepare() requires a generic query as string like * "INSERT INTO numbers VALUES(?,?,?)". The ? are wildcards. @@ -395,9 +395,9 @@ * ? - a quoted scalar value, i.e. strings, integers * & - requires a file name, the content of the file * insert into the query (i.e. saving binary data - * in a db) - * ! - value is inserted 'as is' - * + * in a db) + * ! - value is inserted 'as is' + * * @param string the query to prepare * * @return resource handle for the query @@ -440,10 +440,10 @@ // {{{ execute() /** * Executes a prepared SQL query - * With execute() the generic query of prepare is + * With execute() the generic query of prepare is * assigned with the given data array. The values * of the array inserted into the query in the same - * order like the array order + * order like the array order * * @param resource $stmt query handle from prepare() * @param array $data numeric array containing the @@ -453,7 +453,7 @@ * * @access public * @see prepare() - */ + */ function execute($stmt, $data = false) { $realquery = $this->executeEmulateQuery($stmt, $data); @@ -473,14 +473,14 @@ /** * Emulates the execute statement, when not supported - * + * * @param resource $stmt query handle from prepare() * @param array $data numeric array containing the * data to insert into the query * * @return mixed a string containing the real query run when emulating * prepare/execute. A DB error code is returned on failure. - * + * * @access private * @see execute() */ @@ -583,7 +583,7 @@ * * @return the new (modified) query * - * @access private + * @access private */ function modifyQuery($query) { return $query; @@ -600,7 +600,7 @@ * * @return the new (modified) query * - * @access private + * @access private */ function modifyLimitQuery($query, $from, $count) @@ -649,13 +649,13 @@ * Generates a limited query * *EXPERIMENTAL* * - * @param string $query query + * @param string $query query * @param integer $from the row to start to fetching * @param integer $count the numbers of rows to fetch * * @return mixed a DB_Result object or a DB_Error * - * @access public + * @access public */ function limitQuery($query, $from, $count) { @@ -682,9 +682,9 @@ * @param array $params if supplied, prepare/execute will be used * with this array as execute parameters * - * @return mixed DB_Error or the returned value of the query - * - * @access public + * @return mixed DB_Error or the returned value of the query + * + * @access public */ function &getOne($query, $params = array()) @@ -893,7 +893,7 @@ * * Keep in mind that database functions in PHP usually return string * values for results regardless of the database's internal type. - * + * * @param string $query the SQL query * * @param boolean $force_array used only when the query returns @@ -902,7 +902,7 @@ * * @param array $params array if supplied, prepare/execute will be used * with this array as execute parameters - * + * * @param boolean $group if true, the values of the returned array * is wrapped in another array. If the same * key value (in the first column) repeats @@ -1006,7 +1006,7 @@ * @param array $params array if supplied, prepare/execute will be used * with this array as execute parameters * @param integer $fetchmode the fetch mode to use - * + * * @access public * @return array an nested array, or a DB error */ @@ -1074,7 +1074,7 @@ // {{{ autoCommit() /** * enable automatic Commit - * + * * @param boolean $onoff * @return mixed DB_Error * @@ -1089,10 +1089,10 @@ // {{{ commit() /** * starts a Commit - * + * * @return mixed DB_Error * - * @access public + * @access public */ function commit() { @@ -1103,10 +1103,10 @@ // {{{ rollback() /** * starts a rollback - * + * * @return mixed DB_Error * - * @access public + * @access public */ function rollback() { @@ -1118,11 +1118,11 @@ /** * returns the number of rows in a result object * - * @param object DB_Result the result object to check - * + * @param object DB_Result the result object to check + * * @return mixed DB_Error or the number of rows * - * @access public + * @access public */ function numRows($result) { @@ -1133,10 +1133,10 @@ // {{{ affectedRows() /** * returns the affected rows of a query - * + * * @return mixed DB_Error or number of rows * - * @access public + * @access public */ function affectedRows() { @@ -1147,10 +1147,10 @@ // {{{ errorNative() /** * returns an errormessage, provides by the database - * + * * @return mixed DB_Error or message * - * @access public + * @access public */ function errorNative() { @@ -1161,12 +1161,12 @@ // {{{ nextId() /** * returns the next free id of a sequence - * + * * @param string $seq_name name of the sequence - * @param boolean $ondemand when true the seqence is + * @param boolean $ondemand when true the seqence is * automatic created, if it * not exists - * + * * @return mixed DB_Error or id */ function nextId($seq_name, $ondemand = true) @@ -1180,10 +1180,10 @@ * creates a new sequence * * @param string $seq_name name of the new sequence - * + * * @return mixed DB_Error * - * @access public + * @access public */ function createSequence($seq_name) { @@ -1196,10 +1196,10 @@ * deletes a sequence * * @param string $seq_name name of the sequence - * + * * @return mixed DB_Error * - * @access public + * @access public */ function dropSequence($seq_name) { @@ -1209,14 +1209,14 @@ // }}} // {{{ tableInfo() /** - * returns meta data about the result set - * + * returns meta data about the result set + * * @param object DB_Result $result the result object to analyse * @param mixed $mode depends on implementation - * + * * @return mixed DB_Error * - * @access public + * @access public */ function tableInfo($result, $mode = null) { @@ -1237,14 +1237,14 @@ // {{{ getListOf() /** * list internal DB info - * valid values for $type are db dependent, + * valid values for $type are db dependent, * often: databases, users, view, functions * * @param string $type type of requested info * * @return mixed DB_Error or the requested data * - * @access public + * @access public */ function getListOf($type) {
« previous php.pear.cvs (#2003) next »