Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/211719

Change subject: Another fix for addition of "having" param - fix for 21e6796
......................................................................

Another fix for addition of "having" param - fix for 21e6796

Change-Id: I53e5bc0c6c3219051f8832f35fd7013f12fee648
---
M api/CargoQueryAPI.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/19/211719/1

diff --git a/api/CargoQueryAPI.php b/api/CargoQueryAPI.php
index 90628d1..c591a42 100644
--- a/api/CargoQueryAPI.php
+++ b/api/CargoQueryAPI.php
@@ -20,6 +20,7 @@
                $joinOnStr = $params['join_on'];
                $orderByStr = $params['order_by'];
                $groupByStr = $params['group_by'];
+               $havingStr = $params['having'];
                $limitStr = $params['limit'];
 
                if ( $tablesStr == '' ) {
@@ -27,7 +28,7 @@
                }
 
                $sqlQuery = CargoSQLQuery::newFromValues( $tablesStr, 
$fieldsStr, $whereStr, $joinOnStr,
-                               $groupByStr, $orderByStr, $limitStr );
+                               $havingStr, $groupByStr, $orderByStr, $limitStr 
);
                try {
                        $queryResults = $sqlQuery->run();
                } catch ( Exception $e ) {
@@ -59,8 +60,9 @@
                        'fields' => null,
                        'where' => null,
                        'join_on' => null,
-                       'order_by' => null,
                        'group_by' => null,
+                       'having' => null,
+                       'order_by' => null,
                );
        }
 
@@ -72,6 +74,7 @@
                        'join_on' => 'Conditions for joining multiple tables, 
corresponding to an SQL JOIN ON clause',
                        'order_by' => 'The order of results, corresponding to 
an SQL ORDER BY clause',
                        'group_by' => 'Field(s) on which to group results, 
corresponding to an SQL GROUP BY clause',
+                       'having' => 'Conditions for grouped values, 
corresponding to an SQL HAVING clause',
                        'limit' => 'Limit how many entries to return',
                );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/211719
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53e5bc0c6c3219051f8832f35fd7013f12fee648
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <yaro...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to