Skip to content

Commit 017d367

Browse files
authored
update to cql2 (#705)
1 parent f91a1cd commit 017d367

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

ogc/query-with-cql-filters/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
group = 'com.esri.samples'
77

88
ext {
9-
arcgisVersion = '100.14.1'
9+
arcgisVersion = '100.15.0-3593'
1010
}
1111

1212
javafx {

ogc/query-with-cql-filters/src/main/java/com/esri/samples/query_with_cql_filters/QueryWithCqlFiltersController.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,13 @@ private void populateUiWithCqlQueriesAndDateValues() {
281281
ObservableList<String> cqlQueryList = FXCollections.observableArrayList();
282282

283283
// sample query 1: query for features with an F_CODE attribute property of "AP010".
284-
cqlQueryList.add("F_CODE = 'AP010'"); // cql-text query
285-
cqlQueryList.add("{ \"eq\" : [ { \"property\" : \"F_CODE\" }, \"AP010\" ] }"); // cql-json query
284+
cqlQueryList.add("{ \"op\": \"=\", \"args\": [ { \"property\": \"F_CODE\" }, \"AP010\" ] }"); // cql2-json query
286285

287286
// sample query 2: cql-text query for features with an F_CODE attribute property similar to "AQ".
288287
cqlQueryList.add("F_CODE LIKE 'AQ%'");
289288

290-
// sample query 3: use cql-json to combine "before" and "eq" operators with the logical "and" operator
291-
cqlQueryList.add("{\"and\":[{\"eq\":[{ \"property\" : \"F_CODE\" }, \"AP010\"]},{ \"before\":" +
292-
"[{ \"property\" : \"ZI001_SDV\"},\"2013-01-01\"]}]}");
289+
// sample query 3: use cql2-json to combine "before" and "eq" operators with the logical "and" operator
290+
cqlQueryList.add("{\"op\": \"and\", \"args\":[{ \"op\": \"=\", \"args\":[{ \"property\" : \"F_CODE\" }, \"AP010\"]}, { \"op\": \"t_before\", \"args\":[{ \"property\" : \"ZI001_SDV\"},\"2013-01-01\"]}]}");
293291

294292
// add sample CQL queries to the UI combobox
295293
comboBox.getItems().addAll(cqlQueryList);

0 commit comments

Comments
 (0)