Hi all, @Florian: I was looking at the CmisQueryWalker as it's what can be obtained from the QueryUtil. I wasn't seeing any reference to parens in the produced Tree, but a closer look reveals that the AST is respecting priorities given by them.
@Jens: yes, that wasn't a cut and paste from real queries, I just typed them by hand in the email. Queries are properly sent with objectId's as Strings already. thanks for your replies! c. 2012/2/1 Jens Hübel <[email protected]> > And please also note that your query statement is incorrect. ObjectIds are > strings and must be quoted: > > SELECT * FROM ComplexType WHERE StringProp IN ('Alpha', 'Beta', 'Gamma') > or > SELECT * FROM cmis:document WHERE cmis:objectId IN ('1', '2', '3') > > This likely means that we can improve error handling here.... > > Jens > > -----Original Message----- > From: Florent Guillaume [mailto:[email protected]] > Sent: Mittwoch, 1. Februar 2012 14:36 > To: [email protected] > Subject: Re: Parenthesis in query > > Yes, this is supported. > You're looking at a file that walks an already-built AST to emit other > strings. > The grammar file you should be looking at is CmisBaseGrammar.g in the > same directory. > > Florent > > On Wed, Feb 1, 2012 at 2:19 PM, Carlo Sciolla <[email protected]> > wrote: > > Hi all, > > > > does chemistry support parenthesis in CMIS queries? More specifically, I > > need to handle a query such as > > > > SELECT * FROM cmis:document WHERE cmis:objectId IN (1, 2, 3) AND > > (cmis:lastModifiedBy = 'carlo' OR cmis:createdBy = 'carlo') > > > > where the right branch of the AND clause is within parenthesis. I be > might > > missing something here, but it seems to me that the current > > grammar< > http://svn.apache.org/repos/asf/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/antlr3/org/apache/chemistry/opencmis/server/support/query/CmisQueryWalker.g > >results > > in parens to be swallowed in the parsing process, and not visible > > in the resulting parsed tree. > > > > Any idea on this? > > > > Thanks, > > c. > > > > -- > > Carlo Sciolla > > > > --==(A)==-- > > Linux User #372086 > > My personal blog: http://www.skuro.tk > > Follow me on twitter: http://twitter.com/skuro > > <http://twitter.com/skuro>Fork me on Github: http://github.com/skuro > > <http://github.com/skuro>My LinkedIn profile: > > http://nl.linkedin.com/in/carlosciolla > > --==(A)==-- > > > > Senior Developer at Backbase - Next Generation Portal Software for > > Financials & Large Enterprises (http://www.backbase.com) > > > > -- > Florent Guillaume, Director of R&D, Nuxeo > Open Source, Java EE based, Enterprise Content Management (ECM) > http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87 > -- Carlo Sciolla --==(A)==-- Linux User #372086 My personal blog: http://www.skuro.tk Follow me on twitter: http://twitter.com/skuro <http://twitter.com/skuro>Fork me on Github: http://github.com/skuro <http://github.com/skuro>My LinkedIn profile: http://nl.linkedin.com/in/carlosciolla --==(A)==-- Senior Developer at Backbase - Next Generation Portal Software for Financials & Large Enterprises (http://www.backbase.com)
