Class: RealtimeEvent

RealtimeEvent()

new RealtimeEvent()

An event for a real-time query.

Source:

Members

data :T

the database entity this event was generated for, e.g. an entity that just entered or left the result set

Type:
  • T
Source:

date :Date

server-time from the instant at which the event was generated

Type:
  • Date
Source:

index :number

for sorting queries only: the position of the matching entity in the ordered result (-1 for non-matching entities)

Type:
  • number
Source:

initial :boolean

a boolean value indicating whether this event reflects the matching status at query time (true) or a recent change
data change (false)

Type:
  • boolean
Source:

matchType :string

indicates how the transmitted entity relates to the query result.
Every event is delivered with one of the following match types:


  • 'match': the entity matches the query.

  • 'add': the entity entered the result set, i.e. it did not match before and is matching now.

  • 'change': the entity was updated, but remains a match

  • 'changeIndex' (for sorting queries only): the entity was updated and remains a match, but changed its position
    within the query result

  • 'remove': the entity was a match before, but is not matching any longer

Type:
  • string
Source:

operation :string

the operation by which the entity was altered ('insert', 'update' or 'delete'; 'none' if unknown or not applicable)

Type:
  • string
Source:

target :query.Node.<T>

the query on which .eventStream([options]) was invoked

Type:
Source: