You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "Michael Dürig (Commented JIRA)" <ji...@apache.org> on 2012/03/21 15:57:39 UTC

[jira] [Commented] (OAK-28) Query implementation

    [ https://issues.apache.org/jira/browse/OAK-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234394#comment-13234394 ] 

Michael Dürig commented on OAK-28:
----------------------------------

Before we go too much into details of the implementation, how would the query API for oak-core look like? 
* Should it take a query string of some intermediate query language?
* Should it take an AST of a query? Can we leverage JQOM here? What about an extension to JQOM as was proposed by Felix? Or should we go for another AST representation?

I think we should push very hard here in order to avoid code duplications. 
                
> Query implementation
> --------------------
>
>                 Key: OAK-28
>                 URL: https://issues.apache.org/jira/browse/OAK-28
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: core
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>         Attachments: OakToJcrQueryTreeConverter.java
>
>
> A query engine needs to be implemented. 
> This includes a query parser in oak-core (where we don't want to use the JCR API), and a query parser in oak-jcr (where the parsed query tree needs to implement the JCR API).
> To avoid writing two independent parsers, I suggest to change the parser to emit a non-JCR query tree (so the parser can be used in oak-core). There needs to be a converter from the non-JCR query tree to a JCR query tree, so the same parser can be used in oak-jcr.
> This will still require two independent query tree implementations (about 37 duplicated classes: 37 classes for oak-core and 37 classes in oak-jcr). Plus it requires a tree converter.
> If somebody has a better idea please tell me :-)
> Prototype implementation of the query tree converter. Please note the class names are only to for illustration, but I don't know yet a good naming convention. Ideas are welcome!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira