empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject empire-db git commit: EMPIREDB-257 added overload for DBCommand:groupBy method
Date Thu, 22 Jun 2017 13:33:43 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 94c40819b -> 7b7dce0c3


EMPIREDB-257
added overload for DBCommand:groupBy method

Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/7b7dce0c
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/7b7dce0c
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/7b7dce0c

Branch: refs/heads/master
Commit: 7b7dce0c3d1c2fbe8a7a31189982ebb3b3a88e90
Parents: 94c4081
Author: Rainer Döbele <doebele@apache.org>
Authored: Thu Jun 22 15:33:39 2017 +0200
Committer: Rainer Döbele <doebele@apache.org>
Committed: Thu Jun 22 15:33:39 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/empire/db/DBCommand.java  | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/7b7dce0c/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBCommand.java b/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
index f3eff01..422bfe7 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
@@ -791,6 +791,19 @@ public abstract class DBCommand extends DBCommandExpr
                 groupBy.add(expr);
         }
     }
+
+    /**
+     * Adds a collection of columns to the group by phrase of an sql statement.
+     * 
+     * @param columns the column expressions to add
+     */
+    public void groupBy(Collection<? extends DBColumnExpr> columns)
+    {
+        for (DBColumnExpr expr : columns)
+        {
+            groupBy(expr);
+        }
+    }
     
     public boolean hasSelectExpr()
     {


Mime
View raw message