From 55588805088356355f97966eaa28644268dea61c Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Tue, 6 Jul 2021 15:18:48 +0100 Subject: [PATCH] DOC-8773: Java 3 quickstart: use LIKE instead of = The last example of step 4 does the query `SELECT * FROM bucketName WHERE email = $email`, but then runs it with the parameters `{"email": "%@acme.com"}`. This returns no results, as the correct query would be `SELECT * FROM bucketName WHERE email LIKE $email`. This PR corrects the example. --- modules/quick-start/pages/common/quickstart-java3.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/quick-start/pages/common/quickstart-java3.adoc b/modules/quick-start/pages/common/quickstart-java3.adoc index 9f0265b..39fd45e 100644 --- a/modules/quick-start/pages/common/quickstart-java3.adoc +++ b/modules/quick-start/pages/common/quickstart-java3.adoc @@ -171,7 +171,7 @@ Finally, here is how you query the database when you need all users where the *e [source,Java] ---- QueryResult result = cluster.query( - "SELECT * FROM `" + bucketName + "` WHERE email = $email", + "SELECT * FROM `" + bucketName + "` WHERE email LIKE $email", QueryOptions.queryOptions().parameters(JsonObject.create().put("email", "%@acme.com")) );