Datasync Node
Represents a data node within the tree-like data of a Webcom application.
This class provides basic methods to browse, read, write data nodes, as well as subscribe to some events at a data node. Instances of DatasyncNode are built using the DatasyncManager.node method.
Constructors
Functions
Cancels any previous write operation on this data node with the DatasyncTime.AtNextDisconnection policy.
Cancel all subscriptions previously subscribed through the mobile push notification channel of the user mobile device (with the subscribeThroughPushNotification method).
Cancel all subscriptions previously subscribed through the webhook channel (with the subscribeThroughWebhook method).
Clears data at this data node asynchronously.
Returns a child of this data node with a unique key.
Shortcut for relativeNode.
Reads asynchronously the data at this data node, with a possible constraint.
Reads the data stored in the local cache at this data node. This method returns synchronously and doesn't send any request to the Webcom back end.
Convenient shortcut for merge(DatasyncTime.Now, value, callback)
.
Merges some data with the data at this data node asynchronously.
Shortcut for push.
Creates a child of this data node with a unique key and writes a given value at it.
Returns the data done specified by a path relatively to the data node represented by this DatasyncNode instance.
Performs an atomic write operation (or transaction) on this data node.
Convenient shortcut for set(DatasyncTime.Now, value, callback)
.
Writes some data at this data node asynchronously.
Same as Subscriber.subscribe, but use a LiveData object rather than callback to notify events to the user
Subscribes to a type of event with a given constraint on this data node and sends notifications to a callback function.
Subscribes to a type of event on this data node for a given duration and send notifications through the mobile push notification channel of the user mobile device.
Subscribes to a type of event on this data node until a given expirationDate and send notifications through the mobile push notification channel of the user mobile device.
Subscribes to a type of event on this data node for a given duration and send notifications to a webhook.
Subscribes to a type of event on this data node until a given expirationDate and send notifications to a webhook.
Properties
Gives the key of the data node represented by this DatasyncNode instance, that is, the name of the last segment of its path.
Gets the parent data node of this DatasyncNode instance.
Gets the timestamp encoded within the key of this DatasyncNode, when it has been generated using the createChild or push methods.