jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r158801 - in incubator/jackrabbit/trunk/src: grammar/sql/JCRSQL.jjt java/org/apache/jackrabbit/core/search/QueryTreeDump.java test/org/apache/jackrabbit/core/search/SQLTest.java
Date Wed, 23 Mar 2005 17:16:31 GMT
Author: mreutegg
Date: Wed Mar 23 09:16:29 2005
New Revision: 158801

URL: http://svn.apache.org/viewcvs?view=rev&rev=158801
Log:
- Support qualified property names in SQL select clause
- Add property name to RelationQueryNode query tree dump.

Modified:
    incubator/jackrabbit/trunk/src/grammar/sql/JCRSQL.jjt
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryTreeDump.java
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/search/SQLTest.java

Modified: incubator/jackrabbit/trunk/src/grammar/sql/JCRSQL.jjt
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/grammar/sql/JCRSQL.jjt?view=diff&r1=158800&r2=158801
==============================================================================
--- incubator/jackrabbit/trunk/src/grammar/sql/JCRSQL.jjt (original)
+++ incubator/jackrabbit/trunk/src/grammar/sql/JCRSQL.jjt Wed Mar 23 09:16:29 2005
@@ -270,7 +270,7 @@
 {}
 {
     (<ASTERISK>)
-  | (Identifier() (<COMMA> Identifier())*)
+  | (Identifier() (<PERIOD> Identifier() { Node n = jjtree.popNode(); jjtree.popNode();
jjtree.pushNode(n); } )? (<COMMA> Identifier() (<PERIOD> Identifier() { Node n
= jjtree.popNode(); jjtree.popNode(); jjtree.pushNode(n); } )? )*)
 }
 
 void TableExpression() #void :

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryTreeDump.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryTreeDump.java?view=diff&r1=158800&r2=158801
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryTreeDump.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/QueryTreeDump.java
Wed Mar 23 09:16:29 2005
@@ -201,6 +201,7 @@
         } else if (node.getOperation() == QueryConstants.OPERATION_NULL) {
             buffer.append("IS NULL");
         }
+        buffer.append(" Prop=" + node.getProperty());
         if (node.getValueType() == QueryConstants.TYPE_DATE) {
             buffer.append(" Type=DATE Value=").append(node.getDateValue());
         } else if (node.getValueType() == QueryConstants.TYPE_DOUBLE) {

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/search/SQLTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/search/SQLTest.java?view=diff&r1=158800&r2=158801
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/search/SQLTest.java (original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/search/SQLTest.java Wed
Mar 23 09:16:29 2005
@@ -55,7 +55,7 @@
 
         testRootNode.save();
 
-        String sql = "SELECT * FROM nt:unstructured WHERE contains('fox') AND NOT contains('bla')";
+        String sql = "SELECT foo.mytext, bla.foo FROM nt:unstructured WHERE contains('fox')
AND NOT contains('bla')";
         Query q = superuser.getWorkspace().getQueryManager().createQuery(sql, Query.SQL);
         QueryResult result = q.execute();
         checkResult(result, 1);



Mime
View raw message