Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a long-running query against Flex data wherein the returned result set subsequently receives pushed updates whenever new (or updated) records would match the given expression. Updated results are presented row-by-row until this query is explicitly closed.

Use the SyncClient.liveQuery method to create a live query.

Hierarchy

  • Closeable
    • LiveQuery

Index

Events

Accessors

Methods

Events

Static Readonly itemRemoved

itemRemoved: "itemRemoved" = 'itemRemoved'

Fired when an existing item has been removed.

Parameters:

  1. object args - info object provided with the event. It has the following properties:
    • object key - the key of the removed item
example
liveQuery.on('itemRemoved', (args) => {
  console.log(`Item ${args.key} was removed`);
});

Static Readonly itemUpdated

itemUpdated: "itemUpdated" = 'itemUpdated'

Fired when an item has been added or updated.

Parameters:

  1. InsightsItem item - updated item
example
liveQuery.on('itemUpdated', (item) => {
  console.log(`Item ${item.key} was updated`'`);
  console.log('Item value:', item.value);
});

Accessors

sid

  • get sid(): string
  • The immutable identifier of this query object, assigned by the system.

    Returns string

Methods

close

  • close(): void
  • Closes this query instance and unsubscribes from further service events. This will eventually stop the physical inflow of updates over the network, when all other instances of this query are closed as well.

    Returns void