[MAGNOLIA-5224] Add support for queries using joins with selectors and use of RowIterators Created: 05/Aug/13 Updated: 06/Jan/14 Resolved: 06/Jan/14 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 4.5 |
| Fix Version/s: | 4.5.15, 5.2.2 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Jan Haderka | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | next | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Patch included: |
Yes
|
||||
| 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)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Epic Link: | Support | ||||
| Sprint: | 4.5.14 | ||||
| Description |
|
Currently NodeUtils do not provide any support for queries returning rows rather then nodes and conversion of their search results to more widely used node iterators. Attached patch adds support for iterating over row iterators and their on the fly wrapping into node iterators. |
| Comments |
| Comment by Jan Haderka [ 05/Aug/13 ] |
|
QueryUtil should be also updated to add support for such queries, e.g. like: Session session = MgnlContext.getJCRSession(workspace);
QueryManager manager = session.getWorkspace().getQueryManager();
Query query = manager.createQuery(statement, language);
log.debug("selector:" + returnItemType + ":lang:" + language + ":query:" + statement);
return NodeUtil.filterDuplicates(NodeUtil.filterParentNodeType(query.execute().getRows(), returnItemType));
|