From feb47c439c51e0f310b53fb7e625a8028a08704a Mon Sep 17 00:00:00 2001
From: Emily Toop {@code
+ *
*
* Queries can be run and the results returned in a number of different formats. Individual result values are returned as `TypedValues` and
* the format differences relate to the number and structure of those values. The result format is related to the format provided in the query string.
*
* - `Rel` - This is the default `run` function and returns a list of rows of values. Queries that wish to have `Rel` results should format their query strings:
*
- *
* String query = "[:find ?name ?cat\n" +
* " :in ?type\n" +
* " :where\n" +
@@ -51,14 +51,14 @@ import java.util.UUID;
* ...
* }
* });
- *}
+ *{@code
+ *
*
* - `Scalar` - This returns a single value as a result. This can be optional, as the value may not be present. Queries that wish to have `Scalar` results should format their query strings:
*
- *
* String query = "[: find ?a ?b ?c\n" +
* " : where ... ]";
* mentat.query(query).run(new RelResultHandler() {
@@ -67,11 +67,11 @@ import java.util.UUID;
* ...
* }
* });
- *}
+ *{@code
+ *
*
* - `Coll` - This returns a list of single values as a result. Queries that wish to have `Coll` results should format their query strings:
- *
* String query = "[: find ?a .\n" +
* " : where ... ]";
* mentat.query(query).run(new ScalarResultHandler() {
@@ -80,10 +80,10 @@ import java.util.UUID;
* ...
* }
* });
- *}
+ *{@code
+ *
*
* - `Tuple` - This returns a single row of values. Queries that wish to have `Tuple` results should format their query strings:
- *
* String query = "[: find [?a ...]\n" +
* " : where ... ]";
* mentat.query(query).run(new ScalarResultHandler() {
@@ -92,10 +92,10 @@ import java.util.UUID;
* ...
* }
* });
- *}
+ *{@code
+ *
*/
public class Query extends RustObject {
diff --git a/sdks/android/Mentat/library/src/main/java/org/mozilla/mentat/RelResult.java b/sdks/android/Mentat/library/src/main/java/org/mozilla/mentat/RelResult.java
index 040d04e7..6e1eb4c1 100644
--- a/sdks/android/Mentat/library/src/main/java/org/mozilla/mentat/RelResult.java
+++ b/sdks/android/Mentat/library/src/main/java/org/mozilla/mentat/RelResult.java
@@ -19,7 +19,7 @@ import com.sun.jna.Pointer;
*
* String query = "[: find [?a ?b ?c]\n" +
* " : where ... ]";
* mentat.query(query).run(new TupleResultHandler() {
@@ -104,7 +104,7 @@ import java.util.UUID;
* ...
* }
* });
- *}
+ *
{@code + ** * To iterate over the result set use standard iteration flows. - ** mentat.query(query).run(new RelResultHandler() { * @Override * public void handleRows(RelResult rows) { @@ -28,10 +28,10 @@ import com.sun.jna.Pointer; * ... * } * }); - *}+ *
{@code + ** * Note that iteration is consuming and can only be done once. */* mentat.query(query).run(new RelResultHandler() { * @Override * public void handleRows(RelResult rows) { @@ -40,7 +40,7 @@ import com.sun.jna.Pointer; * } * } * }); - *}+ *