Hi,
I think in some cases it would be useful to get all or some properties of a set
of nodes in one database query.
Can somebody tell me if something like this is planned for future releases ?
One example for this usecase would be:
for (RowIterator it = qm.createQuery("//*[@prop='some_value']/(@prop2|@prop3)",
Query.XPATH).execute().getRows(); it.hasNext(); ) {
Row row = it.nextRow();
Map map = new HashMap();
for (String key : Arrays.asList("prop2", "prop3")) {
Value val = row.getValue(key);
map.put(key, val != null ? val.getString() : null);
}
res.put(row.getPath(), map);
}
Wouldn't be nice if this could be done with one database roundtrip - right now
(2.2.10) there are at least n roundtrips (n == number of results in query) it
seems to me.
Regards,
Kevin Müller