mirror of
https://github.com/e107inc/e107.git
synced 2025-03-17 19:09:45 +01:00
Merged e_db_mysql and e_db_pdo tests into e_db_abstractTest
- FIX: e_db::copyTable() is now an interface - FIX: e_db_mysql now implements e_db - FIX: Implemented missing e_db_mysql::copyTable() public method - FIX: Implemented missing e_db_mysql::setLanguage() method - FIX: Implemented missing e_db_mysql::getLanguage() method - FIX: Implemented missing e_db_mysql::dropTable() method - MOD: Merged e_db_mysqlTest and e_db_pdoTest into e_db_abstractTest
This commit is contained in:
parent
2330f8a152
commit
71e7f8778c
@ -386,6 +386,18 @@
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* XXX: e_db_pdo and e_db_mysql have differing implementations of this method.
|
||||
* @param string $oldtable
|
||||
* @param string $newtable
|
||||
* @param bool $drop
|
||||
* @param bool $data
|
||||
* @return bool|int|PDOStatement|resource
|
||||
*/
|
||||
public function copyTable($oldtable, $newtable, $drop = false, $data = false);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Drop/delete table and all it's data
|
||||
* @param string $table name without the prefix
|
||||
|
@ -65,7 +65,7 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
|
||||
|
||||
|
||||
|
||||
class e_db_mysql
|
||||
class e_db_mysql implements e_db
|
||||
{
|
||||
// TODO switch to protected vars where needed
|
||||
public $mySQLserver;
|
||||
@ -2751,6 +2751,13 @@ class e_db_mysql
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function copyTable($oldtable, $newtable, $drop = false, $data = false) {
|
||||
return $this->db_CopyTable($oldtable, $newtable, $drop, $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3243,6 +3250,30 @@ class e_db_mysql
|
||||
return $this->mySQLaccess;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function setLanguage($lang)
|
||||
{
|
||||
$this->mySQLlanguage = $lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getLanguage()
|
||||
{
|
||||
return $this->mySQLlanguage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function dropTable($table)
|
||||
{
|
||||
$name = $this->mySQLPrefix.strtolower($table);
|
||||
return $this->gen("DROP TABLE IF EXISTS ".$name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
1243
e107_tests/tests/unit/e_db_abstractTest.php
Normal file
1243
e107_tests/tests/unit/e_db_abstractTest.php
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user