Run queries against GemFire regions.

Run the specified OQL query as a single quoted string and displays results in pages allows to move between pages. If limit is not set in the query, then a default limit of 1000 (derived from GFSH environment variable APP_FETCH_SIZE) will be applied. Page size is derived from GFSH environment variable APP_COLLECTION_LIMIT (default value=20).

Note: This command should not be executed from gfsh if the objects being queried contain cyclic references.

Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.

query --query=value [--step-name=value] [--interactive=value]
Table 1. Parameters
Name Description Default Value
--query Required. The OQL string.  
--interactive Specifies whether or not this query is interactive. If false, then all results will be displayed at once. true
Example Commands:
query --query="select * from /region1/region12" --interactive

\\ Using variables set using 'set variable' for substitution in the query:
query --query="select * from /region1 r1 where r1.id='${PERSON_ID}'"
query --query="select * from ${EMPLOYEE_REGION} e1 where e1.id='${PERSON_ID}'"
Sample Output:
gfsh>query --query='SELECT * FROM /region2'

Result     : true
startCount : 0
endCount   : 20
Rows       : 1

('Hello World!!')