[MGNLTOOLS-79] jcrQueryUtils App: Provide possibility to define "LIMIT" and an offset Created: 26/Mar/15 Updated: 19/May/22 Resolved: 19/May/22 |
|
| Status: | Closed |
| Project: | Repository Tools |
| Component/s: | None |
| Affects Version/s: | 1.5.2, 1.6.1 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christian Ringele | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
JCR SQL2 provides the possibility to define LIMIT s and offsets: Limit ::= 'LIMIT' count [ 'OFFSET' offset ] 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> |
| Comments |
| Comment by Roman Kovařík [ 19/May/22 ] |
|
Hello, This ticket is now marked as closed due to one of the following reasons:
If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you. Thank you, |