@deephaven/jsapi-types
    Preparing search index...

    Class PartitionedTable

    Represents a set of Tables, each corresponding to some key. The keys are available locally, but a call must be made to the server to get each Table. All tables will have the same structure.

    Implements

    Index
    EVENT_DISCONNECT: string

    Indicates that a new key has been added to the array of keys, which you can now fetch with getTable.

    EVENT_KEYADDED: string

    Indicates that a new key has been added to the array of keys, which you can now fetch with getTable.

    EVENT_RECONNECT: string

    Indicates that a new key has been added to the array of keys, which you can now fetch with getTable.

    EVENT_RECONNECTFAILED: string

    Indicates that a new key has been added to the array of keys, which you can now fetch with getTable.

    EVENT_REQUEST_FAILED: string

    The server ended the key subscription with an error, so no new keys will be reported; keys already known can still be fetched. Such failures are not recoverable: fetch a new partitioned table. event.detail is the server's message.

    • get columns(): Column[]

      An array of the columns in the tables that can be retrieved from this partitioned table, including both key and non-key columns.

      Returns Column[]

      Array of Column

    • get keyColumns(): Column[]

      An array of all the key columns that the tables are partitioned by.

      Returns Column[]

      Array of Column

    • get size(): number

      The count of known keys.

      Returns number

      int

    • 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: Event<T>) => void

        A function to call when the event occurs.

      Returns () => void

      Returns a cleanup function.

    • Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This will not affect tables in use.

      Returns void

    • Fetch the underlying base table of the partitioned table.

      Returns Promise<Table>

      Promise of a Table

    • The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener for PartitionedTable.EVENT_KEYADDED will ensure no keys are missed.

      Returns Set<object>

      Set of Object

    • Fetch a table containing all the valid keys of the partitioned table.

      Returns Promise<Table>

      Promise of a Table

    • Open a new table that is the result of merging all constituent tables. See io.deephaven.engine.table.PartitionedTable.merge for details.

      Returns PendingTable<Table>

      A merged representation of the constituent tables.

    • Fetch the table with the given key. If the key does not exist, returns null.

      Parameters

      • key: object

        The key to fetch. An array of values for each key column, in the same order as the key columns are.

      Returns Promise<Table>

      Promise of Table, or null if the key does not exist.

    • Checks whether any event listeners are registered for the given event name.

      Parameters

      • name: string

        The event name.

      Returns boolean

      true if there is at least one listener registered for name; false otherwise.

    • Returns a promise that resolves the next time the named event occurs, with the value of the event's detail. If a timeout is specified and occurs before the event takes place, the promise will reject, otherwise waits indefinitely.

      Type Parameters

      • T

        The type of the event detail.

      Parameters

      • eventName: string

        The event name.

      • OptionaltimeoutInMillis: number

        Optional timeout in milliseconds.

      Returns Promise<Event<T>>

      A promise that resolves with the next matching event.

    • Removes an event listener added to this table.

      Type Parameters

      • T

      Parameters

      • name: string
      • callback: (e: Event<T>) => void

      Returns boolean