execute
suspend fun execute(query: String, arguments: Map<String, Any?>? = mapOf()): DittoQueryResult
Content copied to clipboard
Executes a DQL query and returns items as a query result.
This method only returns results from the local store without waiting for any DittoSyncSubscriptions to have caught up with the latest changes. Only use this method if your program must proceed with immediate results. Use a DittoStoreObserver to receive updates to query results as soon as they have been synced to this peer.
Java sees this as execute(String, Continuation)
and execute(String, Map, Continuation)
.
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.