Writing the Continuous Query
Each CQ uses a query and any number of listeners. The query filters the events on the server and the listener handles the events that make it through the query filter. With the query and the listener in hand, you can create and execute your query through the API.
This is the basic syntax for the CQ query:
SELECT * FROM /fullRegionPath [iterator] [WHERE clause]
The CQ query must satisfy the standard GemFire native client querying specifications described in Remote Querying. It also must satisfy these restrictions:
FROMclause must contain only a single region specification, with optional iterator variable.
- The query must be a
SELECTexpression only, preceded by zero or more
IMPORTstatements. This means the query cannot be a statement like
(SELECT * from /tradeOrder).size.
- The CQ query cannot use:
- Cross region joins
- Drill-downs into nested collections
- Bind parameters
Queries not meeting these constraints generate an
UnsupportedOperationException from the