LiveQuery

AV. LiveQuery

A LiveQuery, created by AV.Query#subscribe is an EventEmitter notifies changes of the Query.

Constructor

new LiveQuery()

Source:
Since:
  • 3.0.0

Methods

unsubscribe() → {Promise}

Source:
unsubscribe the query
Returns:
Type
Promise

Events

create

Source:
A new AV.Object which fulfills the Query you subscribe is created.
Parameters:
Name Type Description
target AV.Object | AV.File updated object

delete

Source:
An existing AV.Object which fulfills the Query you subscribe is deleted.
Parameters:
Name Type Description
target AV.Object | AV.File updated object

enter

Source:
An existing AV.Object which doesn't fulfill the Query is updated and now it fulfills the Query.
Parameters:
Name Type Description
target AV.Object | AV.File updated object
updatedKeys Array.<String> updated keys

leave

Source:
An existing AV.Object which fulfills the Query is updated and now it doesn't fulfill the Query.
Parameters:
Name Type Description
target AV.Object | AV.File updated object
updatedKeys Array.<String> updated keys

update

Source:
An existing AV.Object which fulfills the Query you subscribe is updated.
Parameters:
Name Type Description
target AV.Object | AV.File updated object
updatedKeys Array.<String> updated keys