Installs and returns a sync subscription for a query, configuring Ditto to receive updates from other peers for documents matching that query. The provided query must be a SELECT
query.
- Parameters
-
query | a string containing a valid query expressed in DQL. |
arguments | a dictionary of values keyed by the placeholder name without the leading : . Example: {{"mileage", 123}} . |
- Returns
- An active
SyncSubscription
for the provided query and arguments. You'll have to keep it to be able to cancel the replication subscription, i.e. remove it from the store again. Otherwise it will remain active until Ditto goes out of scope.