summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php47
1 files changed, 33 insertions, 14 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index 0fb5d8f12..2d076f314 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 3.0.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/**
* PDO MySQL Database Adapter Class
@@ -40,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)
@@ -76,9 +95,9 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
// --------------------------------------------------------------------
/**
- * Non-persistent database connection
+ * Database connection
*
- * @param bool
+ * @param bool $persistent
* @return object
* @todo SSL support
*/
@@ -110,7 +129,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*
* 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 +151,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*
* 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 = '')
@@ -147,7 +166,7 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*
* 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)
@@ -162,9 +181,9 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*
* 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)
@@ -203,10 +222,10 @@ class CI_DB_pdo_mysql_driver extends CI_DB_pdo_driver {
*
* 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)