jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1481926 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/query/XPathToSQL2Converter.java test/resources/org/apache/jackrabbit/oak/query/xpath.txt
Date Mon, 13 May 2013 15:33:23 GMT
Author: thomasm
Date: Mon May 13 15:33:23 2013
New Revision: 1481926

URL: http://svn.apache.org/r1481926
Log:
OAK-28 Query implementation / XPath: support identifiers with embedded dots

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

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=1481926&r1=1481925&r2=1481926&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
Mon May 13 15:33:23 2013
@@ -837,7 +837,11 @@ public class XPathToSQL2Converter {
                 type = types[i];
                 // the '-' can be part of a name,
                 // for example in "fn:lower-case"
-                if (type != CHAR_NAME && type != CHAR_VALUE && chars[i] !=
'-') {
+                // the '.' can be part of a name,
+                // for example in "@offloading.status"
+                if (type != CHAR_NAME && type != CHAR_VALUE 
+                        && chars[i] != '-'
+                        && chars[i] != '.') {
                     break;
                 }
                 i++;

Modified: jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt?rev=1481926&r1=1481925&r2=1481926&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/resources/org/apache/jackrabbit/oak/query/xpath.txt
Mon May 13 15:33:23 2013
@@ -34,6 +34,9 @@ select [jcr:path], [jcr:score], * from [
 xpath2sql testroot//child[@foo1]
 select [jcr:path], [jcr:score], * from [nt:base] as a where [foo1] is not null and name(a)
= 'child' and isdescendantnode(a, '/testroot') /* xpath: testroot//child[@foo1] */
 
+xpath2sql test.root//ch.ild[@fo.o1]
+select [jcr:path], [jcr:score], * from [nt:base] as a where [fo.o1] is not null and name(a)
= 'ch.ild' and isdescendantnode(a, '/test.root') /* xpath: test.root//ch.ild[@fo.o1] */
+
 xpath2sql /jcr:root/testroot/node11
 select [jcr:path], [jcr:score], * from [nt:base] as a where issamenode(a, '/testroot/node11')
/* xpath: /jcr:root/testroot/node11 */
 



Mime
View raw message