DittoSyncSubscription
public class DittoSyncSubscription
extension DittoSyncSubscription: Hashable
extension DittoSyncSubscription: Equatable
A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription’s query.
Create a sync subscription by calling DittoSync.registerSubscription()
.
The subscription will remain active until either explicitly cancelled via
DittoSyncSubscription.cancel()
or the owning Ditto
object goes out
of scope.
-
The query string of the sync subscription (as passed while registering it).
Declaration
Swift
public let queryString: String
-
The query arguments of the sync subscription (as passed while registering it).
Declaration
Swift
public let queryArguments: [String : Any?]?
-
Convenience property, returns
true
if the sync subscription has been cancelled, otherwise returnsfalse
. Also, a sync subscription is considered cancelled if the owningDitto
object goes out of scope.Declaration
Swift
public var isCancelled: Bool { get }
-
Cancels the sync subscription so that new changes matching the query are no longer received from other peers. No-op if it’s already cancelled via or the owning
Ditto
object goes out of scope.Declaration
Swift
public func cancel()
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Declaration
Swift
public static func == (left: DittoSyncSubscription, right: DittoSyncSubscription) -> Bool