Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[ci skip] DocBlocks for DB drivers' driver classes

Partially fixes issue #1295.
  • Loading branch information...
commit a24e52e1c0136db0c1949e73255b4e9bf114b437 1 parent 8463b91
Andrey Andreev narfbg authored
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
14 system/database/DB_driver.php
View
@@ -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()
2  system/database/DB_utility.php
View
@@ -49,7 +49,7 @@
*
* @var string
*/
- $_list_databases = FALSE;
+ protected $_list_databases = FALSE;
/**
* OPTIMIZE TABLE statement
49 system/database/drivers/cubrid/cubrid_driver.php
View
@@ -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)
59 system/database/drivers/ibase/ibase_driver.php
View
@@ -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,7 +186,7 @@ public function trans_rollback()
return TRUE;
}
- return @ibase_rollback($this->trans);
+ return @ibase_rollback($this->_ibase_trans);
}
// --------------------------------------------------------------------
@@ -179,8 +194,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)
@@ -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)
58 system/database/drivers/mssql/mssql_driver.php
View
@@ -41,18 +41,36 @@
*/
class CI_DB_mssql_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'mssql';
- // The character used for escaping
- protected $_escape_char = '"';
+ // --------------------------------------------------------------------
+ /**
+ * ORDER BY random keyword
+ *
+ * @var string
+ */
protected $_random_keyword = ' NEWID()';
- // MSSQL-specific properties
+ /**
+ * Quoted identifier flag
+ *
+ * Whether to use SQL-92 standard quoted identifier
+ * (double quotes) or brackets for identifier escaping.
+ *
+ * @var bool
+ */
protected $_quoted_identifier = TRUE;
+ // --------------------------------------------------------------------
+
/**
- * Constructor
+ * Class constructor
*
* Appends the port number to the hostname, if needed.
*
@@ -74,7 +92,7 @@ public function __construct($params)
/**
* Non-persistent database connection
*
- * @param bool
+ * @param bool $persistent
* @return resource
*/
public function db_connect($persistent = FALSE)
@@ -114,7 +132,7 @@ public function db_pconnect()
/**
* Select the database
*
- * @param string database name
+ * @param string $database
* @return bool
*/
public function db_select($database = '')
@@ -140,7 +158,7 @@ public function db_select($database = '')
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return mixed resource if rows are returned, bool otherwise
*/
protected function _execute($sql)
@@ -153,7 +171,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)
@@ -213,8 +231,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)
@@ -296,7 +314,7 @@ protected function _version()
*
* 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)
@@ -321,7 +339,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 = '')
@@ -336,7 +354,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)
@@ -368,8 +386,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)
@@ -386,10 +404,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)
@@ -404,7 +422,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)
@@ -420,11 +438,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)
63 system/database/drivers/mysql/mysql_driver.php
View
@@ -41,25 +41,46 @@
*/
class CI_DB_mysql_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'mysql';
- public $compress = FALSE;
-
- // The character used for escaping
- protected $_escape_char = '`';
- protected $_random_keyword = ' RAND()'; // database specific random keyword
+ /**
+ * Compression flag
+ *
+ * @var bool
+ */
+ public $compress = FALSE;
/**
+ * DELETE hack flag
+ *
* Whether to use the MySQL "delete hack" which allows the number
* of affected rows to be shown. Uses a preg_replace when enabled,
* adding a bit more processing to all queries.
+ *
+ * @var bool
*/
public $delete_hack = TRUE;
+ // --------------------------------------------------------------------
+
+ /**
+ * Identifier escape character
+ *
+ * @var string
+ */
+ protected $_escape_char = '`';
+
+ // --------------------------------------------------------------------
+
/**
- * Constructor
+ * Class constructor
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -77,7 +98,7 @@ public function __construct($params)
/**
* Non-persistent database connection
*
- * @param bool
+ * @param bool $persistent
* @return resource
*/
public function db_connect($persistent = FALSE)
@@ -129,7 +150,7 @@ public function reconnect()
/**
* Select the database
*
- * @param string database name
+ * @param string $database
* @return bool
*/
public function db_select($database = '')
@@ -153,7 +174,7 @@ public function db_select($database = '')
/**
* Set client character set
*
- * @param string
+ * @param string $charset
* @return bool
*/
protected function _db_set_charset($charset)
@@ -180,7 +201,7 @@ public function version()
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return mixed
*/
protected function _execute($sql)
@@ -195,7 +216,7 @@ protected function _execute($sql)
*
* If needed, each database adapter can prep the query string
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return string
*/
protected function _prep_query($sql)
@@ -215,7 +236,7 @@ protected function _prep_query($sql)
/**
* Begin Transaction
*
- * @param bool $test_mode = FALSE
+ * @param bool $test_mode
* @return bool
*/
public function trans_begin($test_mode = FALSE)
@@ -281,8 +302,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)
@@ -341,7 +362,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)
@@ -363,7 +384,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 = '')
@@ -376,7 +397,7 @@ protected function _list_columns($table = '')
/**
* Returns an object with field data
*
- * @param string the table name
+ * @param string $table
* @return object
*/
public function field_data($table = '')
@@ -427,9 +448,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)
61 system/database/drivers/mysqli/mysqli_driver.php
View
@@ -41,25 +41,46 @@
*/
class CI_DB_mysqli_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'mysqli';
- public $compress = FALSE;
-
- // The character used for escaping
- protected $_escape_char = '`';
- protected $_random_keyword = ' RAND()'; // database specific random keyword
+ /**
+ * Compression flag
+ *
+ * @var bool
+ */
+ public $compress = FALSE;
/**
+ * DELETE hack flag
+ *
* Whether to use the MySQL "delete hack" which allows the number
* of affected rows to be shown. Uses a preg_replace when enabled,
* adding a bit more processing to all queries.
+ *
+ * @var bool
*/
public $delete_hack = TRUE;
+ // --------------------------------------------------------------------
+
+ /**
+ * Identifier escape character
+ *
+ * @var string
+ */
+ protected $_escape_char = '`';
+
+ // --------------------------------------------------------------------
+
/**
- * Non-persistent database connection
+ * Database connection
*
- * @param bool
+ * @param bool $persistent
* @return object
* @todo SSL support
*/
@@ -111,7 +132,7 @@ public function reconnect()
/**
* Select the database
*
- * @param string database name
+ * @param string $database
* @return bool
*/
public function db_select($database = '')
@@ -135,7 +156,7 @@ public function db_select($database = '')
/**
* Set client character set
*
- * @param string
+ * @param string $charset
* @return bool
*/
protected function _db_set_charset($charset)
@@ -162,7 +183,7 @@ public function version()
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return mixed
*/
protected function _execute($sql)
@@ -177,7 +198,7 @@ protected function _execute($sql)
*
* If needed, each database adapter can prep the query string
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return string
*/
protected function _prep_query($sql)
@@ -197,7 +218,7 @@ protected function _prep_query($sql)
/**
* Begin Transaction
*
- * @param bool $test_mode = FALSE
+ * @param bool $test_mode
* @return bool
*/
public function trans_begin($test_mode = FALSE)
@@ -263,8 +284,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)
@@ -323,7 +344,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)
@@ -345,7 +366,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 = '')
@@ -358,7 +379,7 @@ protected function _list_columns($table = '')
/**
* Returns an object with field data
*
- * @param string the table name
+ * @param string $table
* @return object
*/
public function field_data($table = '')
@@ -417,9 +438,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)
108 system/database/drivers/oci8/oci8_driver.php
View
@@ -50,34 +50,76 @@
*/
class CI_DB_oci8_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'oci8';
- // The character used for excaping
- protected $_escape_char = '"';
+ /**
+ * Statement ID
+ *
+ * @var resource
+ */
+ public $stmt_id;
/**
- * The syntax to count rows is slightly different across different
- * database engines, so this string appears in each driver and is
- * used for the count_all() and count_all_results() functions.
+ * Cursor ID
+ *
+ * @var resource
*/
- protected $_count_string = 'SELECT COUNT(1) AS ';
- protected $_random_keyword = ' ASC'; // not currently supported
+ public $curs_id;
+
+ /**
+ * Commit mode flag
+ *
+ * @var int
+ */
+ public $commit_mode = OCI_COMMIT_ON_SUCCESS;
+
+ /**
+ * Limit used flag
+ *
+ * If we use LIMIT, we'll add a field that will
+ * throw off num_fields later.
+ *
+ * @var bool
+ */
+ public $limit_used;
+ // --------------------------------------------------------------------
+
+ /**
+ * List of reserved identifiers
+ *
+ * Identifiers that must NOT be escaped.
+ *
+ * @var string[]
+ */
protected $_reserved_identifiers = array('*', 'rownum');
- // Set "auto commit" by default
- public $commit_mode = OCI_COMMIT_ON_SUCCESS;
+ /**
+ * ORDER BY random keyword
+ *
+ * @var string
+ */
+ protected $_random_keyword = ' ASC'; // not currently supported
- // need to track statement id and cursor id
- public $stmt_id;
- public $curs_id;
+ /**
+ * COUNT string
+ *
+ * @used-by CI_DB_driver::count_all()
+ * @used-by CI_DB_query_builder::count_all_results()
+ *
+ * @var string
+ */
+ protected $_count_string = 'SELECT COUNT(1) AS ';
- // if we use a limit, we will add a field that will
- // throw off num_fields later
- public $limit_used;
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* @param array $params
* @return void
@@ -208,7 +250,7 @@ public function version()
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return resource
*/
protected function _execute($sql)
@@ -227,7 +269,7 @@ protected function _execute($sql)
/**
* Generate a statement ID
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return void
*/
protected function _set_stmt_id($sql)
@@ -307,7 +349,7 @@ public function stored_procedure($package, $procedure, $params)
/**
* Bind parameters
*
- * @param array
+ * @param array $params
* @return void
*/
protected function _bind_params($params)
@@ -336,7 +378,7 @@ protected function _bind_params($params)
/**
* Begin Transaction
*
- * @param bool
+ * @param bool $test_mode
* @return bool
*/
public function trans_begin($test_mode = FALSE)
@@ -409,8 +451,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)
@@ -470,7 +512,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)
@@ -493,7 +535,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 = '')
@@ -508,7 +550,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)
@@ -554,9 +596,9 @@ public function error()
*
* Generates a platform-specific insert string from the supplied data
*
- * @param string the table name
- * @param array the insert keys
- * @param array the insert values
+ * @param string $table Table name
+ * @param array $keys INSERT keys
+ * @param array $values INSERT values
* @return string
*/
protected function _insert_batch($table, $keys, $values)
@@ -579,10 +621,10 @@ protected function _insert_batch($table, $keys, $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)
@@ -597,7 +639,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)
@@ -614,11 +656,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)
56 system/database/drivers/odbc/odbc_driver.php
View
@@ -41,24 +41,42 @@
*/
class CI_DB_odbc_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'odbc';
- // the character used to excape - not necessary for ODBC
- protected $_escape_char = '';
+ /**
+ * Database schema
+ *
+ * @var string
+ */
+ public $schema = 'public';
- protected $_like_escape_str = " {escape '%s'} ";
+ // --------------------------------------------------------------------
- protected $_random_keyword;
+ /**
+ * Identifier escape character
+ *
+ * Must be empty for ODBC.
+ *
+ * @var string
+ */
+ protected $_escape_char = '';
/**
- * Database schema
+ * ESCAPE statement string
*
* @var string
*/
- public $schema = 'public';
+ protected $_like_escape_str = " {escape '%s'} ";
+
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* @param array $params
* @return void
@@ -105,7 +123,7 @@ public function db_pconnect()
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql an SQL query
* @return resource
*/
protected function _execute($sql)
@@ -118,7 +136,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)
@@ -182,8 +200,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)
@@ -242,7 +260,7 @@ public function insert_id()
*
* Generates a platform-specific query string so that the table names can be fetched
*
- * @param bool $prefix_limit = FALSE
+ * @param bool $prefix_limit
* @return string
*/
protected function _list_tables($prefix_limit = FALSE)
@@ -265,7 +283,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 = '')
@@ -280,7 +298,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)
@@ -310,8 +328,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 +346,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 +364,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)
55 system/database/drivers/pdo/pdo_driver.php
View
@@ -41,22 +41,33 @@
*/
class CI_DB_pdo_driver extends CI_DB {
+ /**
+ * Database driver
+ *
+ * @var string
+ */
public $dbdriver = 'pdo';
- // The character used to escaping
- protected $_escape_char = '"';
-
- protected $_random_keyword;
-
+ /**
+ * Transaction enabled flag
+ *
+ * @var bool
+ */
public $trans_enabled = FALSE;
- // need to track the PDO options
+ /**
+ * PDO Options
+ *
+ * @var array
+ */
public $options = array();
+ // --------------------------------------------------------------------
+
/**
- * Constructor
+ * Class constructor
*
- * Validates the DSN string and/or detects the subdriver
+ * Validates the DSN string and/or detects the subdriver.
*
* @param array $params
* @return void
@@ -104,9 +115,9 @@ public function __construct($params)
// --------------------------------------------------------------------
/**
- * Non-persistent database connection
+ * Database connection
*
- * @param bool
+ * @param bool $persistent
* @return object
*/
public function db_connect($persistent = FALSE)
@@ -171,7 +182,7 @@ public function version()
/**
* Execute the query
*
- * @param string an SQL query
+ * @param string $sql SQL query
* @return mixed
*/
protected function _execute($sql)
@@ -184,7 +195,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)
@@ -244,8 +255,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)
@@ -297,7 +308,7 @@ public function affected_rows()
/**
* Insert ID
*
- * @param string
+ * @param string $name
* @return int
*/
public function insert_id($name = NULL)
@@ -312,7 +323,7 @@ public function insert_id($name = NULL)
*
* 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)
@@ -356,9 +367,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)
@@ -402,10 +413,10 @@ protected function _update_batch($table, $values, $index)
*
* 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)
@@ -416,4 +427,4 @@ protected function _truncate($table)
}
/* End of file pdo_driver.php */
-/* Location: ./system/database/drivers/pdo/pdo_driver.php */
+/* Location: ./system/database/drivers/pdo/pdo_driver.php */
33 system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
View
@@ -41,19 +41,28 @@
*/
class CI_DB_pdo_4d_driver extends CI_DB_pdo_driver {
+ /**
+ * Sub-driver
+ *
+ * @var string
+ */
public $subdriver = '4d';
- // The character used for escaping
+ /**
+ * Identifier escape character
+ *
+ * @var string[]
+ */
protected $_escape_char = array('[', ']');
- protected $_random_keyword = ' RAND()';
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* Builds the DSN if not already set.
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -81,7 +90,7 @@ public function __construct($params)
*
* 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)
@@ -104,7 +113,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 = '')
@@ -120,7 +129,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)
@@ -135,8 +144,8 @@ protected function _field_data($table)
*
* 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)
@@ -153,7 +162,7 @@ protected function _update($table, $values)
*
* Generates a platform-specific delete string from the supplied data
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _delete($table)
@@ -165,11 +174,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)
32 system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
View
@@ -41,18 +41,28 @@
*/
class CI_DB_pdo_cubrid_driver extends CI_DB_pdo_driver {
+ /**
+ * Sub-driver
+ *
+ * @var string
+ */
public $subdriver = 'cubrid';
+ /**
+ * Identifier escape character
+ *
+ * @var string
+ */
protected $_escape_char = '`';
- protected $_random_keyword = ' RAND()';
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* Builds the DSN if not already set.
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -76,7 +86,7 @@ public function __construct($params)
*
* 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)
@@ -98,7 +108,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 = '')
@@ -113,7 +123,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)
@@ -128,9 +138,9 @@ protected function _field_data($table)
*
* 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)
@@ -169,10 +179,10 @@ protected function _update_batch($table, $values, $index)
*
* 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)
44 system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
View
@@ -41,18 +41,40 @@
*/
class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver {
+ /**
+ * Sub-driver
+ *
+ * @var string
+ */
public $subdriver = 'dblib';
+ // --------------------------------------------------------------------
+
+ /**
+ * ORDER BY random keyword
+ *
+ * @var string
+ */
protected $_random_keyword = ' NEWID()';
+ /**
+ * Quoted identifier flag
+ *
+ * Whether to use SQL-92 standard quoted identifier
+ * (double quotes) or brackets for identifier escaping.
+ *
+ * @var bool
+ */
protected $_quoted_identifier;
+ // --------------------------------------------------------------------
+
/**
- * Constructor
+ * Class constructor
*
* Builds the DSN if not already set.
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -86,9 +108,9 @@ public function __construct($params)
// --------------------------------------------------------------------
/**
- * Non-persistent database connection
+ * Database connection
*
- * @param bool
+ * @param bool $persistent
* @return object
*/
public function db_connect($persistent = FALSE)
@@ -116,7 +138,7 @@ public function db_connect($persistent = FALSE)
*
* 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)
@@ -141,7 +163,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 = '')
@@ -158,8 +180,8 @@ protected function _list_columns($table = '')
*
* 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)
@@ -176,7 +198,7 @@ protected function _update($table, $values)
*
* Generates a platform-specific delete string from the supplied data
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _delete($table)
@@ -192,11 +214,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)
41 system/database/drivers/pdo/subdrivers/pdo_firebird_driver.php
View
@@ -41,21 +41,30 @@
*/
class CI_DB_pdo_firebird_driver extends CI_DB_pdo_driver {
+ /**
+ * Sub-driver
+ *
+ * @var string
+ */
public $subdriver = 'firebird';
+ // --------------------------------------------------------------------
+
/**
- * The syntax to count rows is slightly different across different
- * database engines, so this string appears in each driver and is
- * used for the count_all() and count_all_results() functions.
+ * ORDER BY random keyword
+ *
+ * @var string
*/
- protected $_random_keyword = ' RANDOM()'; // Currently not supported
+ protected $_random_keyword = ' RANDOM()';
+
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* Builds the DSN if not already set.
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -91,7 +100,7 @@ public function __construct($params)
*
* 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)
@@ -114,7 +123,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 = '')
@@ -129,7 +138,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)
@@ -144,8 +153,8 @@ protected function _field_data($table)
*
* 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)
@@ -161,10 +170,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)
@@ -179,7 +188,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)
@@ -191,11 +200,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)
37 system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
View
@@ -41,16 +41,21 @@
*/
class CI_DB_pdo_ibm_driver extends CI_DB_pdo_driver {
+ /**
+ * Sub-driver
+ *
+ * @var string
+ */
public $subdriver = 'ibm';
- protected $_random_keyword = ' RAND()';
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* Builds the DSN if not already set.
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -116,7 +121,7 @@ public function __construct($params)
*
* 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)
@@ -139,7 +144,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 = '')
@@ -155,7 +160,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)
@@ -170,8 +175,8 @@ protected function _field_data($table)
*
* 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)
@@ -188,7 +193,7 @@ protected function _update($table, $values)
*
* Generates a platform-specific delete string from the supplied data
*
- * @param string the table name
+ * @param string $table
* @return string
*/
protected function _delete($table)
@@ -200,21 +205,19 @@ protected function _delete($table)
// --------------------------------------------------------------------
/**
- * Limit string
+ * LIMIT
*
* Generates a platform-specific LIMIT clause
*
- * @param string the sql query string
- * @param int the number of rows to limit the query to
- * @param int the offset value
+ * @param string $sql SQL Query
* @return string
*/
- protected function _limit($sql, $limit, $offset)
+ protected function _limit($sql)
{
- $sql .= ' FETCH FIRST '.($limit + $offset).' ROWS ONLY';
+ $sql .= ' FETCH FIRST '.($this->qb_limit + $this->qb_offset).' ROWS ONLY';
- return ($offset)
- ? 'SELECT * FROM ('.$sql.') WHERE rownum > '.$offset
+ return ($this->qb_offset)
+ ? 'SELECT * FROM ('.$sql.') WHERE rownum > '.$this->qb_offset
: $sql;
}
31 system/database/drivers/pdo/subdrivers/pdo_informix_driver.php
View
@@ -41,16 +41,21 @@
*/
class CI_DB_pdo_informix_driver extends CI_DB_pdo_driver {
+ /**
+ * Sub-driver
+ *
+ * @var string
+ */
public $subdriver = 'informix';
- protected $_random_keyword = ' RAND()';
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* Builds the DSN if not already set.
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -109,7 +114,7 @@ public function __construct($params)
*
* 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)
@@ -132,7 +137,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 = '')
@@ -149,7 +154,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)
@@ -164,8 +169,8 @@ protected function _field_data($table)
*
* 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)
@@ -182,10 +187,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)
@@ -200,7 +205,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)
@@ -212,11 +217,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)
44 system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
View
@@ -41,19 +41,37 @@
*/
class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
+ /**
+ * Sub-driver
+ *
+ * @var string
+ */
public $subdriver = 'mysql';
+
+ /**
+ * Compression flag
+ *
+ * @var bool
+ */
public $compress = FALSE;
+ // --------------------------------------------------------------------
+
+ /**
+ * Identifier escape character
+ *
+ * @var string
+ */
protected $_escape_char = '`';
- protected $_random_keyword = ' RAND()';
+ // --------------------------------------------------------------------
/**
- * Constructor
+ * Class constructor
*
* Builds the DSN if not already set.
*
- * @param array
+ * @param array $params
* @return void
*/
public function __construct($params)
@@ -77,9 +95,9 @@ public function __construct($params)
// --------------------------------------------------------------------
/**
- * Non-persistent database connection
+ * Database connection
*
- * @param bool
+ * @param bool $persistent
* @return object
* @todo SSL support
*/
@@ -111,7 +129,7 @@ public function db_connect($persistent = FALSE)
*
* 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)
@@ -133,7 +151,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 = '')
@@ -148,7 +166,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)
@@ -163,9 +181,9 @@ protected function _field_data($table)
*
* 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 UPDATE key
* @return string
*/
protected function _update_batch($table, $values, $index)
@@ -204,10 +222,10 @@ protected function _update_batch($table, $values, $index)
*
* 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)
57 system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
View
@@ -41,24 +41,49 @@
*/
class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver {