1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-17 10:59:49 +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:
Nick Liu 2019-12-23 16:37:48 +01:00
parent 2330f8a152
commit 71e7f8778c
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637
5 changed files with 1359 additions and 2359 deletions

View File

@ -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

View File

@ -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);
}
}
/**

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