From ed7dc234b225135cbabea6097c5088efc22353ec Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Thu, 9 Sep 2004 12:04:39 +0000 Subject: [PATCH] add aggregateValue(), as some databases require different aggregated value specifications in HAVING and ORDER clauses --- includes/Database.php | 7 +++++++ includes/DatabasePostgreSQL.php | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/includes/Database.php b/includes/Database.php index d9ab045719..f7c33dd55c 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -1209,6 +1209,13 @@ class Database { return new ResultWrapper( $this, $result ); } } + + /** + * Return aggregated value alias + */ + function aggregateValue ($valuedata,$valuename='value') { + return $valuename; + } /** * @return string wikitext of a link to the server software's web site diff --git a/includes/DatabasePostgreSQL.php b/includes/DatabasePostgreSQL.php index 736822fb73..e257dc393f 100644 --- a/includes/DatabasePostgreSQL.php +++ b/includes/DatabasePostgreSQL.php @@ -387,6 +387,14 @@ class DatabasePgsql extends Database { return wfTimestamp(TS_DB,$ts); } + /** + * Return aggregated value function call + */ + function aggregateValue ($valuedata,$valuename='value') { + return $valuedata; + } + + function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) { $message = "A database error has occurred\n" . "Query: $sql\n" . -- 2.20.1