1717 /*
1818 * You need the following datasets created:
1919 *
20- * CREATE DATASET `airports ` ON `travel-sample` where `type` = "airport";
20+ * CREATE DATASET `airport ` ON `travel-sample` where `type` = "airport";
2121 * CREATE DATASET `huge-dataset` ON `travel-sample`;
2222 * ALTER COLLECTION `travel-sample`.`inventory`.`airport` ENABLE ANALYTICS;
2323 * CONNECT LINK Local;
@@ -86,7 +86,7 @@ public static void main(String... args) {
8686 {
8787 // tag::named[]
8888 AnalyticsResult result = cluster .analyticsQuery (
89- "select count(*) from airports where country = $country" ,
89+ "select count(*) from airport where country = $country" ,
9090 analyticsOptions ().parameters (JsonObject .create ().put ("country" , "France" )));
9191 // end::named[]
9292 show ("named" , result );
@@ -95,7 +95,7 @@ public static void main(String... args) {
9595 {
9696 // tag::positional[]
9797 AnalyticsResult result = cluster .analyticsQuery (
98- "select count(*) from airports where country = ?" ,
98+ "select count(*) from airport where country = ?" ,
9999 analyticsOptions ().parameters (JsonArray .from ("France" ))
100100 );
101101 // end::positional[]
@@ -105,7 +105,7 @@ public static void main(String... args) {
105105 {
106106 // tag::scanconsistency[]
107107 AnalyticsResult result = cluster .analyticsQuery (
108- "select count(*) from airports where country = 'France'" ,
108+ "select count(*) from airport where country = 'France'" ,
109109 analyticsOptions ().scanConsistency (AnalyticsScanConsistency .REQUEST_PLUS )
110110 );
111111 // end::scanconsistency[]
@@ -115,7 +115,7 @@ public static void main(String... args) {
115115 {
116116 // tag::clientcontextid[]
117117 AnalyticsResult result = cluster .analyticsQuery (
118- "select count(*) from airports where country = 'France'" ,
118+ "select count(*) from airport where country = 'France'" ,
119119 analyticsOptions ().clientContextId ("user-44" + UUID .randomUUID ())
120120 );
121121 // end::clientcontextid[]
@@ -125,7 +125,7 @@ public static void main(String... args) {
125125 {
126126 // tag::priority[]
127127 AnalyticsResult result = cluster .analyticsQuery (
128- "select count(*) from airports where country = 'France'" ,
128+ "select count(*) from airport where country = 'France'" ,
129129 analyticsOptions ().priority (true )
130130 );
131131 // end::priority[]
@@ -135,7 +135,7 @@ public static void main(String... args) {
135135 {
136136 // tag::readonly[]
137137 AnalyticsResult result = cluster .analyticsQuery (
138- "select count(*) from airports where country = 'France'" ,
138+ "select count(*) from airport where country = 'France'" ,
139139 analyticsOptions ().readonly (true )
140140 );
141141 // end::readonly[]
@@ -154,7 +154,7 @@ public static void main(String... args) {
154154 {
155155 // tag::rowsasobject[]
156156 AnalyticsResult result = cluster .analyticsQuery (
157- "select * from airports limit 3"
157+ "select * from airport limit 3"
158158 );
159159 for (JsonObject row : result .rowsAsObject ()) {
160160 System .out .println ("Found row: " + row );
0 commit comments