Interface SubscriptionTableData

Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in columns) either by index, or scanning the complete present index.

This class supports two ways of reading the table - checking the changes made since the last update, and reading all data currently in the table. While it is more expensive to always iterate over every single row in the table, it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though both options should be considered.

The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read specific rows or cells out of the table.

Hierarchy

Accessors

  • get added(): RangeSet
  • The ordered set of row indexes added since the last update.

    Returns RangeSet

    the rangeset of rows added

  • get columns(): Column[]
  • Returns Column[]

  • get modified(): RangeSet
  • The ordered set of row indexes updated since the last update

    Returns RangeSet

    the rnageset of modified rows

  • get removed(): RangeSet
  • The ordered set of row indexes removed since the last update

    Returns RangeSet

    the rangeset of removed rows

  • get rows(): Row[]
  • A lazily computed array of all rows available on the client.

    Returns Row[]

Methods

  • Reads a row object from the table, from which any subscribed column can be read.

    Parameters

    • index: number | LongWrapper

      the position or key to access

    Returns Row

    the row at the given location

  • Reads a specific cell from the table, by row key and column.

    Parameters

    • index: number | LongWrapper

      the row in the table to get data from

    • column: Column

      the column to read

    Returns any

    the value in the table

  • The server-specified Format to use for the cell at the given position.

    Parameters

    Returns Format

    a Format instance with any server-specified details