execute

fun execute(query: String, arguments: Map<String, Any?> = mapOf()): DittoQueryResult

Executes a DQL query and returns items as a query result.

Limitations:

  • Supports SELECT * FROM <collection name> with optional WHERE <expression>.

  • No query parameters as function arguments yet.

  • No transactions.

Return

A DittoQueryResult containing a DittoQueryResultItem for each match.

Since

4.5.0

Parameters

query

A string containing a valid query expressed in DQL.

arguments

A map of values keyed by the placeholder name without the leading :. Example: ["mileage": 123].

Throws

If there is a problem with the query or the store.