jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1484719 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
Date Tue, 21 May 2013 09:42:49 GMT
Author: thomasm
Date: Tue May 21 09:42:49 2013
New Revision: 1484719

URL: http://svn.apache.org/r1484719
Log:
OAK-830 XPathToSQL2Converter fails to wrap "or" clauses (simplified)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java?rev=1484719&r1=1484718&r2=1484719&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java
Tue May 21 09:42:49 2013
@@ -349,15 +349,8 @@ public class XPathToSQL2Converter {
         
         // where ...
         Expression where = null;
-        for (int i = 0; i < selectors.size(); i++) {
-            Selector s = selectors.get(i);
-            if (s.condition != null) {
-                if (where == null) {
-                    where = s.condition;
-                } else {
-                    where = new Condition(where, "and", s.condition, Expression.PRECEDENCE_AND);
-                }
-            }
+        for (Selector s : selectors) {
+            where = add(where, s.condition);
         }
         if (where != null) {
             buff.append(" where ").append(where.toString());



Mime
View raw message