Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.

Unlike TableViewportSubscription, the "original" table does not have a reference to this instance, only the "private" table instance does, since the original cannot modify the subscription, and the private instance must forward data to it.

Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the subscription must be closed and a new one optioned to see those changes. The event model is slightly different from viewports to make it less expensive to compute for large tables.

Hierarchy

  • TableSubscription

Implements

Constructors

Accessors

Methods

  • Listen for events on this object.

    Type Parameters

    • T

      the type of the data that the event will provide

    Parameters

    • name: string

      the name of the event to listen for

    • callback: ((e) => void)

      a function to call when the event occurs

        • (e): void
        • Parameters

          Returns void

    Returns (() => void)

    Returns a cleanup function.

      • (): void
      • Listen for events on this object.

        Returns void

        Returns a cleanup function.

  • Updates the subscription to use the given columns and update interval.

    Parameters

    • columns: Column[]

      the new columns to subscribe to

    • updateIntervalMs: number

      the new update interval, or null/omit to use the default of one second

    Returns void

  • Stops the subscription on the server.

    Returns void

  • Type Parameters

    • T

    Parameters

    • eventName: string
    • Optional timeoutInMillis: number

    Returns Promise<Event<T>>

  • Removes an event listener added to this table.

    Type Parameters

    • T

    Parameters

    • name: string
    • callback: ((e) => void)
        • (e): void
        • Parameters

          Returns void

    Returns boolean