[
https://issues.jboss.org/browse/WFCORE-287?page=com.atlassian.jira.plugin...
]
Heiko Braun updated WFCORE-287:
-------------------------------
Description:
i.e. retrieve all 'enabled' datasources that use the 'h2' driver:
{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(QUERY);
op.get(ADDRESS).set(address);
op.get(WHERE).set(filter);
{code}
Another example using the CLI:
{code}
[standalone@localhost:9990 /] /path=*:query(select=[path],
where={name="jboss.home.dir"})
{
"outcome" => "success",
"result" => [{
"address" => [("path" => "jboss.home.dir")],
"outcome" => "success",
"result" => {"path" =>
"/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT"}
}]
}
{code}
was:
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}
Provide an operation to execute domain wide queries on the server
side
----------------------------------------------------------------------
Key: WFCORE-287
URL:
https://issues.jboss.org/browse/WFCORE-287
Project: WildFly Core
Issue Type: Feature Request
Components: Domain Management
Reporter: Heiko Braun
Assignee: Heiko Braun
Fix For: 1.0.0.Beta1
i.e. retrieve all 'enabled' datasources that use the 'h2' driver:
{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(QUERY);
op.get(ADDRESS).set(address);
op.get(WHERE).set(filter);
{code}
Another example using the CLI:
{code}
[standalone@localhost:9990 /] /path=*:query(select=[path],
where={name="jboss.home.dir"})
{
"outcome" => "success",
"result" => [{
"address" => [("path" => "jboss.home.dir")],
"outcome" => "success",
"result" => {"path" =>
"/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT"}
}]
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)