Search in sources :

Example 6 with DataCommandRequest

use of org.apache.geode.management.internal.cli.domain.DataCommandRequest in project geode by apache.

the class DataCommandFunctionWithPDXJUnitTest method getTableFromQuery.

private TabularResultData getTableFromQuery(String query) {
    DataCommandRequest request = new DataCommandRequest();
    request.setQuery(query);
    DataCommandResult result = new DataCommandFunction().select(request);
    CompositeResultData r = result.toSelectCommandResult();
    return r.retrieveSectionByIndex(0).retrieveTableByIndex(0);
}
Also used : CompositeResultData(org.apache.geode.management.internal.cli.result.CompositeResultData) DataCommandRequest(org.apache.geode.management.internal.cli.domain.DataCommandRequest) DataCommandResult(org.apache.geode.management.internal.cli.domain.DataCommandResult)

Aggregations

DataCommandRequest (org.apache.geode.management.internal.cli.domain.DataCommandRequest)6 DataCommandResult (org.apache.geode.management.internal.cli.domain.DataCommandResult)6 DistributedMember (org.apache.geode.distributed.DistributedMember)4 InternalCache (org.apache.geode.internal.cache.InternalCache)4 CliMetaData (org.apache.geode.management.cli.CliMetaData)4 DataCommandFunction (org.apache.geode.management.internal.cli.functions.DataCommandFunction)4 CliCommand (org.springframework.shell.core.annotation.CliCommand)4 Region (org.apache.geode.cache.Region)3 IOException (java.io.IOException)1 FunctionDomainException (org.apache.geode.cache.query.FunctionDomainException)1 NameResolutionException (org.apache.geode.cache.query.NameResolutionException)1 QueryInvalidException (org.apache.geode.cache.query.QueryInvalidException)1 QueryInvocationTargetException (org.apache.geode.cache.query.QueryInvocationTargetException)1 TypeMismatchException (org.apache.geode.cache.query.TypeMismatchException)1 GfJsonException (org.apache.geode.management.internal.cli.json.GfJsonException)1 CompositeResultData (org.apache.geode.management.internal.cli.result.CompositeResultData)1 Subject (org.apache.shiro.subject.Subject)1