You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Ro...@wellsfargo.com on 2014/09/05 20:22:29 UTC

OpenCMIS SQL Parsing question

Hello,

I am new to CMIS and I am currently using the Example Query code for the basis of my Query processing.  Additionally, I am using the OpenCMIS FileShare and InMemory servers as the starting point for my CMIS Server.

At present, I am able to successfully parse CMIS SQL statements with the following exception.  When I introduce an attribute into the select list that contains a forward slash such as CaptureInfo/WLS_EndImageAddress, I get the following message:

         <faultstring>Query parsing failed: Syntax error in query: Line 1:413 rule query failed predicate: {CaptureInfo is not a property query name in any of the types in from ...}?</faultstring>

It appears that ANTLR is tokenizing the select list using in part the forward slash.

So, here is my question.  How can I modify the ANTLR grammar so that it recognizes the text CaptureInfo/WLS_EndImageAddress as a single attribute?

Thanks in advance for your help!



Re: OpenCMIS SQL Parsing question

Posted by Florent Guillaume <fg...@nuxeo.com>.
Hi,

The CMIS query language is a subset of SQL-92, and SQL-92 does not
allow slashes in identifiers. See SQL-92 ยง 5.2 Syntax Rules.

You could change the code as you suggest, but then your server
wouldn't be CMIS compliant, and many CMIS clients would fail with it.

Florent


On Fri, Sep 5, 2014 at 8:22 PM,  <Ro...@wellsfargo.com> wrote:
> Hello,
>
> I am new to CMIS and I am currently using the Example Query code for the basis of my Query processing.  Additionally, I am using the OpenCMIS FileShare and InMemory servers as the starting point for my CMIS Server.
>
> At present, I am able to successfully parse CMIS SQL statements with the following exception.  When I introduce an attribute into the select list that contains a forward slash such as CaptureInfo/WLS_EndImageAddress, I get the following message:
>
>          <faultstring>Query parsing failed: Syntax error in query: Line 1:413 rule query failed predicate: {CaptureInfo is not a property query name in any of the types in from ...}?</faultstring>
>
> It appears that ANTLR is tokenizing the select list using in part the forward slash.
>
> So, here is my question.  How can I modify the ANTLR grammar so that it recognizes the text CaptureInfo/WLS_EndImageAddress as a single attribute?
>
> Thanks in advance for your help!
>
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source Content Management Platform for Business Apps
http://www.nuxeo.com   http://community.nuxeo.com