From b65482f8d118af595524cf09d268e16cb9e51539 Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Tue, 1 Mar 2011 12:05:28 +0100 Subject: [PATCH] Added missing method clear_cached_fieldlist existing in tests and at least in MySQLDatabase --- code/SQLite3Database.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/code/SQLite3Database.php b/code/SQLite3Database.php index 7bab4e1..48977cf 100644 --- a/code/SQLite3Database.php +++ b/code/SQLite3Database.php @@ -1006,10 +1006,22 @@ class SQLite3Database extends SS_Database { DB::query('COMMIT;'); } - /** - * Convert a SQLQuery object into a SQL statement - */ - public function sqlQueryToString(SQLQuery $sqlQuery) { + /** + * + * This is a stub function. Postgres caches the fieldlist results. + * + * @param string $tableName + * + * @return boolean + */ + function clear_cached_fieldlist($tableName=false){ + return true; + } + + /** + * Convert a SQLQuery object into a SQL statement + */ + public function sqlQueryToString(SQLQuery $sqlQuery) { if (!$sqlQuery->from) return ''; $distinct = $sqlQuery->distinct ? "DISTINCT " : ""; if($sqlQuery->delete) {