Executes a DQL query and returns matching items as a query result.
- Note
- Only returns results from the local store without waiting for any SyncSubscription to have caught up with the latest changes. Only use this method if your program must proceed with immediate results. Use a Observer to receive updates to query results as soon as they have been synced to this peer.
- Parameters
-
| query | a string containing a valid query expressed in DQL. |
| query_args | a dictionary of values keyed by the placeholder name without the leading :. Example: {{"mileage", 123}}. |
- Returns
- a QueryResult object containing a QueryResultItem for each match.
- Exceptions
-
| `TransactionReadOnlyError` | if the transaction is read-only but a mutating query was executed |
| `DittoError` | if the query is not a valid DQL query or if the query fails. |