Details
-
Improvement
-
Resolution: Won't Do
-
Neutral
-
None
-
1.5.2, 1.6.1
-
None
Description
JCR SQL2 provides the possibility to define LIMIT s and offsets:
http://docs.jboss.org/jbossdna/0.7/manuals/reference/html/jcr-query-and-search.html#jcr-sql2-limits
Limit ::= 'LIMIT' count [ 'OFFSET' offset ]
count ::= /* Positive integer value */
offset ::= /* Non-negative integer value */
One can not set them over the app, and as a part of the query its not accepted:
Doesn't work: SELECT * FROM [nt:base] WHERE ISDESCENDANTNODE([/demo-project/]) LIMIT 10
One can use it by code:
queryManager = MgnlContext.getJCRSession("website").getWorkspace().getQueryManager(); Query query = queryManager.createQuery("SELECT * FROM [nt:base] WHERE ISDESCENDANTNODE([/demo-project/])", Query.JCR_SQL2); query.setLimit(10); QueryResult execute = query.execute();
Which rally returns only 10 items.
Would be great if this would be define-able in the jcrQueryUtils App.
Error:
javax.jcr.query.InvalidQueryException: Query: SELECT * FROM [nt:base] WHERE ISDESCENDANTNODE([/demo-project/]) LIMIT(*)10; expected: <end>
Checklists
Acceptance criteria