SyncSubscription
@frozen
public struct SyncSubscription
SyncSubscription is used to define a Flexible Sync subscription obtained from querying a
subscription set, which can be used to read or remove/update a committed subscription.
-
Name of the subscription, if not specified it will return the value in Query as a String.
Declaration
Swift
public var name: String? { get } -
When the subscription was created. Recorded automatically.
Declaration
Swift
public var createdAt: Date { get } -
When the subscription was last updated. Recorded automatically.
Declaration
Swift
public var updatedAt: Date { get } -
Updates a Flexible Sync’s subscription with an allowed query which will be used to bootstrap data from the server when committed.
Warning
This method may only be called during a write subscription block.
Declaration
Parameters
typeThe type of the object to be queried.
queryA query which will be used to modify the existing query. If nil it will set the query to get all documents in the collection.
-
Updates a Flexible Sync’s subscription with an allowed query which will be used to bootstrap data from the server when committed.
Warning
This method may only be called during a write subscription block.
Declaration
Swift
public func updateQuery(to predicateFormat: String, _ args: Any...)Parameters
predicateFormatA predicate format string, optionally followed by a variable number of arguments, which will be used to modify the query.
-
Updates a Flexible Sync’s subscription with an allowed query which will be used to bootstrap data from the server when committed.
Warning
This method may only be called during a write subscription block.
Declaration
Swift
public func updateQuery(to predicate: NSPredicate)Parameters
predicateThe predicate with which to filter the objects on the server, which will be used to modify the query.
View on GitHub
Install in Dash