chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r799365 - in /incubator/chemistry/trunk/chemistry/chemistry-commons/src: main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
Date Thu, 30 Jul 2009 16:59:24 GMT
Author: fguillaume
Date: Thu Jul 30 16:59:24 2009
New Revision: 799365

URL: http://svn.apache.org/viewvc?rev=799365&view=rev
Log:
CMIS-44: fixed CONTAINS() comma placement

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=799365&r1=799364&r2=799365&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
Thu Jul 30 16:59:24 2009
@@ -197,7 +197,7 @@
     ;
 
 text_search_predicate:
-    CONTAINS^ LPAR! qualifier? COMMA! text_search_expression RPAR!;
+    CONTAINS^ LPAR! (qualifier COMMA!)? text_search_expression RPAR!;
 
 folder_predicate:
     ( f=IN_FOLDER | f=IN_TREE ) LPAR qualifier? COMMA? folder_id RPAR

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=799365&r1=799364&r2=799365&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
Thu Jul 30 16:59:24 2009
@@ -105,6 +105,10 @@
 "IN_TREE(,'ID123')" -> (FUNC IN_TREE 'ID123')
 "IN_TREE('ID123')" -> (FUNC IN_TREE 'ID123')
 
+text_search_predicate:
+"CONTAINS('foo')" -> (CONTAINS 'foo')
+"CONTAINS(bar, 'foo')" -> (CONTAINS bar 'foo')
+
 search_condition:
 "foo = 1" -> (BIN_OP = (COL foo) 1)
 "a = 1 AND b <> 2 OR c >= 3 AND NOT d <= 4" -> (OR (AND (BIN_OP = (COL a)
1) (BIN_OP <> (COL b) 2)) (AND (BIN_OP >= (COL c) 3) (NOT (BIN_OP <= (COL d) 4))))
@@ -126,7 +130,7 @@
 <<
 SELECT OBJECT_ID, SCORE() AS X, DESTINATION, DEPARTURE_DATES
 FROM TRAVEL_BROCHURE
-WHERE ( CONTAINS( , 'CARIBBEAN CENTRAL AMERICA CRUISE TOUR') ) AND
+WHERE ( CONTAINS('CARIBBEAN CENTRAL AMERICA CRUISE TOUR') ) AND
   ( '2010-1-1' < ANY DEPARTURE_DATES )
 ORDER BY X DESC
 >> OK



Mime
View raw message