Permalink
Browse files

[ci skip] DocBlocks for DB drivers' driver classes

Partially fixes issue #1295.
  • Loading branch information...
1 parent 8463b91 commit a24e52e1c0136db0c1949e73255b4e9bf114b437 @narfbg narfbg committed Nov 2, 2012
Showing with 801 additions and 411 deletions.
  1. +14 −0 system/database/DB_driver.php
  2. +1 −1 system/database/DB_utility.php
  3. +32 −17 system/database/drivers/cubrid/cubrid_driver.php
  4. +37 −22 system/database/drivers/ibase/ibase_driver.php
  5. +38 −20 system/database/drivers/mssql/mssql_driver.php
  6. +42 −21 system/database/drivers/mysql/mysql_driver.php
  7. +41 −20 system/database/drivers/mysqli/mysqli_driver.php
  8. +75 −33 system/database/drivers/oci8/oci8_driver.php
  9. +37 −19 system/database/drivers/odbc/odbc_driver.php
  10. +33 −22 system/database/drivers/pdo/pdo_driver.php
  11. +21 −12 system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
  12. +21 −11 system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
  13. +33 −11 system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
  14. +25 −16 system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php
  15. +20 −17 system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
  16. +18 −13 system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
  17. +31 −13 system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
  18. +41 −16 system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
  19. +34 −17 system/database/drivers/pdo/subdrivers/pdo_odbc_driver.php
  20. +30 −16 system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
  21. +23 −14 system/database/drivers/pdo/subdrivers/pdo_sqlite_driver.php
  22. +33 −11 system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
  23. +34 −22 system/database/drivers/postgre/postgre_driver.php
  24. +25 −14 system/database/drivers/sqlite/sqlite_driver.php
  25. +24 −13 system/database/drivers/sqlite3/sqlite3_driver.php
  26. +38 −20 system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -306,6 +306,13 @@
protected $_reserved_identifiers = array('*');
/**
+ * Identifier escape character
+ *
+ * @var string
+ */
+ protected $_escape_char = '"';
+
+ /**
* ESCAPE statement string
*
* @var string
@@ -320,6 +327,13 @@
protected $_like_escape_chr = '!';
/**
+ * ORDER BY random keyword
+ *
+ * @var string
+ */
+ protected $_random_keyword = ' RAND()';
+
+ /**
* COUNT string
*
* @used-by CI_DB_driver::count_all()
@@ -49,7 +49,7 @@
*
* @var string
*/
- $_list_databases = FALSE;
+ protected $_list_databases = FALSE;
/**
* OPTIMIZE TABLE statement
@@ -41,18 +41,33 @@
*/
class CI_DB_cubrid_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'cubrid';
- // The character used for escaping - no need in CUBRID
- protected $_escape_char = '`';
+ /**
+ * Auto-commit flag
+ *
+ * @var bool
+ */
+ public $auto_commit = TRUE;
- protected $_random_keyword = ' RAND()'; // database specific random keyword
+ // --------------------------------------------------------------------
- // CUBRID-specific properties
- public $auto_commit = TRUE;
+ /**
+ * Identifier escape character
+ *
+ * @var string
+ */
+ protected $_escape_char = '`';
+
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* @param array $params
* @return void
@@ -114,7 +129,7 @@ public function db_pconnect()
* Except for determining if a persistent connection should be used,
* the rest of the logic is the same for db_connect() and db_pconnect().
*
- * @param bool
+ * @param bool $persistent
* @return resource
*/
protected function _cubrid_connect($persistent = FALSE)
@@ -174,7 +189,7 @@ public function version()
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return resource
*/
protected function _execute($sql)
@@ -187,7 +202,7 @@ protected function _execute($sql)
/**
* Begin Transaction
*
- * @param bool $test_mode = FALSE
+ * @param bool $test_mode
* @return bool
*/
public function trans_begin($test_mode = FALSE)
@@ -266,8 +281,8 @@ public function trans_rollback()
/**
* Escape String
*
- * @param string
- * @param bool whether or not the string will be used in a LIKE condition
+ * @param string $str
+ * @param bool $like Whether or not the string will be used in a LIKE condition
* @return string
*/
public function escape_str($str, $like = FALSE)
@@ -333,7 +348,7 @@ public function insert_id()
*
* Generates a platform-specific query string so that the table names can be fetched
*
- * @param bool
+ * @param bool $prefix_limit
* @return string
*/
protected function _list_tables($prefix_limit = FALSE)
@@ -355,7 +370,7 @@ protected function _list_tables($prefix_limit = FALSE)
*
* Generates a platform-specific query string so that the column names can be fetched
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _list_columns($table = '')
@@ -370,7 +385,7 @@ protected function _list_columns($table = '')
*
* Generates a platform-specific query so that the column data can be retrieved
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _field_data($table)
@@ -400,9 +415,9 @@ public function error()
*
* Generates a platform-specific batch update string from the supplied data
*
- * @param string the table name
- * @param array the update data
- * @param string the where key
+ * @param string $table Table name
+ * @param array $values Update data
+ * @param string $index WHERE key
* @return string
*/
protected function _update_batch($table, $values, $index)
@@ -41,15 +41,30 @@
*/
class CI_DB_ibase_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'ibase';
- // The character used to escape with
- protected $_escape_char = '"';
+ // --------------------------------------------------------------------
+
+ /**
+ * ORDER BY random keyword
+ *
+ * @var string
+ */
+ protected $_random_keyword = ' Random()';
- protected $_random_keyword = ' Random()'; // database specific random keyword
+ /**
+ * IBase Transaction status flag
+ *
+ * @var resource
+ */
+ protected $_ibase_trans;
- // Keeps track of the resource for the current transaction
- protected $trans;
+ // --------------------------------------------------------------------
/**
* Non-persistent database connection
@@ -104,7 +119,7 @@ public function version()
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return resource
*/
protected function _execute($sql)
@@ -117,7 +132,7 @@ protected function _execute($sql)
/**
* Begin Transaction
*
- * @param bool $test_mode = FALSE
+ * @param bool $test_mode
* @return bool
*/
public function trans_begin($test_mode = FALSE)
@@ -133,7 +148,7 @@ public function trans_begin($test_mode = FALSE)
// even if the queries produce a successful result.
$this->_trans_failure = ($test_mode === TRUE);
- $this->trans = @ibase_trans($this->conn_id);
+ $this->_ibase_trans = @ibase_trans($this->conn_id);
return TRUE;
}
@@ -153,7 +168,7 @@ public function trans_commit()
return TRUE;
}
- return @ibase_commit($this->trans);
+ return @ibase_commit($this->_ibase_trans);
}
// --------------------------------------------------------------------
@@ -171,16 +186,16 @@ public function trans_rollback()
return TRUE;
}
- return @ibase_rollback($this->trans);
+ return @ibase_rollback($this->_ibase_trans);
}
// --------------------------------------------------------------------
/**
* Escape String
*
- * @param string
- * @param bool whether or not the string will be used in a LIKE condition
+ * @param string $str
+ * @param bool $like Whether or not the string will be used in a LIKE condition
* @return string
*/
public function escape_str($str, $like = FALSE)
@@ -240,7 +255,7 @@ public function insert_id($generator_name, $inc_by = 0)
*
* Generates a platform-specific query string so that the table names can be fetched
*
- * @param bool
+ * @param bool $prefix_limit
* @return string
*/
protected function _list_tables($prefix_limit = FALSE)
@@ -263,7 +278,7 @@ protected function _list_tables($prefix_limit = FALSE)
*
* Generates a platform-specific query string so that the column names can be fetched
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _list_columns($table = '')
@@ -278,7 +293,7 @@ protected function _list_columns($table = '')
*
* Generates a platform-specific query so that the column data can be retrieved
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _field_data($table)
@@ -311,8 +326,8 @@ public function error()
*
* Generates a platform-specific update string from the supplied data
*
- * @param string the table name
- * @param array the update data
+ * @param string $table
+ * @param array $values
* @return string
*/
protected function _update($table, $values)
@@ -328,10 +343,10 @@ protected function _update($table, $values)
*
* Generates a platform-specific truncate string from the supplied data
*
- * If the database does not support the truncate() command,
+ * If the database does not support the TRUNCATE statement,
* then this method maps to 'DELETE FROM table'
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _truncate($table)
@@ -346,7 +361,7 @@ protected function _truncate($table)
*
* Generates a platform-specific delete string from the supplied data
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _delete($table)
@@ -358,11 +373,11 @@ protected function _delete($table)
// --------------------------------------------------------------------
/**
- * Limit string
+ * LIMIT
*
* Generates a platform-specific LIMIT clause
*
- * @param string the sql query string
+ * @param string $sql SQL Query
* @return string
*/
protected function _limit($sql)
Oops, something went wrong.

0 comments on commit a24e52e

Please sign in to comment.