Author: fguillaume
Date: Sun Aug 2 19:01:28 2009
New Revision: 800131
URL: http://svn.apache.org/viewvc?rev=800131&view=rev
Log:
CMIS-44: updated CMIS SQL parser
Modified:
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
Modified:
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
URL:
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g?rev=800131&r1=800130&r2=800131&view=diff
==============================================================================
---
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
(original)
+++
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
Sun Aug 2 19:01:28 2009
@@ -200,7 +200,7 @@
CONTAINS^ LPAR! (qualifier COMMA!)? text_search_expression RPAR!;
folder_predicate:
- ( f=IN_FOLDER | f=IN_TREE ) LPAR qualifier? COMMA? folder_id RPAR
+ ( f=IN_FOLDER | f=IN_TREE ) LPAR (qualifier COMMA)? folder_id RPAR
-> ^(FUNC $f qualifier? folder_id)
;
Modified:
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
URL:
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite?rev=800131&r1=800130&r2=800131&view=diff
==============================================================================
---
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
(original)
+++
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
Sun Aug 2 19:01:28 2009
@@ -100,10 +100,8 @@
folder_predicate:
"IN_FOLDER(foo,'ID123')" -> (FUNC IN_FOLDER foo 'ID123')
-"IN_FOLDER(,'ID123')" -> (FUNC IN_FOLDER 'ID123')
"IN_FOLDER('ID123')" -> (FUNC IN_FOLDER 'ID123')
"IN_TREE(foo,'ID123')" -> (FUNC IN_TREE foo 'ID123')
-"IN_TREE(,'ID123')" -> (FUNC IN_TREE 'ID123')
"IN_TREE('ID123')" -> (FUNC IN_TREE 'ID123')
text_search_predicate:
@@ -125,7 +123,7 @@
<<
SELECT TITLE, AUTHORS, DATE
FROM WHITE_PAPER
-WHERE ( IN_TREE( , 'ID00093854763') ) AND ( 'SMITH' = ANY AUTHORS )
+WHERE ( IN_TREE('ID00093854763') ) AND ( 'SMITH' = ANY AUTHORS )
>> -> (SELECT (LIST (COL TITLE) (COL AUTHORS) (COL DATE)) (FROM WHITE_PAPER)
>> (WHERE (AND (FUNC IN_TREE 'ID00093854763') (BIN_OP_ANY = 'SMITH' (COL
>> AUTHORS)))))
<<