Skip to content

Commit 75d9a67

Browse files
Merge pull request #370 from couchbase/DOC-10836
Fixed DOC-10836
2 parents 085740e + c08933b commit 75d9a67

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

modules/howtos/examples/Analytics.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
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);

modules/test/scripts/init-couchbase/init-buckets.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/bin/bash
22

3+
# ===============================================
4+
# NOTE: Any changes made to this file will not be
5+
# automatically reflected in `make cb-start` as
6+
# the Makefile does not use the mounted version
7+
# of this file in the Docker image. You will need
8+
# to rebuild the image via `make cb-build` before
9+
# running `make cb-start`.
10+
# ===============================================
11+
312
# exit immediately if a command fails or if there are unset vars
413
set -euo pipefail
514

@@ -32,9 +41,9 @@ echo "cbimport travel-sample..."
3241
-b travel-sample \
3342
-d file:///opt/couchbase/samples/travel-sample.zip
3443

35-
echo "create airports dataset"
44+
echo "create airport dataset"
3645
curl --fail -v -u ${CB_USER}:${CB_PSWD} -H "Content-Type: application/json" -d '{
37-
"statement": "CREATE DATASET airports ON `travel-sample` WHERE `type`=\"airport\";",
46+
"statement": "CREATE DATASET airport ON `travel-sample` WHERE `type`=\"airport\";",
3847
"pretty":true,
3948
"client_context_id":"test"
4049
}' http://${CB_HOST}:8095/analytics/service

modules/test/scripts/init-couchbase/init.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/bin/bash
22

3+
# ===============================================
4+
# NOTE: Any changes made to this file will not be
5+
# automatically reflected in `make cb-start` as
6+
# the Makefile does not use the mounted version
7+
# of this file in the Docker image. You will need
8+
# to rebuild the image via `make cb-build` before
9+
# running `make cb-start`.
10+
# ===============================================
11+
312
CB_USER="${CB_USER:-Administrator}"
413
CB_PSWD="${CB_PSWD:-password}"
514
CB_HOST="${CB_HOST:-127.0.0.1}"

0 commit comments

Comments
 (0)