Browse files

BUGFIX Renamed MySQLDatabase->clear_cached_fieldlist() to clearCached…

…FieldList() and moved to parent Database class in order to avoid breaking other database drivers (broken in 360176d by gmunn)
  • Loading branch information...
1 parent d0afa99 commit 0a4aa9dc17bf9c227578f32a29b4cbabfd2c530d @chillu chillu committed Mar 11, 2011
Showing with 14 additions and 14 deletions.
  1. +13 −0 core/model/Database.php
  2. +0 −12 core/model/MySQLDatabase.php
  3. +1 −2 tests/model/DatabaseTest.php
View
13 core/model/Database.php
@@ -115,6 +115,19 @@
* database expects.
* @return array
*/
+
+ /**
+ *
+ * This is a stub function. Postgres caches the fieldlist results.
+ *
+ * @param string $tableName
+ *
+ * @return boolean
+ */
+ function clearCachedFieldlist($tableName=false){
+ return true;
+ }
+
protected abstract function tableList();
View
12 core/model/MySQLDatabase.php
@@ -359,18 +359,6 @@ public function fieldList($table) {
}
/**
- *
- * This is a stub function. Postgres caches the fieldlist results.
- *
- * @param string $tableName
- *
- * @return boolean
- */
- function clear_cached_fieldlist($tableName=false){
- return true;
- }
-
- /**
* Create an index on a table.
*
* @param string $tableName The name of the table.
View
3 tests/model/DatabaseTest.php
@@ -32,8 +32,7 @@ function testDontRequireField() {
function testRenameField() {
$conn = DB::getConn();
- //Reset our cached fieldlists:
- $conn->clear_cached_fieldlist();
+ $conn->clearCachedFieldlist();
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');

0 comments on commit 0a4aa9d

Please sign in to comment.