Package io.deephaven.web.client.api
Interface JsITable
- All Known Subinterfaces:
JsResolvedTable
- All Known Implementing Classes:
JsTable,JsTotalsTable
@TsIgnore
public interface JsITable
A server-side table that the client has retained: its data and metadata can be read, and it must be closed when no
longer needed. Three types are retained tables:
JsTable, with its own client-side filter and sort state on topJsResolvedTable, which also offers the chainableJsTableOperationsJsTotalsTable
Only visible directly in Java, not TypeScript. Exported members are copied to subclasses instead as needed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Signals that the table is no longer used, so the server can release its resources.elemental2.promise.Promise<TableData> createSnapshot(@TsTypeRef(SnapshotOptions.class) Object options) Returns a promise of aTableDatainstance containing a snapshot of the current state of the table, within the bounds of the specified rows and columns.createSubscription(@TsTypeRef(SubscriptionOptions.class) Object options) Creates a subscription to the specified columns, across all rows in the table.createViewportSubscription(@TsTypeRef(ViewportSubscriptionOptions.class) Object options) Creates a viewport subscription to the specified columns, across the specified rows in the table.findColumn(String columnName) Finds a column by name.@JsNullable ObjectgetAttribute(String attributeName) Reads an attribute's value as a string.elemental2.core.ReadonlyArray<String> The names of all attributes defined on this table.elemental2.core.ReadonlyArray<Column> The columns that are present on this table.elemental2.promise.Promise<JsColumnStatistics> Computes statistics for one column of this table, such as its count, sum and average for a numeric column, or its most common values for other types.doublegetSize()The total count of rows in the table.
-
Method Details
-
getSize
@JsProperty double getSize()The total count of rows in the table. If a viewport subscription is active, this size updates when the subscription updates. If not, and the table is uncoalesced, the size isJsTable.SIZE_UNCOALESCED. Otherwise, the size updates when the server's update graph processes changes.- Returns:
- the size of the table
-
getColumns
The columns that are present on this table.- Returns:
- the columns present in this table
-
findColumn
Finds a column by name.- Parameters:
columnName- the name of the column- Returns:
- the column
-
getAttributes
The names of all attributes defined on this table.- Returns:
- an array of attributes defined on this table
-
getAttribute
Reads an attribute's value as a string. Only primitive and string values are sent to the client. An attribute listed bygetAttributes()with any other value cannot be read here.- Parameters:
attributeName- the name of the attribute to read- Returns:
- the value of the attribute or null if none with that name exists
-
createSnapshot
@JsMethod elemental2.promise.Promise<TableData> createSnapshot(@TsTypeRef(SnapshotOptions.class) @TsTypeRef(SnapshotOptions.class) Object options) Returns a promise of aTableDatainstance containing a snapshot of the current state of the table, within the bounds of the specified rows and columns.- Parameters:
options- the snapshot options, described inDataOptions.SnapshotOptions- Returns:
- a promise of
TableData
-
createViewportSubscription
@JsMethod TableViewportSubscription createViewportSubscription(@TsTypeRef(ViewportSubscriptionOptions.class) @TsTypeRef(ViewportSubscriptionOptions.class) Object options) Creates a viewport subscription to the specified columns, across the specified rows in the table. The returnedTableViewportSubscriptioninstance allows the viewport to be changed over time, and events are fired from it when the data changes or when a viewport change is applied. Each call creates a new subscription, which must haveTableViewportSubscription.close()called on it to stop it and release its resources.- Parameters:
options- the viewport subscription options, described inDataOptions.ViewportSubscriptionOptions- Returns:
- a new
TableViewportSubscription
-
createSubscription
@JsMethod TableSubscription createSubscription(@TsTypeRef(SubscriptionOptions.class) @TsTypeRef(SubscriptionOptions.class) Object options) Creates a subscription to the specified columns, across all rows in the table. Useful for charts or taking a snapshot of the table atomically. The initial snapshot arrives in a single event, and later changes arrive as updates. However, this may still be very expensive to run from a browser for very large tables. Each call creates a new subscription, which must haveAbstractTableSubscription.close()called on it to stop it and release its resources, and all events are fired from theTableSubscriptioninstance.- Parameters:
options- the subscription options, described inDataOptions.SubscriptionOptions- Returns:
- a new
TableSubscription
-
close
@JsMethod void close()Signals that the table is no longer used, so the server can release its resources. Logs a warning if called more than once. -
getColumnStatistics
@JsMethod elemental2.promise.Promise<JsColumnStatistics> getColumnStatistics(Column.ColumnOrName column) Computes statistics for one column of this table, such as its count, sum and average for a numeric column, or its most common values for other types.- Parameters:
column- the column, or the name of the column, to compute statistics for- Returns:
- a promise of the
ColumnStatisticsfor that column
-