jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (Updated) (JIRA) <j...@apache.org>
Subject [jira] [Updated] (OAK-28) Query implementation
Date Wed, 21 Mar 2012 18:05:42 GMT

     [ https://issues.apache.org/jira/browse/OAK-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Dürig updated OAK-28:
-----------------------------

    Component/s: jcr
    Description: 
A query engine needs to be implemented. 

A query parser in oak-core should be able to handle xpath, sql2 and optionally other query
languages. The jcr component must generate a valid query in one of those languages from JQOM
queries and pass that statement along with name space mappings to the oak-core. 

We need to:
* Define the oak-core API for handling queries. How are do we handle name space mappings,
limit and size
* Implement a query builder in the jcr component which takes care of translating JQOM queries

* Implement a query parser in oak-core and decide on a versatile AST representation which
works with all query languages and which is extensible to future query languages.
* Implement the actual query execution engine which interprets the query AST




  was:
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!



    
> Query implementation
> --------------------
>
>                 Key: OAK-28
>                 URL: https://issues.apache.org/jira/browse/OAK-28
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: core, jcr
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>         Attachments: OakToJcrQueryTreeConverter.java
>
>
> A query engine needs to be implemented. 
> A query parser in oak-core should be able to handle xpath, sql2 and optionally other
query languages. The jcr component must generate a valid query in one of those languages from
JQOM queries and pass that statement along with name space mappings to the oak-core. 
> We need to:
> * Define the oak-core API for handling queries. How are do we handle name space mappings,
limit and size
> * Implement a query builder in the jcr component which takes care of translating JQOM
queries 
> * Implement a query parser in oak-core and decide on a versatile AST representation which
works with all query languages and which is extensible to future query languages.
> * Implement the actual query execution engine which interprets the query AST

--
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

       

Mime
View raw message