BUGFIX Renamed MySQLDatabase->clear_cached_fieldlist() to clearCachedFieldList() and moved to parent Database class in order to avoid breaking other database drivers (broken in 360176d2 by gmunn)

This commit is contained in:
Ingo Schommer 2011-03-11 14:22:59 +13:00
parent d0afa9987c
commit 0a4aa9dc17
3 changed files with 14 additions and 14 deletions

View File

@ -115,6 +115,19 @@ abstract class SS_Database {
* database expects. * database expects.
* @return array * @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(); protected abstract function tableList();

View File

@ -358,18 +358,6 @@ class MySQLDatabase extends SS_Database {
return $fieldList; return $fieldList;
} }
/**
*
* 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. * Create an index on a table.
* *

View File

@ -32,8 +32,7 @@ class DatabaseTest extends SapphireTest {
function testRenameField() { function testRenameField() {
$conn = DB::getConn(); $conn = DB::getConn();
//Reset our cached fieldlists: $conn->clearCachedFieldlist();
$conn->clear_cached_fieldlist();
$conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField'); $conn->renameField('DatabaseTest_MyObject', 'MyField', 'MyRenamedField');