]
Heiko Braun updated WFLY-4123:
------------------------------
Summary: Provide a 'map-reduce' operation to execute domain wide queries on
the server side (was: Provide a 'map_reduce' operation to execute domain wide
queries on the server side)
Provide a 'map-reduce' operation to execute domain wide
queries on the server side
----------------------------------------------------------------------------------
Key: WFLY-4123
URL:
https://issues.jboss.org/browse/WFLY-4123
Project: WildFly
Issue Type: Feature Request
Reporter: Heiko Braun
Assignee: Heiko Braun
Fix For: 9.0.0.Beta1
See
https://github.com/hpehl/map-reduce
{code:java}
ModelNode address = new ModelNode();
address.add("profile", "*")
.add("subsystem", "datasources")
.add("data-source", "*");
ModelNode filter = new ModelNode();
filter.add("driver-name", "h2")
.add("enabled", true);
ModelNode op = new ModelNode();
op.get(OP).set(MAP_REDUCE);
op.get(ADDRESS_TEMPLATE).set(address);
op.get(FILTER).set(filter);
// To return datasources where (driver-name == h2 || enabled == true) use
// op.get(FILTER_CONJUNCT).set(false);
{code}