[
https://issues.apache.org/jira/browse/OAK-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245134#comment-13245134
]
Michael Dürig commented on OAK-34:
----------------------------------
* Currently the query needs to be parsed twice. Once in
QueryEngine.getBindVariableNames() and a second time in
QueryEngine.executeQuery(). Why not change this into QueryEngine.prepare() and
QueryEngine.execute()? The prepare() method would return a pre-parsed query and
provide means to bind the free variables. The execute() method would simple
execute such a query. If we factor the pre-parsed query into an interface, we
would at the same time get extensibility: clients could build queries for their
own languages and pass them directly to the execute() method without going
through prepare().
* Naming: Result and ResultRow should have more specific names. I propose
QueryResult which has an inner interface called Row.
* Result.getRows() should probably return an Iterable instead of an Iterator.
* Maybe Result.getRows() should allow for specifying offset and limit.
> Define query API
> ----------------
>
> Key: OAK-34
> URL: https://issues.apache.org/jira/browse/OAK-34
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: core
> Reporter: Michael Dürig
> Labels: query
>
> Define a oak-core API for handling queries. How do we handle name space
> mappings, value bindings, limit, offset, access rights. See OAK-28
--
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