summaryrefslogtreecommitdiffstats
path: root/system/database/drivers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-06 00:11:22 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-06 00:11:22 +0100
commiteaa60c71082c1e49f8a48d633347c98b68a387c0 (patch)
tree41438b0e6fde0dcb3fd2348e5b52dc9c128f88db /system/database/drivers
parentd743cdbe448258cc7f02abf15e8dc797dc6403eb (diff)
Added possibility to pass custom database objects to DB Forge and DB Utilities
Also, their property is no longer public and the utility class no longer extends CI_DB_forge.
Diffstat (limited to 'system/database/drivers')
-rw-r--r--system/database/drivers/mysql/mysql_forge.php5
-rw-r--r--system/database/drivers/mysqli/mysqli_forge.php5
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php5
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php5
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php5
-rw-r--r--system/database/drivers/postgre/postgre_forge.php5
-rw-r--r--system/database/drivers/sqlite3/sqlite3_forge.php5
7 files changed, 21 insertions, 14 deletions
diff --git a/system/database/drivers/mysql/mysql_forge.php b/system/database/drivers/mysql/mysql_forge.php
index ea3207760..019f6d353 100644
--- a/system/database/drivers/mysql/mysql_forge.php
+++ b/system/database/drivers/mysql/mysql_forge.php
@@ -74,11 +74,12 @@ class CI_DB_mysql_forge extends CI_DB_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- parent::__construct();
+ parent::__construct($db);
$this->_create_table .= ' DEFAULT CHARSET '.$this->db->char_set.' COLLATE '.$this->db->dbcollat;
}
diff --git a/system/database/drivers/mysqli/mysqli_forge.php b/system/database/drivers/mysqli/mysqli_forge.php
index 914d6a268..088a6a09a 100644
--- a/system/database/drivers/mysqli/mysqli_forge.php
+++ b/system/database/drivers/mysqli/mysqli_forge.php
@@ -74,11 +74,12 @@ class CI_DB_mysqli_forge extends CI_DB_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- parent::__construct();
+ parent::__construct($db);
$this->_create_table .= ' DEFAULT CHARSET '.$this->db->char_set.' COLLATE '.$this->db->dbcollat;
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
index dc856ed2c..2add7d204 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
@@ -88,11 +88,12 @@ class CI_DB_pdo_mysql_forge extends CI_DB_pdo_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- parent::__construct();
+ parent::__construct($db);
$this->_create_table .= ' DEFAULT CHARSET '.$this->db->char_set.' COLLATE '.$this->db->dbcollat;
}
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
index b5235d24b..1e4d2ac59 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
@@ -71,11 +71,12 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- parent::__construct();
+ parent::__construct($db);
if (version_compare($this->db->version(), '9.0', '>'))
{
diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php
index 414826212..2e5f12379 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlite_forge.php
@@ -68,11 +68,12 @@ class CI_DB_pdo_sqlite_forge extends CI_DB_pdo_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- parent::__construct();
+ parent::__construct($db);
if (version_compare($this->db->version(), '3.3', '<'))
{
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index ad26763a4..425622fac 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -64,11 +64,12 @@ class CI_DB_postgre_forge extends CI_DB_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- parent::__construct();
+ parent::__construct($db);
if (version_compare($this->db->version(), '9.0', '>'))
{
diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php
index 7ba0f7bab..e9b91e972 100644
--- a/system/database/drivers/sqlite3/sqlite3_forge.php
+++ b/system/database/drivers/sqlite3/sqlite3_forge.php
@@ -54,11 +54,12 @@ class CI_DB_sqlite3_forge extends CI_DB_forge {
/**
* Class constructor
*
+ * @param object &$db Database object
* @return void
*/
- public function __construct()
+ public function __construct(&$db)
{
- parent::__construct();
+ parent::__construct($db);
if (version_compare($this->db->version(), '3.3', '<'))
{