Response
The Response class wraps the results returned by a SurrealQL query execution. A single query string can contain multiple statements, and the Response holds the result of each statement indexed by its zero-based position.
Source: surrealdb.java
Methods
.take(index)
Extracts the result of a specific statement from the response by its zero-based index. The untyped variant returns a raw Value, while the typed variant deserializes the result into the specified Java class.
| Parameter | Type | Description |
|---|---|---|
type | Class<T> | The class to deserialize the result into. Omit for an untyped Value return. |
num | int | The zero-based index of the statement result to extract. |
Returns: Value (untyped) or List<T> (typed)
.size()
Returns the number of statement results contained in the response.
Returns: int
Complete Example
See Also
Surreal — Connection and method reference
Executing queries — Query concepts and patterns
Value types — Working with the Value class
SurrealQL — Query language reference