summaryrefslogtreecommitdiffstats
path: root/system/database/DB_utility.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-02 00:42:31 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-02 00:42:31 +0100
commitae85eb42aa2d5c6d9a41b3cf6c61a4bf1c9b0566 (patch)
treea58f3f659e53d5bc29b4c17e7e3d90fbb267f5dc /system/database/DB_utility.php
parentf5ccd12b395a6d01c8ba1890f3639b753a345379 (diff)
DocBlocks for base DB classes
Partially fixes issue #1295.
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r--system/database/DB_utility.php44
1 files changed, 30 insertions, 14 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 12680be5f..3bd77c84b 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -35,13 +35,31 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
abstract class CI_DB_utility extends CI_DB_forge {
+ /**
+ * Database object
+ *
+ * @var object
+ */
public $db;
- // Platform specific SQL strings
- // Just setting those defaults to FALSE as they are mostly MySQL-specific
+ // --------------------------------------------------------------------
+
+ /**
+ * OPTIMIZE TABLE statement
+ *
+ * @var string|bool
+ */
protected $_optimize_table = FALSE;
+
+ /**
+ * REPAIR TABLE statement
+ *
+ * @var string|bool
+ */
protected $_repair_table = FALSE;
+ // --------------------------------------------------------------------
+
/**
* Constructor
*
@@ -95,7 +113,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
/**
* Determine if a particular database exists
*
- * @param string
+ * @param string $database_name
* @return bool
*/
public function database_exists($database_name)
@@ -108,7 +126,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
/**
* Optimize Table
*
- * @param string the table name
+ * @param string $table_name
* @return mixed
*/
public function optimize_table($table_name)
@@ -169,7 +187,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
/**
* Repair Table
*
- * @param string the table name
+ * @param string $table_name
* @return mixed
*/
public function repair_table($table_name)
@@ -194,10 +212,10 @@ abstract class CI_DB_utility extends CI_DB_forge {
/**
* Generate CSV from a query result object
*
- * @param object The query result object
- * @param string The delimiter - comma by default
- * @param string The newline character - \n by default
- * @param string The enclosure - double quote by default
+ * @param object $query Query result object
+ * @param string $delim Delimiter (default: ,)
+ * @param string $newline Newline character (default: \n)
+ * @param string $enclosure Enclosure (default: ")
* @return string
*/
public function csv_from_result($query, $delim = ',', $newline = "\n", $enclosure = '"')
@@ -234,8 +252,8 @@ abstract class CI_DB_utility extends CI_DB_forge {
/**
* Generate XML data from a query result object
*
- * @param object The query result object
- * @param array Any preferences
+ * @param object $query Query result object
+ * @param array $params Any preferences
* @return string
*/
public function xml_from_result($query, $params = array())
@@ -281,7 +299,7 @@ abstract class CI_DB_utility extends CI_DB_forge {
/**
* Database Backup
*
- * @param array $params = array()
+ * @param array $params
* @return void
*/
public function backup($params = array())
@@ -294,8 +312,6 @@ abstract class CI_DB_utility extends CI_DB_forge {
$params = array('tables' => $params);
}
- // ------------------------------------------------------
-
// Set up our default preferences
$prefs = array(
'tables' => array(),