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-226 2nd try
Date Fri, 11 Sep 2015 13:42:45 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 0e733cc45 -> 1336b1068


EMPIREDB-226
2nd try


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

Branch: refs/heads/master
Commit: 1336b10685ed8390f4c0f6889b4c8c282e6f217c
Parents: 0e733cc
Author: Rainer Döbele <doebele@apache.org>
Authored: Fri Sep 11 15:42:39 2015 +0200
Committer: Rainer Döbele <doebele@apache.org>
Committed: Fri Sep 11 15:42:39 2015 +0200

----------------------------------------------------------------------
 empire-db/src/main/java/org/apache/empire/db/DBCommand.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/1336b106/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 556311a..d910063 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
@@ -684,9 +684,6 @@ public abstract class DBCommand extends DBCommandExpr
      */
     public void addWhereConstraints(List<DBCompareExpr> constraints)
     {
-        // check argument
-        if (constraints==null || constraints.isEmpty())
-            return; // nothing to do.
         // allocate
         if (where == null)
             where = new ArrayList<DBCompareExpr>();
@@ -1155,7 +1152,7 @@ public abstract class DBCommand extends DBCommandExpr
 
     protected void addWhere(StringBuilder buf, long context)
     {
-        if (where != null)
+        if (where!=null && !where.isEmpty())
         {   
             buf.append("\r\nWHERE ");
             // add where expression


Mime
View raw message