From eca9402b484af580d6131658140b34b51858c033 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sat, 29 Apr 2023 17:49:53 +0100 Subject: [PATCH] docs: update query Signed-off-by: Otavio Santana --- .../src/main/asciidoc/chapters/api/query.adoc | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/spec/src/main/asciidoc/chapters/api/query.adoc b/spec/src/main/asciidoc/chapters/api/query.adoc index ea7ebb6a1..1a0305037 100644 --- a/spec/src/main/asciidoc/chapters/api/query.adoc +++ b/spec/src/main/asciidoc/chapters/api/query.adoc @@ -22,27 +22,8 @@ It is important to note that the Jakarta NoSQL specification does not specify th Overall, the Jakarta NoSQL API's support for query by text provides Java developers with a flexible and intuitive way to perform CRUD operations on NoSQL databases. Although the query syntax is vendor-specific, the common interfaces and methods provided by the Jakarta NoSQL API make it easy to work with any NoSQL database that supports queries by text. The ability to dynamically bind parameters to a query at runtime adds extra flexibility, allowing developers to adapt their queries to changing requirements. -===== Key-Value Database Types - -[source,java] ----- -KeyValueTemplate template = // instance; -Stream users = template.query("get \"Diana\""); -template.query("remove \"Diana\""); ----- - -===== Column-Family Database Types - [source,java] ---- -ColumnTemplate template = // instance; -Stream result = template.query("select * from Person where id = 1"); ----- - -===== Document Database Types - -[source,java] ----- -DocumentTemplate template = // instance; -Stream result = template.query("select * from Person where age > 10"); ----- +Template template = // instance; +Stream result = template.query("provider query"); +---- \ No newline at end of file