@deephaven/jsapi-types 1.0.0-dev0.34.3 → 1.0.0-dev0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1830 -1864
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// Minimum TypeScript Version: 4.3
|
|
2
2
|
// Generated using com.vertispan.tsdefs.doclet.TsDoclet
|
|
3
3
|
|
|
4
|
+
export interface IIterableResult<T> {
|
|
5
|
+
value:T;
|
|
6
|
+
done:boolean;
|
|
7
|
+
}
|
|
4
8
|
/**
|
|
5
9
|
* This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
|
|
6
10
|
* returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
|
|
@@ -11,42 +15,8 @@ export interface Iterator<T> {
|
|
|
11
15
|
hasNext():boolean;
|
|
12
16
|
next():IIterableResult<T>;
|
|
13
17
|
}
|
|
14
|
-
export interface IIterableResult<T> {
|
|
15
|
-
value:T;
|
|
16
|
-
done:boolean;
|
|
17
|
-
}
|
|
18
18
|
export namespace dh.storage {
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
22
|
-
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
23
|
-
* be used.
|
|
24
|
-
*/
|
|
25
|
-
export class FileContents {
|
|
26
|
-
protected constructor();
|
|
27
|
-
|
|
28
|
-
static blob(blob:Blob):FileContents;
|
|
29
|
-
static text(...text:string[]):FileContents;
|
|
30
|
-
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
31
|
-
text():Promise<string>;
|
|
32
|
-
arrayBuffer():Promise<ArrayBuffer>;
|
|
33
|
-
get etag():string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Storage service metadata about files and folders.
|
|
38
|
-
*/
|
|
39
|
-
export class ItemDetails {
|
|
40
|
-
protected constructor();
|
|
41
|
-
|
|
42
|
-
get filename():string;
|
|
43
|
-
get basename():string;
|
|
44
|
-
get size():number;
|
|
45
|
-
get etag():string;
|
|
46
|
-
get type():ItemTypeType;
|
|
47
|
-
get dirname():string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
20
|
/**
|
|
51
21
|
* Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
|
|
52
22
|
*/
|
|
@@ -105,6 +75,37 @@ export namespace dh.storage {
|
|
|
105
75
|
createDirectory(path:string):Promise<void>;
|
|
106
76
|
}
|
|
107
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Storage service metadata about files and folders.
|
|
80
|
+
*/
|
|
81
|
+
export class ItemDetails {
|
|
82
|
+
protected constructor();
|
|
83
|
+
|
|
84
|
+
toString():string;
|
|
85
|
+
get filename():string;
|
|
86
|
+
get basename():string;
|
|
87
|
+
get size():number;
|
|
88
|
+
get etag():string;
|
|
89
|
+
get type():ItemTypeType;
|
|
90
|
+
get dirname():string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
95
|
+
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
96
|
+
* be used.
|
|
97
|
+
*/
|
|
98
|
+
export class FileContents {
|
|
99
|
+
protected constructor();
|
|
100
|
+
|
|
101
|
+
static blob(blob:Blob):FileContents;
|
|
102
|
+
static text(...text:string[]):FileContents;
|
|
103
|
+
static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
|
|
104
|
+
text():Promise<string>;
|
|
105
|
+
arrayBuffer():Promise<ArrayBuffer>;
|
|
106
|
+
get etag():string;
|
|
107
|
+
}
|
|
108
|
+
|
|
108
109
|
|
|
109
110
|
type ItemTypeType = string;
|
|
110
111
|
export class ItemType {
|
|
@@ -117,31 +118,47 @@ export namespace dh.storage {
|
|
|
117
118
|
export namespace dh {
|
|
118
119
|
|
|
119
120
|
/**
|
|
120
|
-
*
|
|
121
|
-
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
122
|
-
*
|
|
123
|
-
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
124
|
-
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
125
|
-
* backwards compatibility and to better follow JS expectations.
|
|
121
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
126
122
|
*/
|
|
127
|
-
export interface
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
123
|
+
export interface LocalTimeWrapper {
|
|
124
|
+
valueOf():string;
|
|
125
|
+
getHour():number;
|
|
126
|
+
getMinute():number;
|
|
127
|
+
getSecond():number;
|
|
128
|
+
getNano():number;
|
|
129
|
+
toString():string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
|
|
133
|
+
* determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
|
|
134
|
+
* for easier scrolling without going to the server.
|
|
135
|
+
*/
|
|
136
|
+
export interface ViewportData extends TableData {
|
|
132
137
|
/**
|
|
133
|
-
*
|
|
138
|
+
* The index of the first returned row
|
|
139
|
+
* @return double
|
|
134
140
|
*/
|
|
135
|
-
|
|
141
|
+
get offset():number;
|
|
136
142
|
/**
|
|
137
|
-
*
|
|
143
|
+
* A list of columns describing the data types in each row
|
|
144
|
+
* @return {@link dh.Column} array.
|
|
138
145
|
*/
|
|
139
|
-
|
|
146
|
+
get columns():Array<Column>;
|
|
140
147
|
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
148
|
+
* An array of rows of data
|
|
149
|
+
* @return {@link dh.ViewportRow} array.
|
|
143
150
|
*/
|
|
144
|
-
get
|
|
151
|
+
get rows():Array<ViewportRow>;
|
|
152
|
+
}
|
|
153
|
+
export interface LayoutHints {
|
|
154
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
155
|
+
|
|
156
|
+
get hiddenColumns():string[]|null;
|
|
157
|
+
get frozenColumns():string[]|null;
|
|
158
|
+
get columnGroups():ColumnGroup[]|null;
|
|
159
|
+
get areSavedLayoutsAllowed():boolean;
|
|
160
|
+
get frontColumns():string[]|null;
|
|
161
|
+
get backColumns():string[]|null;
|
|
145
162
|
}
|
|
146
163
|
export interface ColumnGroup {
|
|
147
164
|
get name():string|null;
|
|
@@ -149,36 +166,22 @@ export namespace dh {
|
|
|
149
166
|
get color():string|null;
|
|
150
167
|
}
|
|
151
168
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* are
|
|
169
|
+
* Common interface for various ways of accessing table data and formatting.
|
|
170
|
+
*
|
|
171
|
+
* Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
|
|
172
|
+
* implement only abstract methods, and default methods present in this interface will dispatch accordingly.
|
|
155
173
|
*/
|
|
156
|
-
export interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
168
|
-
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
169
|
-
*/
|
|
170
|
-
reexport():Promise<WidgetExportedObject>;
|
|
171
|
-
/**
|
|
172
|
-
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
173
|
-
* the same instance.
|
|
174
|
-
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
175
|
-
*/
|
|
176
|
-
fetch():Promise<any>;
|
|
177
|
-
/**
|
|
178
|
-
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
179
|
-
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
180
|
-
*/
|
|
181
|
-
close():void;
|
|
174
|
+
export interface TableData {
|
|
175
|
+
get(index:LongWrapper|number):Row;
|
|
176
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
177
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
178
|
+
get columns():Array<Column>;
|
|
179
|
+
get rows():Array<Row>;
|
|
180
|
+
}
|
|
181
|
+
export interface Row {
|
|
182
|
+
get(column:Column):any;
|
|
183
|
+
getFormat(column:Column):Format;
|
|
184
|
+
get index():LongWrapper;
|
|
182
185
|
}
|
|
183
186
|
export interface TreeViewportData extends TableData {
|
|
184
187
|
get offset():number;
|
|
@@ -186,47 +189,175 @@ export namespace dh {
|
|
|
186
189
|
get rows():Array<TreeRow>;
|
|
187
190
|
}
|
|
188
191
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* This class supports two ways of reading the table - checking the changes made since the last update, and reading
|
|
193
|
-
* all data currently in the table. While it is more expensive to always iterate over every single row in the table,
|
|
194
|
-
* it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
|
|
195
|
-
* both options should be considered.
|
|
196
|
-
*
|
|
197
|
-
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
198
|
-
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
199
|
-
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
|
|
200
|
-
* read specific rows or cells out of the table.
|
|
192
|
+
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
193
|
+
* {@link dh.TotalsTable}.
|
|
201
194
|
*/
|
|
202
|
-
export interface
|
|
203
|
-
|
|
195
|
+
export interface JoinableTable {
|
|
196
|
+
freeze():Promise<Table>;
|
|
197
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
204
198
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
199
|
+
* Joins this table to the provided table, using one of the specified join types:
|
|
200
|
+
* <ul>
|
|
201
|
+
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
202
|
+
* provided matching rule.</li>
|
|
203
|
+
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
204
|
+
* tables.</li>
|
|
205
|
+
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
206
|
+
* with errors if there is not exactly one.</li>
|
|
207
|
+
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
208
|
+
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
209
|
+
* </ul>
|
|
210
|
+
*
|
|
211
|
+
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
212
|
+
* <p>
|
|
213
|
+
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
214
|
+
* more guidance on picking a join operation.
|
|
215
|
+
* @deprecated Instead, call the specific method for the join type.
|
|
216
|
+
* @param joinType - The type of join to perform, see the list above.
|
|
217
|
+
* @param rightTable - The table to match to values in this table
|
|
218
|
+
* @param columnsToMatch - Columns that should match
|
|
219
|
+
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
220
|
+
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
221
|
+
* @return a promise that will resolve to the joined table
|
|
207
222
|
*/
|
|
208
|
-
|
|
223
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
209
224
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
225
|
+
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
226
|
+
* row from the right table.
|
|
227
|
+
* <p>
|
|
228
|
+
* The `asOfMatchRule` value can be one of:
|
|
229
|
+
* <ul>
|
|
230
|
+
* <li>LESS_THAN_EQUAL</li>
|
|
231
|
+
* <li>LESS_THAN</li>
|
|
232
|
+
* <li>GREATER_THAN_EQUAL</li>
|
|
233
|
+
* <li>GREATER_THAN</li>
|
|
234
|
+
* </ul>
|
|
235
|
+
* @param rightTable - the table to match to values in this table
|
|
236
|
+
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
237
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
238
|
+
* columns
|
|
239
|
+
* @param asOfMatchRule - the match rule to use, see above
|
|
240
|
+
* @return a promise that will resolve to the joined table
|
|
212
241
|
*/
|
|
213
|
-
|
|
214
|
-
get columns():Array<Column>;
|
|
242
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
215
243
|
/**
|
|
216
|
-
*
|
|
217
|
-
*
|
|
244
|
+
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
245
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
246
|
+
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
247
|
+
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
248
|
+
* @param rightTable - the table to match to values in this table
|
|
249
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
250
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
251
|
+
* columns
|
|
252
|
+
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
253
|
+
* server select a value
|
|
254
|
+
* @return a promise that will resolve to the joined table
|
|
218
255
|
*/
|
|
219
|
-
|
|
220
|
-
get rows():Array<Row>;
|
|
221
|
-
}
|
|
222
|
-
export interface WorkerHeapInfo {
|
|
256
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
223
257
|
/**
|
|
224
|
-
*
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
258
|
+
* a promise that will be resolved with the newly created table holding the results of the specified exact join
|
|
259
|
+
* operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
|
|
260
|
+
* table being added to the output.
|
|
261
|
+
* @param rightTable - the table to match to values in this table
|
|
262
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
263
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
264
|
+
* columns
|
|
265
|
+
* @return a promise that will resolve to the joined table
|
|
266
|
+
*/
|
|
267
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
268
|
+
/**
|
|
269
|
+
* a promise that will be resolved with the newly created table holding the results of the specified natural join
|
|
270
|
+
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
271
|
+
* right table being added to the output.
|
|
272
|
+
* @param rightTable - the table to match to values in this table
|
|
273
|
+
* @param columnsToMatch - the columns that should match exactly
|
|
274
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
275
|
+
* columns
|
|
276
|
+
* @return a promise that will resolve to the joined table
|
|
277
|
+
*/
|
|
278
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
279
|
+
}
|
|
280
|
+
export interface HasEventHandling {
|
|
281
|
+
/**
|
|
282
|
+
* Listen for events on this object.
|
|
283
|
+
* @param name - the name of the event to listen for
|
|
284
|
+
* @param callback - a function to call when the event occurs
|
|
285
|
+
* @return Returns a cleanup function.
|
|
286
|
+
* @typeParam T - the type of the data that the event will provide
|
|
287
|
+
*/
|
|
288
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
289
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
290
|
+
hasListeners(name:string):boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Removes an event listener added to this table.
|
|
293
|
+
* @param name -
|
|
294
|
+
* @param callback -
|
|
295
|
+
* @return
|
|
296
|
+
* @typeParam T -
|
|
297
|
+
*/
|
|
298
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Row implementation that also provides additional read-only properties. represents visible rows in the table,
|
|
302
|
+
* but with additional properties to reflect the tree structure.
|
|
303
|
+
*/
|
|
304
|
+
export interface TreeRow extends ViewportRow {
|
|
305
|
+
/**
|
|
306
|
+
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
307
|
+
* rows below this one with a greater depth than this one
|
|
308
|
+
* @return boolean
|
|
309
|
+
*/
|
|
310
|
+
get isExpanded():boolean;
|
|
311
|
+
/**
|
|
312
|
+
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
|
|
313
|
+
* row and its expand/collapse icon
|
|
314
|
+
* @return int
|
|
315
|
+
*/
|
|
316
|
+
get depth():number;
|
|
317
|
+
/**
|
|
318
|
+
* True if this node has children and can be expanded; false otherwise. Note that this value may change when
|
|
319
|
+
* the table updates, depending on the table's configuration
|
|
320
|
+
* @return boolean
|
|
321
|
+
*/
|
|
322
|
+
get hasChildren():boolean;
|
|
323
|
+
get index():LongWrapper;
|
|
324
|
+
}
|
|
325
|
+
export interface WorkerHeapInfo {
|
|
326
|
+
/**
|
|
327
|
+
* Total heap size available for this worker.
|
|
328
|
+
*/
|
|
329
|
+
get totalHeapSize():number;
|
|
330
|
+
get freeMemory():number;
|
|
331
|
+
get maximumHeapSize():number;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
|
|
335
|
+
* table column.
|
|
336
|
+
*/
|
|
337
|
+
export interface ColumnStatistics {
|
|
338
|
+
/**
|
|
339
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
340
|
+
* <p>
|
|
341
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
342
|
+
* @param name - the display name of the statistic
|
|
343
|
+
* @return String
|
|
344
|
+
*/
|
|
345
|
+
getType(name:string):string;
|
|
346
|
+
/**
|
|
347
|
+
* Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
|
|
348
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
349
|
+
* than 19 unique values.
|
|
350
|
+
* @return Map of String double
|
|
351
|
+
*/
|
|
352
|
+
get uniqueValues():Map<string, number>;
|
|
353
|
+
/**
|
|
354
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
355
|
+
* <p>
|
|
356
|
+
* A map of each statistic's name to its value.
|
|
357
|
+
* @return Map of String and Object
|
|
358
|
+
*/
|
|
359
|
+
get statisticsMap():Map<string, object>;
|
|
360
|
+
}
|
|
230
361
|
/**
|
|
231
362
|
* Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
|
|
232
363
|
* the upstream table - when it changes handle, this listens and updates its own handle accordingly.
|
|
@@ -356,48 +487,66 @@ export namespace dh {
|
|
|
356
487
|
*/
|
|
357
488
|
get isRefreshing():boolean;
|
|
358
489
|
}
|
|
359
|
-
|
|
490
|
+
/**
|
|
491
|
+
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
|
|
492
|
+
* in columns) either by index, or scanning the complete present index.
|
|
493
|
+
*
|
|
494
|
+
* This class supports two ways of reading the table - checking the changes made since the last update, and reading
|
|
495
|
+
* all data currently in the table. While it is more expensive to always iterate over every single row in the table,
|
|
496
|
+
* it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
|
|
497
|
+
* both options should be considered.
|
|
498
|
+
*
|
|
499
|
+
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
500
|
+
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
501
|
+
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
|
|
502
|
+
* read specific rows or cells out of the table.
|
|
503
|
+
*/
|
|
504
|
+
export interface SubscriptionTableData extends TableData {
|
|
505
|
+
get fullIndex():RangeSet;
|
|
360
506
|
/**
|
|
361
|
-
*
|
|
362
|
-
* @
|
|
363
|
-
* @param callback - a function to call when the event occurs
|
|
364
|
-
* @return Returns a cleanup function.
|
|
365
|
-
* @typeParam T - the type of the data that the event will provide
|
|
507
|
+
* The ordered set of row indexes removed since the last update
|
|
508
|
+
* @return dh.RangeSet
|
|
366
509
|
*/
|
|
367
|
-
|
|
368
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
369
|
-
hasListeners(name:string):boolean;
|
|
510
|
+
get removed():RangeSet;
|
|
370
511
|
/**
|
|
371
|
-
*
|
|
372
|
-
* @
|
|
373
|
-
* @param callback -
|
|
374
|
-
* @return
|
|
375
|
-
* @typeParam T -
|
|
512
|
+
* The ordered set of row indexes added since the last update
|
|
513
|
+
* @return dh.RangeSet
|
|
376
514
|
*/
|
|
377
|
-
|
|
515
|
+
get added():RangeSet;
|
|
516
|
+
get columns():Array<Column>;
|
|
517
|
+
/**
|
|
518
|
+
* The ordered set of row indexes updated since the last update
|
|
519
|
+
* @return dh.RangeSet
|
|
520
|
+
*/
|
|
521
|
+
get modified():RangeSet;
|
|
522
|
+
get rows():Array<Row>;
|
|
378
523
|
}
|
|
379
524
|
/**
|
|
380
|
-
*
|
|
525
|
+
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
526
|
+
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
381
527
|
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
528
|
+
* Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
|
|
529
|
+
* "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
|
|
530
|
+
* backwards compatibility and to better follow JS expectations.
|
|
384
531
|
*/
|
|
385
|
-
export interface
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
532
|
+
export interface WidgetMessageDetails {
|
|
533
|
+
/**
|
|
534
|
+
* Returns the data from this message as a base64-encoded string.
|
|
535
|
+
*/
|
|
536
|
+
getDataAsBase64():string;
|
|
537
|
+
/**
|
|
538
|
+
* Returns the data from this message as a Uint8Array.
|
|
539
|
+
*/
|
|
540
|
+
getDataAsU8():Uint8Array;
|
|
541
|
+
/**
|
|
542
|
+
* Returns the data from this message as a utf-8 string.
|
|
543
|
+
*/
|
|
544
|
+
getDataAsString():string;
|
|
545
|
+
/**
|
|
546
|
+
* Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
|
|
547
|
+
* objects, and should close them when no longer needed.
|
|
548
|
+
*/
|
|
549
|
+
get exportedObjects():WidgetExportedObject[];
|
|
401
550
|
}
|
|
402
551
|
/**
|
|
403
552
|
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
|
|
@@ -407,145 +556,55 @@ export namespace dh {
|
|
|
407
556
|
get index():LongWrapper;
|
|
408
557
|
}
|
|
409
558
|
/**
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
559
|
+
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
560
|
+
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
561
|
+
* are correctly freed.
|
|
413
562
|
*/
|
|
414
|
-
export interface
|
|
563
|
+
export interface WidgetExportedObject {
|
|
415
564
|
/**
|
|
416
|
-
*
|
|
417
|
-
*
|
|
565
|
+
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
566
|
+
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
567
|
+
* {@link Widget.sendMessage}.
|
|
568
|
+
* @return the string type of this server-side object, or null.
|
|
418
569
|
*/
|
|
419
|
-
|
|
570
|
+
readonly type?:string|null;
|
|
571
|
+
|
|
420
572
|
/**
|
|
421
|
-
*
|
|
422
|
-
*
|
|
573
|
+
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
574
|
+
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
575
|
+
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
423
576
|
*/
|
|
424
|
-
|
|
577
|
+
reexport():Promise<WidgetExportedObject>;
|
|
425
578
|
/**
|
|
426
|
-
*
|
|
427
|
-
*
|
|
579
|
+
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
580
|
+
* the same instance.
|
|
581
|
+
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
428
582
|
*/
|
|
429
|
-
|
|
583
|
+
fetch():Promise<any>;
|
|
584
|
+
/**
|
|
585
|
+
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
586
|
+
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
587
|
+
*/
|
|
588
|
+
close():void;
|
|
430
589
|
}
|
|
431
590
|
/**
|
|
432
|
-
*
|
|
433
|
-
* {@link dh.TotalsTable}.
|
|
591
|
+
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
434
592
|
*/
|
|
435
|
-
export interface
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
*
|
|
451
|
-
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
452
|
-
* <p>
|
|
453
|
-
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
454
|
-
* more guidance on picking a join operation.
|
|
455
|
-
* @deprecated Instead, call the specific method for the join type.
|
|
456
|
-
* @param joinType - The type of join to perform, see the list above.
|
|
457
|
-
* @param rightTable - The table to match to values in this table
|
|
458
|
-
* @param columnsToMatch - Columns that should match
|
|
459
|
-
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
460
|
-
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
461
|
-
* @return a promise that will resolve to the joined table
|
|
462
|
-
*/
|
|
463
|
-
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
464
|
-
/**
|
|
465
|
-
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
466
|
-
* row from the right table.
|
|
467
|
-
* <p>
|
|
468
|
-
* The `asOfMatchRule` value can be one of:
|
|
469
|
-
* <ul>
|
|
470
|
-
* <li>LESS_THAN_EQUAL</li>
|
|
471
|
-
* <li>LESS_THAN</li>
|
|
472
|
-
* <li>GREATER_THAN_EQUAL</li>
|
|
473
|
-
* <li>GREATER_THAN</li>
|
|
474
|
-
* </ul>
|
|
475
|
-
* @param rightTable - the table to match to values in this table
|
|
476
|
-
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
477
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
478
|
-
* columns
|
|
479
|
-
* @param asOfMatchRule - the match rule to use, see above
|
|
480
|
-
* @return a promise that will resolve to the joined table
|
|
481
|
-
*/
|
|
482
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
483
|
-
/**
|
|
484
|
-
* a promise that will be resolved with the newly created table holding the results of the specified cross join
|
|
485
|
-
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
486
|
-
* right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
|
|
487
|
-
* key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
|
|
488
|
-
* @param rightTable - the table to match to values in this table
|
|
489
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
490
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
491
|
-
* columns
|
|
492
|
-
* @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
|
|
493
|
-
* server select a value
|
|
494
|
-
* @return a promise that will resolve to the joined table
|
|
495
|
-
*/
|
|
496
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
497
|
-
/**
|
|
498
|
-
* a promise that will be resolved with the newly created table holding the results of the specified exact join
|
|
499
|
-
* operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
|
|
500
|
-
* table being added to the output.
|
|
501
|
-
* @param rightTable - the table to match to values in this table
|
|
502
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
503
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
504
|
-
* columns
|
|
505
|
-
* @return a promise that will resolve to the joined table
|
|
506
|
-
*/
|
|
507
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
508
|
-
/**
|
|
509
|
-
* a promise that will be resolved with the newly created table holding the results of the specified natural join
|
|
510
|
-
* operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
|
|
511
|
-
* right table being added to the output.
|
|
512
|
-
* @param rightTable - the table to match to values in this table
|
|
513
|
-
* @param columnsToMatch - the columns that should match exactly
|
|
514
|
-
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
515
|
-
* columns
|
|
516
|
-
* @return a promise that will resolve to the joined table
|
|
517
|
-
*/
|
|
518
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Row implementation that also provides additional read-only properties. represents visible rows in the table,
|
|
522
|
-
* but with additional properties to reflect the tree structure.
|
|
523
|
-
*/
|
|
524
|
-
export interface TreeRow extends ViewportRow {
|
|
525
|
-
/**
|
|
526
|
-
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
527
|
-
* rows below this one with a greater depth than this one
|
|
528
|
-
* @return boolean
|
|
529
|
-
*/
|
|
530
|
-
get isExpanded():boolean;
|
|
531
|
-
/**
|
|
532
|
-
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
|
|
533
|
-
* row and its expand/collapse icon
|
|
534
|
-
* @return int
|
|
535
|
-
*/
|
|
536
|
-
get depth():number;
|
|
537
|
-
/**
|
|
538
|
-
* True if this node has children and can be expanded; false otherwise. Note that this value may change when
|
|
539
|
-
* the table updates, depending on the table's configuration
|
|
540
|
-
* @return boolean
|
|
541
|
-
*/
|
|
542
|
-
get hasChildren():boolean;
|
|
543
|
-
get index():LongWrapper;
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
547
|
-
*/
|
|
548
|
-
export interface Format {
|
|
593
|
+
export interface LocalDateWrapper {
|
|
594
|
+
valueOf():string;
|
|
595
|
+
getYear():number;
|
|
596
|
+
getMonthValue():number;
|
|
597
|
+
getDayOfMonth():number;
|
|
598
|
+
toString():string;
|
|
599
|
+
}
|
|
600
|
+
export interface RefreshToken {
|
|
601
|
+
get bytes():string;
|
|
602
|
+
get expiry():number;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
606
|
+
*/
|
|
607
|
+
export interface Format {
|
|
549
608
|
/**
|
|
550
609
|
* The format string to apply to the value of this cell.
|
|
551
610
|
* @return String
|
|
@@ -568,49 +627,6 @@ export namespace dh {
|
|
|
568
627
|
readonly numberFormat?:string|null;
|
|
569
628
|
}
|
|
570
629
|
/**
|
|
571
|
-
* Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
|
|
572
|
-
* table column.
|
|
573
|
-
*/
|
|
574
|
-
export interface ColumnStatistics {
|
|
575
|
-
/**
|
|
576
|
-
* Gets the type of formatting that should be used for given statistic.
|
|
577
|
-
* <p>
|
|
578
|
-
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
579
|
-
* @param name - the display name of the statistic
|
|
580
|
-
* @return String
|
|
581
|
-
*/
|
|
582
|
-
getType(name:string):string;
|
|
583
|
-
/**
|
|
584
|
-
* Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
|
|
585
|
-
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
586
|
-
* than 19 unique values.
|
|
587
|
-
* @return Map of String double
|
|
588
|
-
*/
|
|
589
|
-
get uniqueValues():Map<string, number>;
|
|
590
|
-
/**
|
|
591
|
-
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
592
|
-
* <p>
|
|
593
|
-
* A map of each statistic's name to its value.
|
|
594
|
-
* @return Map of String and Object
|
|
595
|
-
*/
|
|
596
|
-
get statisticsMap():Map<string, object>;
|
|
597
|
-
}
|
|
598
|
-
export interface Row {
|
|
599
|
-
get(column:Column):any;
|
|
600
|
-
getFormat(column:Column):Format;
|
|
601
|
-
get index():LongWrapper;
|
|
602
|
-
}
|
|
603
|
-
/**
|
|
604
|
-
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
605
|
-
*/
|
|
606
|
-
export interface LocalDateWrapper {
|
|
607
|
-
valueOf():string;
|
|
608
|
-
getYear():number;
|
|
609
|
-
getMonthValue():number;
|
|
610
|
-
getDayOfMonth():number;
|
|
611
|
-
toString():string;
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
630
|
* Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
|
|
615
631
|
* real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
|
|
616
632
|
* <p>
|
|
@@ -655,20 +671,19 @@ export namespace dh {
|
|
|
655
671
|
getViewportData():Promise<TableData>;
|
|
656
672
|
snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
|
|
657
673
|
}
|
|
674
|
+
|
|
658
675
|
/**
|
|
659
|
-
*
|
|
676
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
677
|
+
* this type TableMap.
|
|
678
|
+
* @deprecated
|
|
660
679
|
*/
|
|
661
|
-
export
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
}
|
|
669
|
-
export interface RefreshToken {
|
|
670
|
-
get bytes():string;
|
|
671
|
-
get expiry():number;
|
|
680
|
+
export class TableMap {
|
|
681
|
+
static readonly EVENT_KEYADDED:string;
|
|
682
|
+
static readonly EVENT_DISCONNECT:string;
|
|
683
|
+
static readonly EVENT_RECONNECT:string;
|
|
684
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
685
|
+
|
|
686
|
+
protected constructor();
|
|
672
687
|
}
|
|
673
688
|
|
|
674
689
|
export class IdeSession implements HasEventHandling {
|
|
@@ -740,344 +755,42 @@ export namespace dh {
|
|
|
740
755
|
}
|
|
741
756
|
|
|
742
757
|
/**
|
|
743
|
-
*
|
|
744
|
-
* to
|
|
745
|
-
* methods return a new Sort instance.
|
|
758
|
+
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
759
|
+
* the server to get each Table. All tables will have the same structure.
|
|
746
760
|
*/
|
|
747
|
-
export class
|
|
748
|
-
static readonly ASCENDING:string;
|
|
749
|
-
static readonly DESCENDING:string;
|
|
750
|
-
static readonly REVERSE:string;
|
|
751
|
-
|
|
752
|
-
protected constructor();
|
|
753
|
-
|
|
754
|
-
/**
|
|
755
|
-
* Builds a Sort instance to sort values in ascending order.
|
|
756
|
-
* @return {@link dh.Sort}
|
|
757
|
-
*/
|
|
758
|
-
asc():Sort;
|
|
759
|
-
/**
|
|
760
|
-
* Builds a Sort instance to sort values in descending order.
|
|
761
|
-
* @return {@link dh.Sort}
|
|
762
|
-
*/
|
|
763
|
-
desc():Sort;
|
|
764
|
-
/**
|
|
765
|
-
* Builds a Sort instance which takes the absolute value before applying order.
|
|
766
|
-
* @return {@link dh.Sort}
|
|
767
|
-
*/
|
|
768
|
-
abs():Sort;
|
|
769
|
-
toString():string;
|
|
761
|
+
export class PartitionedTable implements HasEventHandling {
|
|
770
762
|
/**
|
|
771
|
-
*
|
|
772
|
-
* @return boolean
|
|
763
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
773
764
|
*/
|
|
774
|
-
|
|
765
|
+
static readonly EVENT_KEYADDED:string;
|
|
775
766
|
/**
|
|
776
|
-
*
|
|
777
|
-
* @return {@link dh.Column}
|
|
767
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
778
768
|
*/
|
|
779
|
-
|
|
769
|
+
static readonly EVENT_DISCONNECT:string;
|
|
780
770
|
/**
|
|
781
|
-
*
|
|
782
|
-
* @return String
|
|
771
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
783
772
|
*/
|
|
784
|
-
get direction():string;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
export class DateWrapper extends LongWrapper {
|
|
788
|
-
protected constructor();
|
|
789
|
-
|
|
790
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
791
|
-
asDate():Date;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
export class QueryInfo {
|
|
795
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
796
|
-
static readonly EVENT_DISCONNECT:string;
|
|
797
773
|
static readonly EVENT_RECONNECT:string;
|
|
798
|
-
static readonly EVENT_CONNECT:string;
|
|
799
|
-
|
|
800
|
-
protected constructor();
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
805
|
-
* column.
|
|
806
|
-
*/
|
|
807
|
-
export class Column {
|
|
808
774
|
/**
|
|
809
|
-
*
|
|
810
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
811
|
-
* @return String
|
|
775
|
+
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
812
776
|
*/
|
|
813
|
-
readonly
|
|
814
|
-
readonly description?:string|null;
|
|
777
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
815
778
|
|
|
816
779
|
protected constructor();
|
|
817
780
|
|
|
781
|
+
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
818
782
|
/**
|
|
819
|
-
* the
|
|
820
|
-
* @param
|
|
821
|
-
* @return
|
|
783
|
+
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
784
|
+
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
785
|
+
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
822
786
|
*/
|
|
823
|
-
|
|
824
|
-
getFormat(row:Row):Format;
|
|
787
|
+
getTable(key:object):Promise<Table|undefined|null>;
|
|
825
788
|
/**
|
|
826
|
-
*
|
|
827
|
-
*
|
|
789
|
+
* Open a new table that is the result of merging all constituent tables. See
|
|
790
|
+
* {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
|
|
791
|
+
* @return A merged representation of the constituent tables.
|
|
828
792
|
*/
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
832
|
-
* operation, or as a builder to create a filter operation.
|
|
833
|
-
* @return {@link dh.FilterValue}
|
|
834
|
-
*/
|
|
835
|
-
filter():FilterValue;
|
|
836
|
-
/**
|
|
837
|
-
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
838
|
-
* @param expression -
|
|
839
|
-
* @return {@link dh.CustomColumn}
|
|
840
|
-
*/
|
|
841
|
-
formatColor(expression:string):CustomColumn;
|
|
842
|
-
/**
|
|
843
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
844
|
-
* @param expression -
|
|
845
|
-
* @return {@link dh.CustomColumn}
|
|
846
|
-
*/
|
|
847
|
-
formatNumber(expression:string):CustomColumn;
|
|
848
|
-
/**
|
|
849
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
850
|
-
* @param expression -
|
|
851
|
-
* @return {@link dh.CustomColumn}
|
|
852
|
-
*/
|
|
853
|
-
formatDate(expression:string):CustomColumn;
|
|
854
|
-
toString():string;
|
|
855
|
-
/**
|
|
856
|
-
* Label for this column.
|
|
857
|
-
* @return String
|
|
858
|
-
*/
|
|
859
|
-
get name():string;
|
|
860
|
-
/**
|
|
861
|
-
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
|
|
862
|
-
* <b>isUncoalesced</b> property on <b>Table</b>)
|
|
863
|
-
* @return boolean
|
|
864
|
-
*/
|
|
865
|
-
get isPartitionColumn():boolean;
|
|
866
|
-
/**
|
|
867
|
-
*
|
|
868
|
-
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
869
|
-
* @return int
|
|
870
|
-
*/
|
|
871
|
-
get index():number;
|
|
872
|
-
get isSortable():boolean;
|
|
873
|
-
/**
|
|
874
|
-
* Type of the row data that can be found in this column.
|
|
875
|
-
* @return String
|
|
876
|
-
*/
|
|
877
|
-
get type():string;
|
|
878
|
-
/**
|
|
879
|
-
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
880
|
-
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
881
|
-
* @param expression -
|
|
882
|
-
* @return {@link dh.CustomColumn}
|
|
883
|
-
*/
|
|
884
|
-
static formatRowColor(expression:string):CustomColumn;
|
|
885
|
-
/**
|
|
886
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
887
|
-
* @param name -
|
|
888
|
-
* @param expression -
|
|
889
|
-
* @return {@link dh.CustomColumn}
|
|
890
|
-
*/
|
|
891
|
-
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
896
|
-
* this type TableMap.
|
|
897
|
-
* @deprecated
|
|
898
|
-
*/
|
|
899
|
-
export class TableMap {
|
|
900
|
-
static readonly EVENT_KEYADDED:string;
|
|
901
|
-
static readonly EVENT_DISCONNECT:string;
|
|
902
|
-
static readonly EVENT_RECONNECT:string;
|
|
903
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
904
|
-
|
|
905
|
-
protected constructor();
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* A js type for operating on input tables.
|
|
910
|
-
*
|
|
911
|
-
* Represents a User Input Table, which can have data added to it from other sources.
|
|
912
|
-
*
|
|
913
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
914
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
915
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
916
|
-
* before sending the next operation.
|
|
917
|
-
*
|
|
918
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
919
|
-
*
|
|
920
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
921
|
-
* object.
|
|
922
|
-
*/
|
|
923
|
-
export class InputTable {
|
|
924
|
-
protected constructor();
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
928
|
-
* property at that name and validate it can be put into the given column type.
|
|
929
|
-
* @param row -
|
|
930
|
-
* @param userTimeZone -
|
|
931
|
-
* @return Promise of dh.InputTable
|
|
932
|
-
*/
|
|
933
|
-
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
934
|
-
/**
|
|
935
|
-
* Add multiple rows to a table.
|
|
936
|
-
* @param rows -
|
|
937
|
-
* @param userTimeZone -
|
|
938
|
-
* @return Promise of dh.InputTable
|
|
939
|
-
*/
|
|
940
|
-
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
941
|
-
/**
|
|
942
|
-
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
943
|
-
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
944
|
-
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
945
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
946
|
-
* @param tableToAdd -
|
|
947
|
-
* @return Promise of dh.InputTable
|
|
948
|
-
*/
|
|
949
|
-
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
950
|
-
/**
|
|
951
|
-
* Add multiple tables to this Input Table.
|
|
952
|
-
* @param tablesToAdd -
|
|
953
|
-
* @return Promise of dh.InputTable
|
|
954
|
-
*/
|
|
955
|
-
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
956
|
-
/**
|
|
957
|
-
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
958
|
-
* @param tableToDelete -
|
|
959
|
-
* @return Promise of dh.InputTable
|
|
960
|
-
*/
|
|
961
|
-
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
962
|
-
/**
|
|
963
|
-
* Delete multiple tables from this Input Table.
|
|
964
|
-
* @param tablesToDelete -
|
|
965
|
-
* @return
|
|
966
|
-
*/
|
|
967
|
-
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
968
|
-
/**
|
|
969
|
-
* A list of the key columns, by name
|
|
970
|
-
* @return String array.
|
|
971
|
-
*/
|
|
972
|
-
get keys():string[];
|
|
973
|
-
/**
|
|
974
|
-
* A list of the value columns, by name
|
|
975
|
-
* @return String array.
|
|
976
|
-
*/
|
|
977
|
-
get values():string[];
|
|
978
|
-
/**
|
|
979
|
-
* A list of the key Column objects
|
|
980
|
-
* @return {@link dh.Column} array.
|
|
981
|
-
*/
|
|
982
|
-
get keyColumns():Column[];
|
|
983
|
-
/**
|
|
984
|
-
* A list of the value Column objects
|
|
985
|
-
* @return {@link dh.Column} array.
|
|
986
|
-
*/
|
|
987
|
-
get valueColumns():Column[];
|
|
988
|
-
/**
|
|
989
|
-
* The source table for this Input Table
|
|
990
|
-
* @return dh.table
|
|
991
|
-
*/
|
|
992
|
-
get table():Table;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
/**
|
|
996
|
-
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
997
|
-
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
998
|
-
*
|
|
999
|
-
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1000
|
-
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1001
|
-
* forward data to it.
|
|
1002
|
-
*
|
|
1003
|
-
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1004
|
-
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1005
|
-
* viewports to make it less expensive to compute for large tables.
|
|
1006
|
-
*/
|
|
1007
|
-
export class TableSubscription implements HasEventHandling {
|
|
1008
|
-
/**
|
|
1009
|
-
* Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
|
|
1010
|
-
* <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
|
|
1011
|
-
* allowing access to the entire range of items currently in the subscribed columns.
|
|
1012
|
-
*/
|
|
1013
|
-
static readonly EVENT_UPDATED:string;
|
|
1014
|
-
|
|
1015
|
-
protected constructor();
|
|
1016
|
-
|
|
1017
|
-
/**
|
|
1018
|
-
* Stops the subscription on the server.
|
|
1019
|
-
*/
|
|
1020
|
-
close():void;
|
|
1021
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1022
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1023
|
-
hasListeners(name:string):boolean;
|
|
1024
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1025
|
-
/**
|
|
1026
|
-
* The columns that were subscribed to when this subscription was created
|
|
1027
|
-
* @return {@link dh.Column}
|
|
1028
|
-
*/
|
|
1029
|
-
get columns():Array<Column>;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1034
|
-
*/
|
|
1035
|
-
export class BigIntegerWrapper {
|
|
1036
|
-
protected constructor();
|
|
1037
|
-
|
|
1038
|
-
static ofString(str:string):BigIntegerWrapper;
|
|
1039
|
-
asNumber():number;
|
|
1040
|
-
valueOf():string;
|
|
1041
|
-
toString():string;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
1046
|
-
* the server to get each Table. All tables will have the same structure.
|
|
1047
|
-
*/
|
|
1048
|
-
export class PartitionedTable implements HasEventHandling {
|
|
1049
|
-
/**
|
|
1050
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1051
|
-
*/
|
|
1052
|
-
static readonly EVENT_KEYADDED:string;
|
|
1053
|
-
/**
|
|
1054
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1055
|
-
*/
|
|
1056
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1057
|
-
/**
|
|
1058
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1059
|
-
*/
|
|
1060
|
-
static readonly EVENT_RECONNECT:string;
|
|
1061
|
-
/**
|
|
1062
|
-
* Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
|
|
1063
|
-
*/
|
|
1064
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1065
|
-
|
|
1066
|
-
protected constructor();
|
|
1067
|
-
|
|
1068
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
1069
|
-
/**
|
|
1070
|
-
* Fetch the table with the given key. If the key does not exist, returns `null`.
|
|
1071
|
-
* @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
|
|
1072
|
-
* @return Promise of dh.Table, or `null` if the key does not exist.
|
|
1073
|
-
*/
|
|
1074
|
-
getTable(key:object):Promise<Table|undefined|null>;
|
|
1075
|
-
/**
|
|
1076
|
-
* Open a new table that is the result of merging all constituent tables. See
|
|
1077
|
-
* {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
|
|
1078
|
-
* @return A merged representation of the constituent tables.
|
|
1079
|
-
*/
|
|
1080
|
-
getMergedTable():Promise<Table>;
|
|
793
|
+
getMergedTable():Promise<Table>;
|
|
1081
794
|
/**
|
|
1082
795
|
* The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
|
|
1083
796
|
* for <b>keyadded</b> will ensure no keys are missed.
|
|
@@ -1130,12 +843,147 @@ export namespace dh {
|
|
|
1130
843
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1131
844
|
}
|
|
1132
845
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
846
|
+
export class Ide {
|
|
847
|
+
constructor();
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* @deprecated
|
|
851
|
+
*/
|
|
852
|
+
getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
853
|
+
/**
|
|
854
|
+
* @deprecated
|
|
855
|
+
*/
|
|
856
|
+
static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
861
|
+
* interpret these responses to see what to render, or how to respond.
|
|
862
|
+
* <p>
|
|
863
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
864
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
865
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
866
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
867
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
868
|
+
* <p>
|
|
869
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
870
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
871
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
872
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
873
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
874
|
+
* <p>
|
|
875
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
876
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
877
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
878
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
879
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
880
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
881
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
882
|
+
* <p>
|
|
883
|
+
* This can suggest several patterns for how plugins operate:
|
|
884
|
+
* <ul>
|
|
885
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
886
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
887
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
888
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
889
|
+
* provided to the JS API consumer.</li>
|
|
890
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
891
|
+
* which provided them. One concrete example of this could have been
|
|
892
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
893
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
894
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
895
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
896
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
897
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
898
|
+
* an internal table instance.</li>
|
|
899
|
+
* </ul>
|
|
900
|
+
*
|
|
901
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
902
|
+
* <ul>
|
|
903
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
904
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
905
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
906
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
907
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
908
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
909
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
910
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
911
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
912
|
+
* </ul>
|
|
913
|
+
*/
|
|
914
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
915
|
+
static readonly EVENT_MESSAGE:string;
|
|
916
|
+
static readonly EVENT_CLOSE:string;
|
|
917
|
+
|
|
918
|
+
protected constructor();
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Ends the client connection to the server.
|
|
922
|
+
*/
|
|
923
|
+
close():void;
|
|
924
|
+
getDataAsBase64():string;
|
|
925
|
+
getDataAsU8():Uint8Array;
|
|
926
|
+
getDataAsString():string;
|
|
927
|
+
/**
|
|
928
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
929
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
930
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
931
|
+
*/
|
|
932
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
933
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
934
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
935
|
+
hasListeners(name:string):boolean;
|
|
936
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
937
|
+
/**
|
|
938
|
+
*
|
|
939
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
940
|
+
* them when finished using them.
|
|
941
|
+
*/
|
|
942
|
+
get exportedObjects():WidgetExportedObject[];
|
|
943
|
+
/**
|
|
944
|
+
*
|
|
945
|
+
* @return the type of this widget
|
|
946
|
+
*/
|
|
947
|
+
get type():string;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
953
|
+
* roll-up table.
|
|
954
|
+
*/
|
|
955
|
+
export class RollupConfig {
|
|
956
|
+
/**
|
|
957
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
958
|
+
*/
|
|
959
|
+
groupingColumns:Array<String>;
|
|
960
|
+
/**
|
|
961
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
962
|
+
* roll-up table.
|
|
963
|
+
*/
|
|
964
|
+
aggregations:{ [key: string]: Array<AggregationOperationType>; };
|
|
965
|
+
/**
|
|
966
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
967
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
968
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
969
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
970
|
+
*/
|
|
971
|
+
includeConstituents:boolean;
|
|
972
|
+
includeOriginalColumns?:boolean|null;
|
|
973
|
+
/**
|
|
974
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
975
|
+
*/
|
|
976
|
+
includeDescriptions:boolean;
|
|
977
|
+
|
|
978
|
+
constructor();
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
983
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
984
|
+
*/
|
|
985
|
+
export class IdeConnection implements HasEventHandling {
|
|
986
|
+
/**
|
|
1139
987
|
* @deprecated
|
|
1140
988
|
*/
|
|
1141
989
|
static readonly HACK_CONNECTION_FAILURE:string;
|
|
@@ -1191,400 +1039,402 @@ export namespace dh {
|
|
|
1191
1039
|
}
|
|
1192
1040
|
|
|
1193
1041
|
/**
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1042
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
1043
|
+
* column.
|
|
1196
1044
|
*/
|
|
1197
|
-
export class
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
export class CoreClient implements HasEventHandling {
|
|
1206
|
-
static readonly EVENT_CONNECT:string;
|
|
1207
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1208
|
-
static readonly EVENT_RECONNECT:string;
|
|
1209
|
-
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
1210
|
-
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
1211
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1212
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
1213
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1214
|
-
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
1215
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1216
|
-
|
|
1217
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
1218
|
-
|
|
1219
|
-
running():Promise<CoreClient>;
|
|
1220
|
-
getServerUrl():string;
|
|
1221
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
1222
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
1223
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
1224
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
1225
|
-
getServerConfigValues():Promise<string[][]>;
|
|
1226
|
-
getStorageService():dh.storage.StorageService;
|
|
1227
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
1228
|
-
disconnect():void;
|
|
1229
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1230
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1231
|
-
hasListeners(name:string):boolean;
|
|
1232
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1233
|
-
}
|
|
1045
|
+
export class Column {
|
|
1046
|
+
/**
|
|
1047
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1048
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1049
|
+
* @return String
|
|
1050
|
+
*/
|
|
1051
|
+
readonly constituentType?:string|null;
|
|
1052
|
+
readonly description?:string|null;
|
|
1234
1053
|
|
|
1235
|
-
/**
|
|
1236
|
-
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1237
|
-
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1238
|
-
* instance.
|
|
1239
|
-
*/
|
|
1240
|
-
export class FilterCondition {
|
|
1241
1054
|
protected constructor();
|
|
1242
1055
|
|
|
1243
1056
|
/**
|
|
1244
|
-
* the
|
|
1245
|
-
* @
|
|
1057
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1058
|
+
* @param row -
|
|
1059
|
+
* @return Any
|
|
1246
1060
|
*/
|
|
1247
|
-
|
|
1061
|
+
get(row:Row):any;
|
|
1062
|
+
getFormat(row:Row):Format;
|
|
1248
1063
|
/**
|
|
1249
|
-
* a
|
|
1250
|
-
* @
|
|
1251
|
-
* @return FilterCondition
|
|
1064
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
1065
|
+
* @return {@link dh.Sort}
|
|
1252
1066
|
*/
|
|
1253
|
-
|
|
1067
|
+
sort():Sort;
|
|
1254
1068
|
/**
|
|
1255
|
-
* a
|
|
1256
|
-
*
|
|
1257
|
-
* @return
|
|
1069
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
1070
|
+
* operation, or as a builder to create a filter operation.
|
|
1071
|
+
* @return {@link dh.FilterValue}
|
|
1258
1072
|
*/
|
|
1259
|
-
|
|
1073
|
+
filter():FilterValue;
|
|
1260
1074
|
/**
|
|
1261
|
-
* a
|
|
1262
|
-
* @
|
|
1075
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1076
|
+
* @param expression -
|
|
1077
|
+
* @return {@link dh.CustomColumn}
|
|
1263
1078
|
*/
|
|
1264
|
-
|
|
1265
|
-
get columns():Array<Column>;
|
|
1079
|
+
formatColor(expression:string):CustomColumn;
|
|
1266
1080
|
/**
|
|
1267
|
-
* a
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1271
|
-
* than the third</li>
|
|
1272
|
-
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1273
|
-
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1274
|
-
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1275
|
-
* "not a number"</i></li>
|
|
1276
|
-
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1277
|
-
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1278
|
-
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1279
|
-
* expression</li>
|
|
1280
|
-
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1281
|
-
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1282
|
-
* <p>
|
|
1283
|
-
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1284
|
-
* method should be used in other cases
|
|
1285
|
-
* </p>
|
|
1286
|
-
* </li>
|
|
1287
|
-
* </ul>
|
|
1288
|
-
* @param function -
|
|
1289
|
-
* @param args -
|
|
1290
|
-
* @return dh.FilterCondition
|
|
1081
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1082
|
+
* @param expression -
|
|
1083
|
+
* @return {@link dh.CustomColumn}
|
|
1291
1084
|
*/
|
|
1292
|
-
|
|
1085
|
+
formatNumber(expression:string):CustomColumn;
|
|
1293
1086
|
/**
|
|
1294
|
-
* a
|
|
1295
|
-
*
|
|
1296
|
-
*
|
|
1297
|
-
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1298
|
-
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1299
|
-
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1300
|
-
* {@link dh.Column.filter}).
|
|
1301
|
-
* @param value -
|
|
1302
|
-
* @param columns -
|
|
1303
|
-
* @return dh.FilterCondition
|
|
1087
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1088
|
+
* @param expression -
|
|
1089
|
+
* @return {@link dh.CustomColumn}
|
|
1304
1090
|
*/
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
/**
|
|
1309
|
-
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1310
|
-
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1311
|
-
* inform the UI right away that they have taken place.
|
|
1312
|
-
*/
|
|
1313
|
-
export class Table implements JoinableTable, HasEventHandling {
|
|
1314
|
-
readonly description?:string|null;
|
|
1315
|
-
readonly pluginName?:string|null;
|
|
1316
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1317
|
-
static readonly EVENT_SIZECHANGED:string;
|
|
1318
|
-
static readonly EVENT_UPDATED:string;
|
|
1319
|
-
static readonly EVENT_ROWADDED:string;
|
|
1320
|
-
static readonly EVENT_ROWREMOVED:string;
|
|
1321
|
-
static readonly EVENT_ROWUPDATED:string;
|
|
1322
|
-
static readonly EVENT_SORTCHANGED:string;
|
|
1323
|
-
static readonly EVENT_FILTERCHANGED:string;
|
|
1324
|
-
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1325
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1326
|
-
static readonly EVENT_RECONNECT:string;
|
|
1327
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
1328
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
1329
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1330
|
-
static readonly SIZE_UNCOALESCED:number;
|
|
1331
|
-
|
|
1332
|
-
protected constructor();
|
|
1333
|
-
|
|
1334
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1091
|
+
formatDate(expression:string):CustomColumn;
|
|
1092
|
+
toString():string;
|
|
1335
1093
|
/**
|
|
1336
|
-
*
|
|
1337
|
-
*
|
|
1338
|
-
* @param key -
|
|
1339
|
-
* @return {@link dh.Column}
|
|
1094
|
+
* Label for this column.
|
|
1095
|
+
* @return String
|
|
1340
1096
|
*/
|
|
1341
|
-
|
|
1097
|
+
get name():string;
|
|
1342
1098
|
/**
|
|
1343
|
-
*
|
|
1344
|
-
*
|
|
1345
|
-
* @return
|
|
1099
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
|
|
1100
|
+
* <b>isUncoalesced</b> property on <b>Table</b>)
|
|
1101
|
+
* @return boolean
|
|
1346
1102
|
*/
|
|
1347
|
-
|
|
1348
|
-
isBlinkTable():boolean;
|
|
1103
|
+
get isPartitionColumn():boolean;
|
|
1349
1104
|
/**
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1352
|
-
* @return
|
|
1105
|
+
*
|
|
1106
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
1107
|
+
* @return int
|
|
1353
1108
|
*/
|
|
1354
|
-
|
|
1109
|
+
get index():number;
|
|
1110
|
+
get isSortable():boolean;
|
|
1355
1111
|
/**
|
|
1356
|
-
*
|
|
1112
|
+
* Type of the row data that can be found in this column.
|
|
1113
|
+
* @return String
|
|
1357
1114
|
*/
|
|
1358
|
-
|
|
1359
|
-
getAttributes():string[];
|
|
1115
|
+
get type():string;
|
|
1360
1116
|
/**
|
|
1361
|
-
*
|
|
1362
|
-
*
|
|
1363
|
-
* @param
|
|
1364
|
-
* @return
|
|
1117
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
1118
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
1119
|
+
* @param expression -
|
|
1120
|
+
* @return {@link dh.CustomColumn}
|
|
1365
1121
|
*/
|
|
1366
|
-
|
|
1122
|
+
static formatRowColor(expression:string):CustomColumn;
|
|
1367
1123
|
/**
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1370
|
-
*
|
|
1371
|
-
*
|
|
1372
|
-
* not.
|
|
1373
|
-
* @param sort -
|
|
1374
|
-
* @return {@link dh.Sort} array
|
|
1124
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1125
|
+
* @param name -
|
|
1126
|
+
* @param expression -
|
|
1127
|
+
* @return {@link dh.CustomColumn}
|
|
1375
1128
|
*/
|
|
1376
|
-
|
|
1129
|
+
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
export class LoginCredentials {
|
|
1133
|
+
type?:string|null;
|
|
1134
|
+
username?:string|null;
|
|
1135
|
+
token?:string|null;
|
|
1136
|
+
|
|
1137
|
+
constructor();
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
export class DateWrapper extends LongWrapper {
|
|
1141
|
+
protected constructor();
|
|
1142
|
+
|
|
1143
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
1144
|
+
asDate():Date;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Event fired when a command is issued from the client.
|
|
1149
|
+
*/
|
|
1150
|
+
export class CommandInfo {
|
|
1151
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
1152
|
+
|
|
1153
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
1154
|
+
get code():string;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* A js type for operating on input tables.
|
|
1159
|
+
*
|
|
1160
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
1161
|
+
*
|
|
1162
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
1163
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
1164
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
1165
|
+
* before sending the next operation.
|
|
1166
|
+
*
|
|
1167
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
1168
|
+
*
|
|
1169
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
1170
|
+
* object.
|
|
1171
|
+
*/
|
|
1172
|
+
export class InputTable {
|
|
1173
|
+
protected constructor();
|
|
1174
|
+
|
|
1377
1175
|
/**
|
|
1378
|
-
*
|
|
1379
|
-
*
|
|
1380
|
-
*
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1383
|
-
* @param filter -
|
|
1384
|
-
* @return {@link dh.FilterCondition} array
|
|
1176
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
1177
|
+
* property at that name and validate it can be put into the given column type.
|
|
1178
|
+
* @param row -
|
|
1179
|
+
* @param userTimeZone -
|
|
1180
|
+
* @return Promise of dh.InputTable
|
|
1385
1181
|
*/
|
|
1386
|
-
|
|
1182
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
1387
1183
|
/**
|
|
1388
|
-
*
|
|
1389
|
-
* @param
|
|
1390
|
-
* @
|
|
1184
|
+
* Add multiple rows to a table.
|
|
1185
|
+
* @param rows -
|
|
1186
|
+
* @param userTimeZone -
|
|
1187
|
+
* @return Promise of dh.InputTable
|
|
1391
1188
|
*/
|
|
1392
|
-
|
|
1189
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
1393
1190
|
/**
|
|
1394
|
-
*
|
|
1395
|
-
*
|
|
1396
|
-
*
|
|
1397
|
-
*
|
|
1398
|
-
*
|
|
1399
|
-
* @
|
|
1400
|
-
* @param lastRow -
|
|
1401
|
-
* @param columns -
|
|
1402
|
-
* @param updateIntervalMs -
|
|
1403
|
-
* @return {@link dh.TableViewportSubscription}
|
|
1191
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
1192
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
1193
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
1194
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
1195
|
+
* @param tableToAdd -
|
|
1196
|
+
* @return Promise of dh.InputTable
|
|
1404
1197
|
*/
|
|
1405
|
-
|
|
1198
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
1406
1199
|
/**
|
|
1407
|
-
*
|
|
1408
|
-
*
|
|
1409
|
-
*
|
|
1410
|
-
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
1411
|
-
* @return Promise of {@link dh.TableData}
|
|
1200
|
+
* Add multiple tables to this Input Table.
|
|
1201
|
+
* @param tablesToAdd -
|
|
1202
|
+
* @return Promise of dh.InputTable
|
|
1412
1203
|
*/
|
|
1413
|
-
|
|
1204
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
1414
1205
|
/**
|
|
1415
|
-
*
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
1419
|
-
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1420
|
-
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1421
|
-
* @param columns -
|
|
1422
|
-
* @param updateIntervalMs -
|
|
1423
|
-
* @return {@link dh.TableSubscription}
|
|
1206
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
1207
|
+
* @param tableToDelete -
|
|
1208
|
+
* @return Promise of dh.InputTable
|
|
1424
1209
|
*/
|
|
1425
|
-
|
|
1210
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
1426
1211
|
/**
|
|
1427
|
-
*
|
|
1428
|
-
*
|
|
1429
|
-
*
|
|
1430
|
-
* @param columns -
|
|
1431
|
-
* @return Promise of dh.Table
|
|
1212
|
+
* Delete multiple tables from this Input Table.
|
|
1213
|
+
* @param tablesToDelete -
|
|
1214
|
+
* @return
|
|
1432
1215
|
*/
|
|
1433
|
-
|
|
1216
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
1434
1217
|
/**
|
|
1435
|
-
*
|
|
1436
|
-
* @return
|
|
1218
|
+
* A list of the key columns, by name
|
|
1219
|
+
* @return String array.
|
|
1437
1220
|
*/
|
|
1438
|
-
|
|
1221
|
+
get keys():string[];
|
|
1439
1222
|
/**
|
|
1440
|
-
*
|
|
1441
|
-
*
|
|
1442
|
-
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
1443
|
-
* called on it when not in use.
|
|
1444
|
-
* @param config -
|
|
1445
|
-
* @return Promise of dh.TotalsTable
|
|
1223
|
+
* A list of the value columns, by name
|
|
1224
|
+
* @return String array.
|
|
1446
1225
|
*/
|
|
1447
|
-
|
|
1226
|
+
get values():string[];
|
|
1448
1227
|
/**
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1451
|
-
* @param config -
|
|
1452
|
-
* @return promise of dh.TotalsTable
|
|
1228
|
+
* A list of the key columns.
|
|
1229
|
+
* @return Column array.
|
|
1453
1230
|
*/
|
|
1454
|
-
|
|
1231
|
+
get keyColumns():Column[];
|
|
1455
1232
|
/**
|
|
1456
|
-
*
|
|
1457
|
-
*
|
|
1458
|
-
* @param configObject -
|
|
1459
|
-
* @return Promise of dh.TreeTable
|
|
1233
|
+
* A list of the value Column objects
|
|
1234
|
+
* @return {@link dh.Column} array.
|
|
1460
1235
|
*/
|
|
1461
|
-
|
|
1236
|
+
get valueColumns():Column[];
|
|
1462
1237
|
/**
|
|
1463
|
-
*
|
|
1464
|
-
*
|
|
1465
|
-
* @param configObject -
|
|
1466
|
-
* @return Promise dh.TreeTable
|
|
1238
|
+
* The source table for this Input Table
|
|
1239
|
+
* @return dh.table
|
|
1467
1240
|
*/
|
|
1468
|
-
|
|
1241
|
+
get table():Table;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1246
|
+
* mechanism, and so reimplemented here.
|
|
1247
|
+
* <p>
|
|
1248
|
+
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1249
|
+
* <p>
|
|
1250
|
+
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1251
|
+
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1252
|
+
* <p>
|
|
1253
|
+
* The table size will be -1 until a viewport has been fetched.
|
|
1254
|
+
* <p>
|
|
1255
|
+
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1256
|
+
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1257
|
+
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1258
|
+
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1259
|
+
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1260
|
+
* the viewport).
|
|
1261
|
+
* <p>
|
|
1262
|
+
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1263
|
+
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1264
|
+
* <p>
|
|
1265
|
+
* <ul>
|
|
1266
|
+
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1267
|
+
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1268
|
+
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1269
|
+
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1270
|
+
* new operation is pending.</li>
|
|
1271
|
+
* <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
|
|
1272
|
+
* custom columns applied, and the TreeTable can be recreated.</li>
|
|
1273
|
+
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1274
|
+
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1275
|
+
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1276
|
+
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1277
|
+
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1278
|
+
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1279
|
+
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1280
|
+
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1281
|
+
* where {@link TreeRow.hasChildren} is false will be different from usual.</li>
|
|
1282
|
+
* </ul>
|
|
1283
|
+
*/
|
|
1284
|
+
export class TreeTable implements HasEventHandling {
|
|
1469
1285
|
/**
|
|
1470
|
-
*
|
|
1471
|
-
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
1472
|
-
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1473
|
-
* @return Promise of dh.Table
|
|
1286
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1474
1287
|
*/
|
|
1475
|
-
|
|
1476
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1288
|
+
static readonly EVENT_UPDATED:string;
|
|
1477
1289
|
/**
|
|
1478
|
-
*
|
|
1479
|
-
* @inheritDoc
|
|
1480
|
-
* @deprecated
|
|
1290
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1481
1291
|
*/
|
|
1482
|
-
|
|
1483
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1484
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1485
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1486
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1487
|
-
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1292
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1488
1293
|
/**
|
|
1489
|
-
*
|
|
1490
|
-
* keys.
|
|
1491
|
-
* @param keys -
|
|
1492
|
-
* @param dropKeys -
|
|
1493
|
-
* @return Promise dh.PartitionedTable
|
|
1294
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1494
1295
|
*/
|
|
1495
|
-
|
|
1296
|
+
static readonly EVENT_RECONNECT:string;
|
|
1496
1297
|
/**
|
|
1497
|
-
*
|
|
1498
|
-
* @param column -
|
|
1499
|
-
* @return Promise of dh.ColumnStatistics
|
|
1298
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1500
1299
|
*/
|
|
1501
|
-
|
|
1300
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1502
1301
|
/**
|
|
1503
|
-
*
|
|
1504
|
-
* @param startingRow - Row to start the seek from
|
|
1505
|
-
* @param column - Column to seek for value on
|
|
1506
|
-
* @param valueType - Type of value provided
|
|
1507
|
-
* @param seekValue - Value to seek
|
|
1508
|
-
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1509
|
-
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1510
|
-
* `false`.
|
|
1511
|
-
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1512
|
-
* @return A promise that resolves to the row value found.
|
|
1302
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1513
1303
|
*/
|
|
1514
|
-
|
|
1515
|
-
|
|
1304
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1305
|
+
readonly description?:string|null;
|
|
1306
|
+
readonly layoutHints?:null|LayoutHints;
|
|
1307
|
+
|
|
1308
|
+
protected constructor();
|
|
1309
|
+
|
|
1516
1310
|
/**
|
|
1517
|
-
*
|
|
1518
|
-
* .
|
|
1519
|
-
*
|
|
1311
|
+
* Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
|
|
1312
|
+
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1313
|
+
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1314
|
+
* boolean parameter.
|
|
1315
|
+
* @param row -
|
|
1316
|
+
* @param expandDescendants -
|
|
1520
1317
|
*/
|
|
1521
|
-
|
|
1318
|
+
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
1522
1319
|
/**
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1525
|
-
*
|
|
1526
|
-
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
1527
|
-
* @return {@link dh.Column} array
|
|
1320
|
+
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1321
|
+
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1322
|
+
* @param row -
|
|
1528
1323
|
*/
|
|
1529
|
-
|
|
1324
|
+
collapse(row:TreeRow|number):void;
|
|
1530
1325
|
/**
|
|
1531
|
-
*
|
|
1532
|
-
*
|
|
1326
|
+
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1327
|
+
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1328
|
+
* is true, then its children will also be expanded.
|
|
1329
|
+
* @param row -
|
|
1330
|
+
* @param isExpanded -
|
|
1331
|
+
* @param expandDescendants -
|
|
1533
1332
|
*/
|
|
1534
|
-
|
|
1333
|
+
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1334
|
+
expandAll():void;
|
|
1335
|
+
collapseAll():void;
|
|
1535
1336
|
/**
|
|
1536
|
-
*
|
|
1537
|
-
*
|
|
1538
|
-
*
|
|
1337
|
+
* true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
|
|
1338
|
+
* is available
|
|
1339
|
+
* @param row -
|
|
1340
|
+
* @return boolean
|
|
1341
|
+
*/
|
|
1342
|
+
isExpanded(row:TreeRow|number):boolean;
|
|
1343
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1344
|
+
getViewportData():Promise<TreeViewportData>;
|
|
1345
|
+
/**
|
|
1346
|
+
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
1347
|
+
*/
|
|
1348
|
+
close():void;
|
|
1349
|
+
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
1350
|
+
/**
|
|
1351
|
+
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1352
|
+
* @param sort -
|
|
1539
1353
|
* @return {@link dh.Sort} array
|
|
1540
1354
|
*/
|
|
1541
|
-
|
|
1355
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1542
1356
|
/**
|
|
1543
|
-
*
|
|
1544
|
-
*
|
|
1545
|
-
*
|
|
1357
|
+
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
1358
|
+
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
1359
|
+
* condition. Returns the previous sort in use.
|
|
1360
|
+
* @param filter -
|
|
1361
|
+
* @return {@link dh.FilterCondition} array
|
|
1546
1362
|
*/
|
|
1547
|
-
|
|
1363
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1548
1364
|
/**
|
|
1549
|
-
*
|
|
1550
|
-
*
|
|
1551
|
-
* @return
|
|
1365
|
+
* a column with the given name, or throws an exception if it cannot be found
|
|
1366
|
+
* @param key -
|
|
1367
|
+
* @return {@link dh.Column}
|
|
1552
1368
|
*/
|
|
1553
|
-
|
|
1369
|
+
findColumn(key:string):Column;
|
|
1554
1370
|
/**
|
|
1555
|
-
*
|
|
1556
|
-
*
|
|
1557
|
-
*
|
|
1371
|
+
* an array with all of the named columns in order, or throws an exception if one cannot be found.
|
|
1372
|
+
* @param keys -
|
|
1373
|
+
* @return {@link dh.Column} array
|
|
1374
|
+
*/
|
|
1375
|
+
findColumns(keys:string[]):Column[];
|
|
1376
|
+
/**
|
|
1377
|
+
* Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
|
|
1378
|
+
* values for the given columns in the source table:
|
|
1379
|
+
* <ul>
|
|
1380
|
+
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
1381
|
+
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
1382
|
+
* the tree.</li>
|
|
1383
|
+
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1384
|
+
* in the resulting table.</li>
|
|
1385
|
+
* </ul>
|
|
1386
|
+
*/
|
|
1387
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1388
|
+
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1389
|
+
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1390
|
+
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1391
|
+
/**
|
|
1392
|
+
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1393
|
+
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
1394
|
+
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
1395
|
+
* state is also not copied.
|
|
1396
|
+
* @return Promise of dh.TreeTable
|
|
1397
|
+
*/
|
|
1398
|
+
copy():Promise<TreeTable>;
|
|
1399
|
+
/**
|
|
1400
|
+
* The current filter configuration of this Tree Table.
|
|
1558
1401
|
* @return {@link dh.FilterCondition} array
|
|
1559
1402
|
*/
|
|
1560
1403
|
get filter():Array<FilterCondition>;
|
|
1561
1404
|
/**
|
|
1562
|
-
*
|
|
1563
|
-
*
|
|
1564
|
-
* applySort(). Note that this getter will return the new value immediately, even though it may take a little time
|
|
1565
|
-
* to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
|
|
1566
|
-
* @return double
|
|
1405
|
+
* True if this is a roll-up and will provide the original rows that make up each grouping.
|
|
1406
|
+
* @return boolean
|
|
1567
1407
|
*/
|
|
1568
|
-
get
|
|
1408
|
+
get includeConstituents():boolean;
|
|
1409
|
+
get groupedColumns():Array<Column>;
|
|
1569
1410
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
*
|
|
1572
|
-
|
|
1411
|
+
* True if this table has been closed.
|
|
1412
|
+
* @return boolean
|
|
1413
|
+
*/
|
|
1414
|
+
get isClosed():boolean;
|
|
1415
|
+
/**
|
|
1416
|
+
* The current number of rows given the table's contents and the various expand/collapse states of each node. (No
|
|
1417
|
+
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
1418
|
+
* when considering collapse/expand states).
|
|
1573
1419
|
* @return double
|
|
1574
1420
|
*/
|
|
1575
1421
|
get size():number;
|
|
1576
1422
|
/**
|
|
1577
|
-
*
|
|
1578
|
-
* @return
|
|
1423
|
+
* The columns that can be shown in this Tree Table.
|
|
1424
|
+
* @return {@link dh.Column} array
|
|
1579
1425
|
*/
|
|
1580
|
-
get
|
|
1426
|
+
get columns():Array<Column>;
|
|
1581
1427
|
/**
|
|
1582
|
-
*
|
|
1583
|
-
*
|
|
1584
|
-
|
|
1428
|
+
* The current sort configuration of this Tree Table
|
|
1429
|
+
* @return {@link dh.Sort} array.
|
|
1430
|
+
*/
|
|
1431
|
+
get sort():Array<Sort>;
|
|
1432
|
+
/**
|
|
1433
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1434
|
+
* initial snapshot.
|
|
1585
1435
|
* @return boolean
|
|
1586
1436
|
*/
|
|
1587
|
-
get
|
|
1437
|
+
get isRefreshing():boolean;
|
|
1588
1438
|
/**
|
|
1589
1439
|
* Listen for events on this object.
|
|
1590
1440
|
* @param name - the name of the event to listen for
|
|
@@ -1603,262 +1453,188 @@ export namespace dh {
|
|
|
1603
1453
|
* @typeParam T -
|
|
1604
1454
|
*/
|
|
1605
1455
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1606
|
-
/**
|
|
1607
|
-
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
1608
|
-
* do not support reverse.
|
|
1609
|
-
* @return {@link dh.Sort}
|
|
1610
|
-
*/
|
|
1611
|
-
static reverse():Sort;
|
|
1612
1456
|
}
|
|
1613
1457
|
|
|
1458
|
+
/**
|
|
1459
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1460
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1461
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1462
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1463
|
+
* instance.
|
|
1464
|
+
*/
|
|
1465
|
+
export class FilterValue {
|
|
1466
|
+
protected constructor();
|
|
1614
1467
|
|
|
1615
|
-
export class CustomColumn {
|
|
1616
|
-
static readonly TYPE_FORMAT_COLOR:string;
|
|
1617
|
-
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1618
|
-
static readonly TYPE_FORMAT_DATE:string;
|
|
1619
|
-
static readonly TYPE_NEW:string;
|
|
1620
|
-
|
|
1621
|
-
protected constructor();
|
|
1622
|
-
|
|
1623
|
-
valueOf():string;
|
|
1624
|
-
toString():string;
|
|
1625
|
-
/**
|
|
1626
|
-
* The expression to evaluate this custom column.
|
|
1627
|
-
* @return String
|
|
1628
|
-
*/
|
|
1629
|
-
get expression():string;
|
|
1630
1468
|
/**
|
|
1631
|
-
*
|
|
1632
|
-
* @
|
|
1469
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
1470
|
+
* {@link TableData.get} for DateTime values. To create
|
|
1471
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1472
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1473
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1474
|
+
* @param input - the number to wrap as a FilterValue
|
|
1475
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
1633
1476
|
*/
|
|
1634
|
-
|
|
1477
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1635
1478
|
/**
|
|
1636
|
-
*
|
|
1637
|
-
*
|
|
1638
|
-
*
|
|
1639
|
-
* <li>FORMAT_COLOR</li>
|
|
1640
|
-
* <li>FORMAT_NUMBER</li>
|
|
1641
|
-
* <li>FORMAT_DATE</li>
|
|
1642
|
-
* <li>NEW</li>
|
|
1643
|
-
* </ul>
|
|
1644
|
-
* @return String
|
|
1479
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
1480
|
+
* @param term -
|
|
1481
|
+
* @return {@link dh.FilterCondition}
|
|
1645
1482
|
*/
|
|
1646
|
-
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
/**
|
|
1650
|
-
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1651
|
-
* interpret these responses to see what to render, or how to respond.
|
|
1652
|
-
* <p>
|
|
1653
|
-
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1654
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1655
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1656
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1657
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
1658
|
-
* <p>
|
|
1659
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1660
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1661
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1662
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1663
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1664
|
-
* <p>
|
|
1665
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1666
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1667
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1668
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1669
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1670
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1671
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1672
|
-
* <p>
|
|
1673
|
-
* This can suggest several patterns for how plugins operate:
|
|
1674
|
-
* <ul>
|
|
1675
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1676
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1677
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1678
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1679
|
-
* provided to the JS API consumer.</li>
|
|
1680
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1681
|
-
* which provided them. One concrete example of this could have been
|
|
1682
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1683
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1684
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1685
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1686
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1687
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1688
|
-
* an internal table instance.</li>
|
|
1689
|
-
* </ul>
|
|
1690
|
-
*
|
|
1691
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1692
|
-
* <ul>
|
|
1693
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1694
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1695
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1696
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1697
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
1698
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1699
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1700
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1701
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1702
|
-
* </ul>
|
|
1703
|
-
*/
|
|
1704
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1705
|
-
static readonly EVENT_MESSAGE:string;
|
|
1706
|
-
static readonly EVENT_CLOSE:string;
|
|
1707
|
-
|
|
1708
|
-
protected constructor();
|
|
1709
|
-
|
|
1483
|
+
eq(term:FilterValue):FilterCondition;
|
|
1710
1484
|
/**
|
|
1711
|
-
*
|
|
1485
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1486
|
+
* vs lower case
|
|
1487
|
+
* @param term -
|
|
1488
|
+
* @return {@link dh.FilterCondition}
|
|
1712
1489
|
*/
|
|
1713
|
-
|
|
1714
|
-
getDataAsBase64():string;
|
|
1715
|
-
getDataAsU8():Uint8Array;
|
|
1716
|
-
getDataAsString():string;
|
|
1490
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1717
1491
|
/**
|
|
1718
|
-
*
|
|
1719
|
-
* @param
|
|
1720
|
-
* @
|
|
1492
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
1493
|
+
* @param term -
|
|
1494
|
+
* @return {@link dh.FilterCondition}
|
|
1721
1495
|
*/
|
|
1722
|
-
|
|
1723
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1724
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1725
|
-
hasListeners(name:string):boolean;
|
|
1726
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1496
|
+
notEq(term:FilterValue):FilterCondition;
|
|
1727
1497
|
/**
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1730
|
-
*
|
|
1498
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1499
|
+
* upper vs lower case
|
|
1500
|
+
* @param term -
|
|
1501
|
+
* @return {@link dh.FilterCondition}
|
|
1731
1502
|
*/
|
|
1732
|
-
|
|
1503
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1733
1504
|
/**
|
|
1734
|
-
*
|
|
1735
|
-
* @
|
|
1505
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
1506
|
+
* @param term -
|
|
1507
|
+
* @return {@link dh.FilterCondition}
|
|
1736
1508
|
*/
|
|
1737
|
-
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
/**
|
|
1741
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1742
|
-
*/
|
|
1743
|
-
export class BigDecimalWrapper {
|
|
1744
|
-
protected constructor();
|
|
1745
|
-
|
|
1746
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
1747
|
-
asNumber():number;
|
|
1748
|
-
valueOf():string;
|
|
1749
|
-
toString():string;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
/**
|
|
1753
|
-
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
1754
|
-
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
1755
|
-
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
1756
|
-
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
1757
|
-
* of <b>TotalsTableConfig</b> will be supplied.
|
|
1758
|
-
*
|
|
1759
|
-
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
1760
|
-
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
1761
|
-
* expected formats.
|
|
1762
|
-
*/
|
|
1763
|
-
export class TotalsTableConfig {
|
|
1509
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
1764
1510
|
/**
|
|
1765
|
-
*
|
|
1511
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
1512
|
+
* @param term -
|
|
1513
|
+
* @return {@link dh.FilterCondition}
|
|
1766
1514
|
*/
|
|
1767
|
-
|
|
1515
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
1768
1516
|
/**
|
|
1769
|
-
*
|
|
1517
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1518
|
+
* @param term -
|
|
1519
|
+
* @return {@link dh.FilterCondition}
|
|
1770
1520
|
*/
|
|
1771
|
-
|
|
1521
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1772
1522
|
/**
|
|
1773
|
-
*
|
|
1523
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1524
|
+
* @param term -
|
|
1525
|
+
* @return {@link dh.FilterCondition}
|
|
1774
1526
|
*/
|
|
1775
|
-
|
|
1527
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1776
1528
|
/**
|
|
1777
|
-
*
|
|
1529
|
+
* a filter condition checking if the current value is in the given set of values
|
|
1530
|
+
* @param terms -
|
|
1531
|
+
* @return {@link dh.FilterCondition}
|
|
1778
1532
|
*/
|
|
1779
|
-
|
|
1533
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
1780
1534
|
/**
|
|
1781
|
-
*
|
|
1535
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1536
|
+
* lower case
|
|
1537
|
+
* @param terms -
|
|
1538
|
+
* @return {@link dh.FilterCondition}
|
|
1782
1539
|
*/
|
|
1783
|
-
|
|
1540
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1784
1541
|
/**
|
|
1785
|
-
*
|
|
1542
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
1543
|
+
* @param terms -
|
|
1544
|
+
* @return {@link dh.FilterCondition}
|
|
1786
1545
|
*/
|
|
1787
|
-
|
|
1546
|
+
notIn(terms:FilterValue[]):FilterCondition;
|
|
1788
1547
|
/**
|
|
1789
|
-
*
|
|
1548
|
+
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1549
|
+
* upper vs lower case
|
|
1550
|
+
* @param terms -
|
|
1551
|
+
* @return {@link dh.FilterCondition}
|
|
1790
1552
|
*/
|
|
1791
|
-
|
|
1553
|
+
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1792
1554
|
/**
|
|
1793
|
-
*
|
|
1555
|
+
* a filter condition checking if the given value contains the given string value
|
|
1556
|
+
* @param term -
|
|
1557
|
+
* @return {@link dh.FilterCondition}
|
|
1794
1558
|
*/
|
|
1795
|
-
|
|
1559
|
+
contains(term:FilterValue):FilterCondition;
|
|
1796
1560
|
/**
|
|
1797
|
-
*
|
|
1561
|
+
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1562
|
+
* lower case
|
|
1563
|
+
* @param term -
|
|
1564
|
+
* @return {@link dh.FilterCondition}
|
|
1798
1565
|
*/
|
|
1799
|
-
|
|
1566
|
+
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
1800
1567
|
/**
|
|
1801
|
-
*
|
|
1568
|
+
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1569
|
+
* use Java regex syntax
|
|
1570
|
+
* @param pattern -
|
|
1571
|
+
* @return {@link dh.FilterCondition}
|
|
1802
1572
|
*/
|
|
1803
|
-
|
|
1573
|
+
matches(pattern:FilterValue):FilterCondition;
|
|
1804
1574
|
/**
|
|
1805
|
-
*
|
|
1575
|
+
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
1576
|
+
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
1577
|
+
* @param pattern -
|
|
1578
|
+
* @return {@link dh.FilterCondition}
|
|
1806
1579
|
*/
|
|
1807
|
-
|
|
1580
|
+
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
1808
1581
|
/**
|
|
1809
|
-
*
|
|
1582
|
+
* a filter condition checking if the current value is a true boolean
|
|
1583
|
+
* @return {@link dh.FilterCondition}
|
|
1810
1584
|
*/
|
|
1811
|
-
|
|
1585
|
+
isTrue():FilterCondition;
|
|
1812
1586
|
/**
|
|
1813
|
-
*
|
|
1587
|
+
* a filter condition checking if the current value is a false boolean
|
|
1588
|
+
* @return {@link dh.FilterCondition}
|
|
1814
1589
|
*/
|
|
1815
|
-
|
|
1590
|
+
isFalse():FilterCondition;
|
|
1816
1591
|
/**
|
|
1817
|
-
*
|
|
1592
|
+
* a filter condition checking if the current value is a null value
|
|
1593
|
+
* @return {@link dh.FilterCondition}
|
|
1818
1594
|
*/
|
|
1819
|
-
|
|
1595
|
+
isNull():FilterCondition;
|
|
1820
1596
|
/**
|
|
1821
|
-
*
|
|
1822
|
-
*
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
*
|
|
1827
|
-
*
|
|
1597
|
+
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
1598
|
+
* functions that can be invoked on a String:
|
|
1599
|
+
* <ul>
|
|
1600
|
+
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1601
|
+
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1602
|
+
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1603
|
+
* regular expression</li>
|
|
1604
|
+
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1605
|
+
* <p>
|
|
1606
|
+
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1607
|
+
* </p>
|
|
1608
|
+
* </li>
|
|
1609
|
+
* </ul>
|
|
1610
|
+
* @param method -
|
|
1611
|
+
* @param args -
|
|
1612
|
+
* @return
|
|
1828
1613
|
*/
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
constructor();
|
|
1832
|
-
|
|
1614
|
+
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
1833
1615
|
toString():string;
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
/**
|
|
1837
|
-
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
1838
|
-
* roll-up table.
|
|
1839
|
-
*/
|
|
1840
|
-
export class RollupConfig {
|
|
1841
1616
|
/**
|
|
1842
|
-
*
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
1847
|
-
* roll-up table.
|
|
1848
|
-
*/
|
|
1849
|
-
aggregations:{ [key: string]: Array<AggregationOperationType>; };
|
|
1850
|
-
/**
|
|
1851
|
-
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
1852
|
-
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
1853
|
-
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
1854
|
-
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1617
|
+
* Constructs a string for the filter API from the given parameter.
|
|
1618
|
+
* @param input -
|
|
1619
|
+
* @return
|
|
1855
1620
|
*/
|
|
1856
|
-
|
|
1857
|
-
includeOriginalColumns?:boolean|null;
|
|
1621
|
+
static ofString(input:any):FilterValue;
|
|
1858
1622
|
/**
|
|
1859
|
-
*
|
|
1623
|
+
* Constructs a boolean for the filter API from the given parameter.
|
|
1624
|
+
* @param b -
|
|
1625
|
+
* @return
|
|
1860
1626
|
*/
|
|
1861
|
-
|
|
1627
|
+
static ofBoolean(b:boolean):FilterValue;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* Deprecated for use in Deephaven Core.
|
|
1632
|
+
* @deprecated
|
|
1633
|
+
*/
|
|
1634
|
+
export class Client {
|
|
1635
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
1636
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
1637
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1862
1638
|
|
|
1863
1639
|
constructor();
|
|
1864
1640
|
}
|
|
@@ -1873,31 +1649,58 @@ export namespace dh {
|
|
|
1873
1649
|
constructor();
|
|
1874
1650
|
}
|
|
1875
1651
|
|
|
1876
|
-
export class LongWrapper {
|
|
1877
|
-
protected constructor();
|
|
1878
|
-
|
|
1879
|
-
static ofString(str:string):LongWrapper;
|
|
1880
|
-
asNumber():number;
|
|
1881
|
-
valueOf():string;
|
|
1882
|
-
toString():string;
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
1652
|
/**
|
|
1886
|
-
*
|
|
1653
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
1654
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
1655
|
+
* methods return a new Sort instance.
|
|
1887
1656
|
*/
|
|
1888
|
-
export class
|
|
1889
|
-
|
|
1657
|
+
export class Sort {
|
|
1658
|
+
static readonly ASCENDING:string;
|
|
1659
|
+
static readonly DESCENDING:string;
|
|
1660
|
+
static readonly REVERSE:string;
|
|
1890
1661
|
|
|
1891
|
-
|
|
1892
|
-
|
|
1662
|
+
protected constructor();
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
1666
|
+
* @return {@link dh.Sort}
|
|
1667
|
+
*/
|
|
1668
|
+
asc():Sort;
|
|
1669
|
+
/**
|
|
1670
|
+
* Builds a Sort instance to sort values in descending order.
|
|
1671
|
+
* @return {@link dh.Sort}
|
|
1672
|
+
*/
|
|
1673
|
+
desc():Sort;
|
|
1674
|
+
/**
|
|
1675
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
1676
|
+
* @return {@link dh.Sort}
|
|
1677
|
+
*/
|
|
1678
|
+
abs():Sort;
|
|
1679
|
+
toString():string;
|
|
1680
|
+
/**
|
|
1681
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
1682
|
+
* @return boolean
|
|
1683
|
+
*/
|
|
1684
|
+
get isAbs():boolean;
|
|
1685
|
+
/**
|
|
1686
|
+
* The column which is sorted.
|
|
1687
|
+
* @return {@link dh.Column}
|
|
1688
|
+
*/
|
|
1689
|
+
get column():Column;
|
|
1690
|
+
/**
|
|
1691
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
1692
|
+
* @return String
|
|
1693
|
+
*/
|
|
1694
|
+
get direction():string;
|
|
1893
1695
|
}
|
|
1894
1696
|
|
|
1895
|
-
export class
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1697
|
+
export class QueryInfo {
|
|
1698
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
1699
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1700
|
+
static readonly EVENT_RECONNECT:string;
|
|
1701
|
+
static readonly EVENT_CONNECT:string;
|
|
1899
1702
|
|
|
1900
|
-
constructor();
|
|
1703
|
+
protected constructor();
|
|
1901
1704
|
}
|
|
1902
1705
|
|
|
1903
1706
|
/**
|
|
@@ -1924,427 +1727,626 @@ export namespace dh {
|
|
|
1924
1727
|
constructor();
|
|
1925
1728
|
}
|
|
1926
1729
|
|
|
1927
|
-
|
|
1928
|
-
|
|
1730
|
+
/**
|
|
1731
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
1732
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
1733
|
+
*
|
|
1734
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1735
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1736
|
+
* forward data to it.
|
|
1737
|
+
*
|
|
1738
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1739
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1740
|
+
* viewports to make it less expensive to compute for large tables.
|
|
1741
|
+
*/
|
|
1742
|
+
export class TableSubscription implements HasEventHandling {
|
|
1743
|
+
/**
|
|
1744
|
+
* Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
|
|
1745
|
+
* <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
|
|
1746
|
+
* allowing access to the entire range of items currently in the subscribed columns.
|
|
1747
|
+
*/
|
|
1748
|
+
static readonly EVENT_UPDATED:string;
|
|
1749
|
+
|
|
1750
|
+
protected constructor();
|
|
1929
1751
|
|
|
1930
1752
|
/**
|
|
1931
|
-
*
|
|
1753
|
+
* Stops the subscription on the server.
|
|
1932
1754
|
*/
|
|
1933
|
-
|
|
1755
|
+
close():void;
|
|
1756
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
1757
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
1758
|
+
hasListeners(name:string):boolean;
|
|
1759
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
1934
1760
|
/**
|
|
1935
|
-
*
|
|
1761
|
+
* The columns that were subscribed to when this subscription was created
|
|
1762
|
+
* @return {@link dh.Column}
|
|
1936
1763
|
*/
|
|
1937
|
-
|
|
1764
|
+
get columns():Array<Column>;
|
|
1938
1765
|
}
|
|
1939
1766
|
|
|
1940
1767
|
/**
|
|
1941
|
-
*
|
|
1942
|
-
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
1943
|
-
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
1768
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1944
1769
|
*/
|
|
1945
|
-
export class
|
|
1770
|
+
export class BigIntegerWrapper {
|
|
1946
1771
|
protected constructor();
|
|
1947
1772
|
|
|
1948
|
-
static
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1773
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
1774
|
+
asNumber():number;
|
|
1775
|
+
valueOf():string;
|
|
1776
|
+
toString():string;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
export class CustomColumn {
|
|
1780
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
1781
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
1782
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
1783
|
+
static readonly TYPE_NEW:string;
|
|
1784
|
+
|
|
1785
|
+
protected constructor();
|
|
1786
|
+
|
|
1787
|
+
valueOf():string;
|
|
1788
|
+
toString():string;
|
|
1952
1789
|
/**
|
|
1953
|
-
*
|
|
1954
|
-
* @return
|
|
1790
|
+
* The expression to evaluate this custom column.
|
|
1791
|
+
* @return String
|
|
1955
1792
|
*/
|
|
1956
|
-
|
|
1793
|
+
get expression():string;
|
|
1957
1794
|
/**
|
|
1958
|
-
* The
|
|
1959
|
-
*
|
|
1960
|
-
* property each time through a loop).
|
|
1961
|
-
* @return double
|
|
1795
|
+
* The name of the column to use.
|
|
1796
|
+
* @return String
|
|
1962
1797
|
*/
|
|
1963
|
-
get
|
|
1798
|
+
get name():string;
|
|
1799
|
+
/**
|
|
1800
|
+
* Type of custom column. One of
|
|
1801
|
+
*
|
|
1802
|
+
* <ul>
|
|
1803
|
+
* <li>FORMAT_COLOR</li>
|
|
1804
|
+
* <li>FORMAT_NUMBER</li>
|
|
1805
|
+
* <li>FORMAT_DATE</li>
|
|
1806
|
+
* <li>NEW</li>
|
|
1807
|
+
* </ul>
|
|
1808
|
+
* @return String
|
|
1809
|
+
*/
|
|
1810
|
+
get type():string;
|
|
1964
1811
|
}
|
|
1965
1812
|
|
|
1966
1813
|
/**
|
|
1967
|
-
*
|
|
1968
|
-
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1969
|
-
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1970
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1971
|
-
* instance.
|
|
1814
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1972
1815
|
*/
|
|
1973
|
-
export class
|
|
1816
|
+
export class BigDecimalWrapper {
|
|
1974
1817
|
protected constructor();
|
|
1975
1818
|
|
|
1819
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
1820
|
+
asNumber():number;
|
|
1821
|
+
valueOf():string;
|
|
1822
|
+
toString():string;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
/**
|
|
1826
|
+
* Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
|
|
1827
|
+
* indicating how that table was configured when it was declared, and each Totals Table has a similar property
|
|
1828
|
+
* describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
|
|
1829
|
+
* this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
|
|
1830
|
+
* of <b>TotalsTableConfig</b> will be supplied.
|
|
1831
|
+
*
|
|
1832
|
+
* This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
|
|
1833
|
+
* JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
|
|
1834
|
+
* expected formats.
|
|
1835
|
+
*/
|
|
1836
|
+
export class TotalsTableConfig {
|
|
1976
1837
|
/**
|
|
1977
|
-
*
|
|
1978
|
-
* {@link TableData.get} for DateTime values. To create
|
|
1979
|
-
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1980
|
-
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1981
|
-
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1982
|
-
* @param input - the number to wrap as a FilterValue
|
|
1983
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
1838
|
+
* @deprecated
|
|
1984
1839
|
*/
|
|
1985
|
-
static
|
|
1840
|
+
static readonly COUNT:string;
|
|
1986
1841
|
/**
|
|
1987
|
-
*
|
|
1988
|
-
* @param term -
|
|
1989
|
-
* @return {@link dh.FilterCondition}
|
|
1842
|
+
* @deprecated
|
|
1990
1843
|
*/
|
|
1991
|
-
|
|
1844
|
+
static readonly MIN:string;
|
|
1992
1845
|
/**
|
|
1993
|
-
*
|
|
1994
|
-
* vs lower case
|
|
1995
|
-
* @param term -
|
|
1996
|
-
* @return {@link dh.FilterCondition}
|
|
1846
|
+
* @deprecated
|
|
1997
1847
|
*/
|
|
1998
|
-
|
|
1848
|
+
static readonly MAX:string;
|
|
1999
1849
|
/**
|
|
2000
|
-
*
|
|
2001
|
-
* @param term -
|
|
2002
|
-
* @return {@link dh.FilterCondition}
|
|
1850
|
+
* @deprecated
|
|
2003
1851
|
*/
|
|
2004
|
-
|
|
1852
|
+
static readonly SUM:string;
|
|
2005
1853
|
/**
|
|
2006
|
-
*
|
|
2007
|
-
* upper vs lower case
|
|
2008
|
-
* @param term -
|
|
2009
|
-
* @return {@link dh.FilterCondition}
|
|
1854
|
+
* @deprecated
|
|
2010
1855
|
*/
|
|
2011
|
-
|
|
1856
|
+
static readonly ABS_SUM:string;
|
|
2012
1857
|
/**
|
|
2013
|
-
*
|
|
2014
|
-
* @param term -
|
|
2015
|
-
* @return {@link dh.FilterCondition}
|
|
1858
|
+
* @deprecated
|
|
2016
1859
|
*/
|
|
2017
|
-
|
|
1860
|
+
static readonly VAR:string;
|
|
2018
1861
|
/**
|
|
2019
|
-
*
|
|
2020
|
-
* @param term -
|
|
2021
|
-
* @return {@link dh.FilterCondition}
|
|
1862
|
+
* @deprecated
|
|
2022
1863
|
*/
|
|
2023
|
-
|
|
1864
|
+
static readonly AVG:string;
|
|
2024
1865
|
/**
|
|
2025
|
-
*
|
|
2026
|
-
* @param term -
|
|
2027
|
-
* @return {@link dh.FilterCondition}
|
|
1866
|
+
* @deprecated
|
|
2028
1867
|
*/
|
|
2029
|
-
|
|
1868
|
+
static readonly STD:string;
|
|
2030
1869
|
/**
|
|
2031
|
-
*
|
|
2032
|
-
* @param term -
|
|
2033
|
-
* @return {@link dh.FilterCondition}
|
|
1870
|
+
* @deprecated
|
|
2034
1871
|
*/
|
|
2035
|
-
|
|
1872
|
+
static readonly FIRST:string;
|
|
2036
1873
|
/**
|
|
2037
|
-
*
|
|
2038
|
-
* @param terms -
|
|
2039
|
-
* @return {@link dh.FilterCondition}
|
|
1874
|
+
* @deprecated
|
|
2040
1875
|
*/
|
|
2041
|
-
|
|
1876
|
+
static readonly LAST:string;
|
|
2042
1877
|
/**
|
|
2043
|
-
*
|
|
2044
|
-
* lower case
|
|
2045
|
-
* @param terms -
|
|
2046
|
-
* @return {@link dh.FilterCondition}
|
|
1878
|
+
* @deprecated
|
|
2047
1879
|
*/
|
|
2048
|
-
|
|
1880
|
+
static readonly SKIP:string;
|
|
2049
1881
|
/**
|
|
2050
|
-
*
|
|
2051
|
-
* @param terms -
|
|
2052
|
-
* @return {@link dh.FilterCondition}
|
|
1882
|
+
* Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2053
1883
|
*/
|
|
2054
|
-
|
|
1884
|
+
showTotalsByDefault:boolean;
|
|
2055
1885
|
/**
|
|
2056
|
-
* a
|
|
2057
|
-
* upper vs lower case
|
|
2058
|
-
* @param terms -
|
|
2059
|
-
* @return {@link dh.FilterCondition}
|
|
1886
|
+
* Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
|
|
2060
1887
|
*/
|
|
2061
|
-
|
|
1888
|
+
showGrandTotalsByDefault:boolean;
|
|
2062
1889
|
/**
|
|
2063
|
-
*
|
|
2064
|
-
* @param term -
|
|
2065
|
-
* @return {@link dh.FilterCondition}
|
|
1890
|
+
* Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
|
|
2066
1891
|
*/
|
|
2067
|
-
|
|
1892
|
+
defaultOperation:AggregationOperationType;
|
|
2068
1893
|
/**
|
|
2069
|
-
*
|
|
2070
|
-
*
|
|
2071
|
-
* @param term -
|
|
2072
|
-
* @return {@link dh.FilterCondition}
|
|
1894
|
+
* Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
|
|
1895
|
+
* Table. If a column is omitted, the defaultOperation is used.
|
|
2073
1896
|
*/
|
|
2074
|
-
|
|
1897
|
+
operationMap:{ [key: string]: Array<AggregationOperationType>; };
|
|
2075
1898
|
/**
|
|
2076
|
-
*
|
|
2077
|
-
*
|
|
2078
|
-
* @param pattern -
|
|
2079
|
-
* @return {@link dh.FilterCondition}
|
|
1899
|
+
* Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
|
|
1900
|
+
* these columns. See also `Table.selectDistinct`.
|
|
2080
1901
|
*/
|
|
2081
|
-
|
|
1902
|
+
groupBy:Array<string>;
|
|
1903
|
+
|
|
1904
|
+
constructor();
|
|
1905
|
+
|
|
1906
|
+
toString():string;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1911
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1912
|
+
* instance.
|
|
1913
|
+
*/
|
|
1914
|
+
export class FilterCondition {
|
|
1915
|
+
protected constructor();
|
|
1916
|
+
|
|
2082
1917
|
/**
|
|
2083
|
-
*
|
|
2084
|
-
*
|
|
2085
|
-
* @param pattern -
|
|
2086
|
-
* @return {@link dh.FilterCondition}
|
|
1918
|
+
* the opposite of this condition
|
|
1919
|
+
* @return FilterCondition
|
|
2087
1920
|
*/
|
|
2088
|
-
|
|
1921
|
+
not():FilterCondition;
|
|
2089
1922
|
/**
|
|
2090
|
-
* a
|
|
2091
|
-
* @
|
|
1923
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
1924
|
+
* @param filters -
|
|
1925
|
+
* @return FilterCondition
|
|
2092
1926
|
*/
|
|
2093
|
-
|
|
1927
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
2094
1928
|
/**
|
|
2095
|
-
* a
|
|
2096
|
-
* @
|
|
1929
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
1930
|
+
* @param filters -
|
|
1931
|
+
* @return FilterCondition.
|
|
2097
1932
|
*/
|
|
2098
|
-
|
|
1933
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
2099
1934
|
/**
|
|
2100
|
-
* a
|
|
2101
|
-
* @return
|
|
1935
|
+
* a string suitable for debugging showing the details of this condition.
|
|
1936
|
+
* @return String.
|
|
2102
1937
|
*/
|
|
2103
|
-
|
|
1938
|
+
toString():string;
|
|
1939
|
+
get columns():Array<Column>;
|
|
2104
1940
|
/**
|
|
2105
|
-
* a filter condition invoking
|
|
2106
|
-
* functions
|
|
1941
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
1942
|
+
* functions:
|
|
2107
1943
|
* <ul>
|
|
2108
|
-
* <li><b>
|
|
2109
|
-
*
|
|
2110
|
-
* <li><b>
|
|
2111
|
-
*
|
|
2112
|
-
* <li><b>
|
|
1944
|
+
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1945
|
+
* than the third</li>
|
|
1946
|
+
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1947
|
+
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1948
|
+
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1949
|
+
* "not a number"</i></li>
|
|
1950
|
+
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1951
|
+
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1952
|
+
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1953
|
+
* expression</li>
|
|
1954
|
+
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1955
|
+
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
2113
1956
|
* <p>
|
|
2114
|
-
*
|
|
1957
|
+
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1958
|
+
* method should be used in other cases
|
|
2115
1959
|
* </p>
|
|
2116
1960
|
* </li>
|
|
2117
1961
|
* </ul>
|
|
2118
|
-
* @param
|
|
1962
|
+
* @param function -
|
|
2119
1963
|
* @param args -
|
|
2120
|
-
* @return
|
|
2121
|
-
*/
|
|
2122
|
-
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
2123
|
-
toString():string;
|
|
2124
|
-
/**
|
|
2125
|
-
* Constructs a string for the filter API from the given parameter.
|
|
2126
|
-
* @param input -
|
|
2127
|
-
* @return
|
|
1964
|
+
* @return dh.FilterCondition
|
|
2128
1965
|
*/
|
|
2129
|
-
static
|
|
1966
|
+
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
2130
1967
|
/**
|
|
2131
|
-
*
|
|
2132
|
-
*
|
|
2133
|
-
*
|
|
1968
|
+
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
1969
|
+
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
1970
|
+
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1971
|
+
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1972
|
+
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1973
|
+
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1974
|
+
* {@link dh.Column.filter}).
|
|
1975
|
+
* @param value -
|
|
1976
|
+
* @param columns -
|
|
1977
|
+
* @return dh.FilterCondition
|
|
2134
1978
|
*/
|
|
2135
|
-
static
|
|
1979
|
+
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
2136
1980
|
}
|
|
2137
1981
|
|
|
2138
1982
|
/**
|
|
2139
|
-
*
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2142
|
-
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
2143
|
-
* <p>
|
|
2144
|
-
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
2145
|
-
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
2146
|
-
* <p>
|
|
2147
|
-
* The table size will be -1 until a viewport has been fetched.
|
|
2148
|
-
* <p>
|
|
2149
|
-
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
2150
|
-
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
2151
|
-
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
2152
|
-
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
2153
|
-
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
2154
|
-
* the viewport).
|
|
2155
|
-
* <p>
|
|
2156
|
-
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
2157
|
-
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
2158
|
-
* <p>
|
|
2159
|
-
* <ul>
|
|
2160
|
-
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
2161
|
-
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
2162
|
-
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
2163
|
-
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
2164
|
-
* new operation is pending.</li>
|
|
2165
|
-
* <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
|
|
2166
|
-
* custom columns applied, and the TreeTable can be recreated.</li>
|
|
2167
|
-
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
2168
|
-
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
2169
|
-
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
2170
|
-
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
2171
|
-
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
2172
|
-
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
2173
|
-
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
2174
|
-
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
2175
|
-
* where {@link TreeRow.hasChildren} is false will be different from usual.</li>
|
|
2176
|
-
* </ul>
|
|
1983
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1984
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1985
|
+
* inform the UI right away that they have taken place.
|
|
2177
1986
|
*/
|
|
2178
|
-
export class
|
|
1987
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
1988
|
+
readonly description?:string|null;
|
|
1989
|
+
readonly pluginName?:string|null;
|
|
1990
|
+
readonly layoutHints?:null|LayoutHints;
|
|
1991
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
1992
|
+
static readonly EVENT_UPDATED:string;
|
|
1993
|
+
static readonly EVENT_ROWADDED:string;
|
|
1994
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
1995
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
1996
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
1997
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
1998
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
1999
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2000
|
+
static readonly EVENT_RECONNECT:string;
|
|
2001
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
2002
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2003
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2004
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
2005
|
+
|
|
2006
|
+
protected constructor();
|
|
2007
|
+
|
|
2008
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
2009
|
+
/**
|
|
2010
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
2011
|
+
* caching a returned value.
|
|
2012
|
+
* @param key -
|
|
2013
|
+
* @return {@link dh.Column}
|
|
2014
|
+
*/
|
|
2015
|
+
findColumn(key:string):Column;
|
|
2016
|
+
/**
|
|
2017
|
+
* Retrieve multiple columns specified by the given names.
|
|
2018
|
+
* @param keys -
|
|
2019
|
+
* @return {@link dh.Column} array
|
|
2020
|
+
*/
|
|
2021
|
+
findColumns(keys:string[]):Column[];
|
|
2022
|
+
isBlinkTable():boolean;
|
|
2023
|
+
/**
|
|
2024
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
2025
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
2026
|
+
* @return Promise of dh.InputTable
|
|
2027
|
+
*/
|
|
2028
|
+
inputTable():Promise<InputTable>;
|
|
2029
|
+
/**
|
|
2030
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
2031
|
+
*/
|
|
2032
|
+
close():void;
|
|
2033
|
+
getAttributes():string[];
|
|
2034
|
+
/**
|
|
2035
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
2036
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
2037
|
+
* @param attributeName -
|
|
2038
|
+
* @return Object
|
|
2039
|
+
*/
|
|
2040
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
2041
|
+
/**
|
|
2042
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
2043
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
2044
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
2045
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
2046
|
+
* not.
|
|
2047
|
+
* @param sort -
|
|
2048
|
+
* @return {@link dh.Sort} array
|
|
2049
|
+
*/
|
|
2050
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
2051
|
+
/**
|
|
2052
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
2053
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
2054
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
2055
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
2056
|
+
* will not.
|
|
2057
|
+
* @param filter -
|
|
2058
|
+
* @return {@link dh.FilterCondition} array
|
|
2059
|
+
*/
|
|
2060
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
2061
|
+
/**
|
|
2062
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
2063
|
+
* @param customColumns -
|
|
2064
|
+
* @return {@link dh.CustomColumn} array
|
|
2065
|
+
*/
|
|
2066
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
2067
|
+
/**
|
|
2068
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
2069
|
+
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
2070
|
+
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
2071
|
+
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
2072
|
+
* needed.
|
|
2073
|
+
* @param firstRow -
|
|
2074
|
+
* @param lastRow -
|
|
2075
|
+
* @param columns -
|
|
2076
|
+
* @param updateIntervalMs -
|
|
2077
|
+
* @return {@link dh.TableViewportSubscription}
|
|
2078
|
+
*/
|
|
2079
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
|
|
2080
|
+
/**
|
|
2081
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
2082
|
+
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
2083
|
+
* separate the lifespan of this promise from the table itself, call
|
|
2084
|
+
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
2085
|
+
* @return Promise of {@link dh.TableData}
|
|
2086
|
+
*/
|
|
2087
|
+
getViewportData():Promise<TableData>;
|
|
2179
2088
|
/**
|
|
2180
|
-
*
|
|
2089
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
2090
|
+
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
2091
|
+
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
2092
|
+
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
2093
|
+
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
2094
|
+
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
2095
|
+
* @param columns -
|
|
2096
|
+
* @param updateIntervalMs -
|
|
2097
|
+
* @return {@link dh.TableSubscription}
|
|
2181
2098
|
*/
|
|
2182
|
-
|
|
2099
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
2183
2100
|
/**
|
|
2184
|
-
*
|
|
2101
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
2102
|
+
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
2103
|
+
* order of appearance of values from the original table.
|
|
2104
|
+
* @param columns -
|
|
2105
|
+
* @return Promise of dh.Table
|
|
2185
2106
|
*/
|
|
2186
|
-
|
|
2107
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
2187
2108
|
/**
|
|
2188
|
-
*
|
|
2109
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
2110
|
+
* @return Promise of dh.Table
|
|
2189
2111
|
*/
|
|
2190
|
-
|
|
2112
|
+
copy():Promise<Table>;
|
|
2191
2113
|
/**
|
|
2192
|
-
*
|
|
2114
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
2115
|
+
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
2116
|
+
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
2117
|
+
* called on it when not in use.
|
|
2118
|
+
* @param config -
|
|
2119
|
+
* @return Promise of dh.TotalsTable
|
|
2193
2120
|
*/
|
|
2194
|
-
|
|
2121
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
2195
2122
|
/**
|
|
2196
|
-
*
|
|
2123
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
2124
|
+
* above for more specifics.
|
|
2125
|
+
* @param config -
|
|
2126
|
+
* @return promise of dh.TotalsTable
|
|
2197
2127
|
*/
|
|
2198
|
-
|
|
2199
|
-
readonly description?:string|null;
|
|
2200
|
-
|
|
2201
|
-
protected constructor();
|
|
2202
|
-
|
|
2128
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
2203
2129
|
/**
|
|
2204
|
-
*
|
|
2205
|
-
*
|
|
2206
|
-
*
|
|
2207
|
-
*
|
|
2208
|
-
* @param row -
|
|
2209
|
-
* @param expandDescendants -
|
|
2130
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
2131
|
+
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
2132
|
+
* @param configObject -
|
|
2133
|
+
* @return Promise of dh.TreeTable
|
|
2210
2134
|
*/
|
|
2211
|
-
|
|
2135
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
2212
2136
|
/**
|
|
2213
|
-
*
|
|
2214
|
-
*
|
|
2215
|
-
* @param
|
|
2137
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
2138
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
2139
|
+
* @param configObject -
|
|
2140
|
+
* @return Promise dh.TreeTable
|
|
2216
2141
|
*/
|
|
2217
|
-
|
|
2142
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
2218
2143
|
/**
|
|
2219
|
-
*
|
|
2220
|
-
*
|
|
2221
|
-
*
|
|
2222
|
-
* @
|
|
2223
|
-
* @param isExpanded -
|
|
2224
|
-
* @param expandDescendants -
|
|
2144
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
2145
|
+
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
2146
|
+
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
2147
|
+
* @return Promise of dh.Table
|
|
2225
2148
|
*/
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
collapseAll():void;
|
|
2149
|
+
freeze():Promise<Table>;
|
|
2150
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
2229
2151
|
/**
|
|
2230
|
-
*
|
|
2231
|
-
*
|
|
2232
|
-
* @
|
|
2233
|
-
* @return boolean
|
|
2152
|
+
*
|
|
2153
|
+
* @inheritDoc
|
|
2154
|
+
* @deprecated
|
|
2234
2155
|
*/
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2156
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
2157
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
2158
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
2159
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2160
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
2161
|
+
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
2238
2162
|
/**
|
|
2239
|
-
*
|
|
2163
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
2164
|
+
* keys.
|
|
2165
|
+
* @param keys -
|
|
2166
|
+
* @param dropKeys -
|
|
2167
|
+
* @return Promise dh.PartitionedTable
|
|
2240
2168
|
*/
|
|
2241
|
-
|
|
2242
|
-
typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
|
|
2169
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
2243
2170
|
/**
|
|
2244
|
-
*
|
|
2245
|
-
* @param
|
|
2246
|
-
* @return
|
|
2171
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
2172
|
+
* @param column -
|
|
2173
|
+
* @return Promise of dh.ColumnStatistics
|
|
2247
2174
|
*/
|
|
2248
|
-
|
|
2175
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
2249
2176
|
/**
|
|
2250
|
-
*
|
|
2251
|
-
*
|
|
2252
|
-
*
|
|
2253
|
-
* @param
|
|
2254
|
-
* @
|
|
2177
|
+
* Seek the row matching the data provided
|
|
2178
|
+
* @param startingRow - Row to start the seek from
|
|
2179
|
+
* @param column - Column to seek for value on
|
|
2180
|
+
* @param valueType - Type of value provided
|
|
2181
|
+
* @param seekValue - Value to seek
|
|
2182
|
+
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
2183
|
+
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
2184
|
+
* `false`.
|
|
2185
|
+
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
2186
|
+
* @return A promise that resolves to the row value found.
|
|
2255
2187
|
*/
|
|
2256
|
-
|
|
2188
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
2189
|
+
toString():string;
|
|
2257
2190
|
/**
|
|
2258
|
-
*
|
|
2259
|
-
*
|
|
2260
|
-
* @return
|
|
2191
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
2192
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
2193
|
+
* @return boolean
|
|
2261
2194
|
*/
|
|
2262
|
-
|
|
2195
|
+
get hasInputTable():boolean;
|
|
2263
2196
|
/**
|
|
2264
|
-
*
|
|
2265
|
-
*
|
|
2197
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
2198
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
2199
|
+
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
2200
|
+
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
2266
2201
|
* @return {@link dh.Column} array
|
|
2267
2202
|
*/
|
|
2268
|
-
|
|
2203
|
+
get columns():Array<Column>;
|
|
2269
2204
|
/**
|
|
2270
|
-
*
|
|
2271
|
-
*
|
|
2272
|
-
* <ul>
|
|
2273
|
-
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
2274
|
-
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
2275
|
-
* the tree.</li>
|
|
2276
|
-
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
2277
|
-
* in the resulting table.</li>
|
|
2278
|
-
* </ul>
|
|
2205
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
2206
|
+
* @return dh.TotalsTableConfig
|
|
2279
2207
|
*/
|
|
2280
|
-
|
|
2281
|
-
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
2282
|
-
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
2283
|
-
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
2208
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
2284
2209
|
/**
|
|
2285
|
-
*
|
|
2286
|
-
*
|
|
2287
|
-
*
|
|
2288
|
-
*
|
|
2289
|
-
* @return Promise of dh.TreeTable
|
|
2210
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
2211
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2212
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
2213
|
+
* @return {@link dh.Sort} array
|
|
2290
2214
|
*/
|
|
2291
|
-
|
|
2215
|
+
get sort():Array<Sort>;
|
|
2292
2216
|
/**
|
|
2293
|
-
*
|
|
2217
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
2218
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
2219
|
+
* @return {@link dh.CustomColumn} array
|
|
2220
|
+
*/
|
|
2221
|
+
get customColumns():Array<CustomColumn>;
|
|
2222
|
+
/**
|
|
2223
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
2224
|
+
* initial snapshot.
|
|
2225
|
+
* @return boolean
|
|
2226
|
+
*/
|
|
2227
|
+
get isRefreshing():boolean;
|
|
2228
|
+
/**
|
|
2229
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
2230
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
2231
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
2294
2232
|
* @return {@link dh.FilterCondition} array
|
|
2295
2233
|
*/
|
|
2296
2234
|
get filter():Array<FilterCondition>;
|
|
2297
2235
|
/**
|
|
2298
|
-
*
|
|
2299
|
-
*
|
|
2236
|
+
* The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
|
|
2237
|
+
* not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
|
|
2238
|
+
* applySort(). Note that this getter will return the new value immediately, even though it may take a little time
|
|
2239
|
+
* to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
|
|
2240
|
+
* @return double
|
|
2300
2241
|
*/
|
|
2301
|
-
get
|
|
2302
|
-
|
|
2242
|
+
get totalSize():number;
|
|
2243
|
+
/**
|
|
2244
|
+
* The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
|
|
2245
|
+
* Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
|
|
2246
|
+
* property). for details).
|
|
2247
|
+
* @return double
|
|
2248
|
+
*/
|
|
2249
|
+
get size():number;
|
|
2303
2250
|
/**
|
|
2304
2251
|
* True if this table has been closed.
|
|
2305
2252
|
* @return boolean
|
|
2306
2253
|
*/
|
|
2307
2254
|
get isClosed():boolean;
|
|
2308
2255
|
/**
|
|
2309
|
-
*
|
|
2310
|
-
*
|
|
2311
|
-
*
|
|
2312
|
-
* @return
|
|
2256
|
+
* Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
|
|
2257
|
+
* table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
|
|
2258
|
+
* will be unavailable until table is coalesced.
|
|
2259
|
+
* @return boolean
|
|
2313
2260
|
*/
|
|
2314
|
-
get
|
|
2261
|
+
get isUncoalesced():boolean;
|
|
2315
2262
|
/**
|
|
2316
|
-
*
|
|
2317
|
-
* @
|
|
2263
|
+
* Listen for events on this object.
|
|
2264
|
+
* @param name - the name of the event to listen for
|
|
2265
|
+
* @param callback - a function to call when the event occurs
|
|
2266
|
+
* @return Returns a cleanup function.
|
|
2267
|
+
* @typeParam T - the type of the data that the event will provide
|
|
2318
2268
|
*/
|
|
2319
|
-
|
|
2269
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2270
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2271
|
+
hasListeners(name:string):boolean;
|
|
2320
2272
|
/**
|
|
2321
|
-
*
|
|
2322
|
-
* @
|
|
2273
|
+
* Removes an event listener added to this table.
|
|
2274
|
+
* @param name -
|
|
2275
|
+
* @param callback -
|
|
2276
|
+
* @return
|
|
2277
|
+
* @typeParam T -
|
|
2323
2278
|
*/
|
|
2324
|
-
|
|
2279
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2280
|
+
/**
|
|
2281
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
2282
|
+
* do not support reverse.
|
|
2283
|
+
* @return {@link dh.Sort}
|
|
2284
|
+
*/
|
|
2285
|
+
static reverse():Sort;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
|
|
2290
|
+
* Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
|
|
2291
|
+
* Additionally, we may add support for creating RangeSet objects to better serve some use cases.
|
|
2292
|
+
*/
|
|
2293
|
+
export class RangeSet {
|
|
2294
|
+
protected constructor();
|
|
2295
|
+
|
|
2296
|
+
static ofRange(first:number, last:number):RangeSet;
|
|
2297
|
+
static ofItems(rows:number[]):RangeSet;
|
|
2298
|
+
static ofRanges(ranges:RangeSet[]):RangeSet;
|
|
2299
|
+
static ofSortedRanges(ranges:RangeSet[]):RangeSet;
|
|
2325
2300
|
/**
|
|
2326
|
-
*
|
|
2327
|
-
*
|
|
2328
|
-
* @return boolean
|
|
2301
|
+
* a new iterator over all indexes in this collection.
|
|
2302
|
+
* @return Iterator of {@link dh.LongWrapper}
|
|
2329
2303
|
*/
|
|
2330
|
-
|
|
2304
|
+
iterator():Iterator<LongWrapper>;
|
|
2331
2305
|
/**
|
|
2332
|
-
*
|
|
2333
|
-
*
|
|
2334
|
-
*
|
|
2335
|
-
* @return
|
|
2336
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2306
|
+
* The total count of items contained in this collection. In some cases this can be expensive to compute, and
|
|
2307
|
+
* generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
|
|
2308
|
+
* property each time through a loop).
|
|
2309
|
+
* @return double
|
|
2337
2310
|
*/
|
|
2311
|
+
get size():number;
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
export class LongWrapper {
|
|
2315
|
+
protected constructor();
|
|
2316
|
+
|
|
2317
|
+
static ofString(str:string):LongWrapper;
|
|
2318
|
+
asNumber():number;
|
|
2319
|
+
valueOf():string;
|
|
2320
|
+
toString():string;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
export class CoreClient implements HasEventHandling {
|
|
2324
|
+
static readonly EVENT_CONNECT:string;
|
|
2325
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2326
|
+
static readonly EVENT_RECONNECT:string;
|
|
2327
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
2328
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
2329
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2330
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
2331
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2332
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
2333
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
2334
|
+
|
|
2335
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
2336
|
+
|
|
2337
|
+
running():Promise<CoreClient>;
|
|
2338
|
+
getServerUrl():string;
|
|
2339
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
2340
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
2341
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
2342
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
2343
|
+
getServerConfigValues():Promise<string[][]>;
|
|
2344
|
+
getStorageService():dh.storage.StorageService;
|
|
2345
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
2346
|
+
disconnect():void;
|
|
2338
2347
|
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
2339
2348
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
2340
2349
|
hasListeners(name:string):boolean;
|
|
2341
|
-
/**
|
|
2342
|
-
* Removes an event listener added to this table.
|
|
2343
|
-
* @param name -
|
|
2344
|
-
* @param callback -
|
|
2345
|
-
* @return
|
|
2346
|
-
* @typeParam T -
|
|
2347
|
-
*/
|
|
2348
2350
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
2349
2351
|
}
|
|
2350
2352
|
|
|
@@ -2370,6 +2372,16 @@ export namespace dh {
|
|
|
2370
2372
|
static readonly SKIP:AggregationOperationType;
|
|
2371
2373
|
}
|
|
2372
2374
|
|
|
2375
|
+
type ValueTypeType = string;
|
|
2376
|
+
export class ValueType {
|
|
2377
|
+
static readonly STRING:ValueTypeType;
|
|
2378
|
+
static readonly NUMBER:ValueTypeType;
|
|
2379
|
+
static readonly DOUBLE:ValueTypeType;
|
|
2380
|
+
static readonly LONG:ValueTypeType;
|
|
2381
|
+
static readonly DATETIME:ValueTypeType;
|
|
2382
|
+
static readonly BOOLEAN:ValueTypeType;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2373
2385
|
type SearchDisplayModeType = string;
|
|
2374
2386
|
export class SearchDisplayMode {
|
|
2375
2387
|
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
@@ -2393,35 +2405,10 @@ export namespace dh {
|
|
|
2393
2405
|
static readonly TREEMAP:VariableTypeType;
|
|
2394
2406
|
}
|
|
2395
2407
|
|
|
2396
|
-
type ValueTypeType = string;
|
|
2397
|
-
export class ValueType {
|
|
2398
|
-
static readonly STRING:ValueTypeType;
|
|
2399
|
-
static readonly NUMBER:ValueTypeType;
|
|
2400
|
-
static readonly DOUBLE:ValueTypeType;
|
|
2401
|
-
static readonly LONG:ValueTypeType;
|
|
2402
|
-
static readonly DATETIME:ValueTypeType;
|
|
2403
|
-
static readonly BOOLEAN:ValueTypeType;
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
2408
|
}
|
|
2407
2409
|
|
|
2408
2410
|
export namespace dh.ide {
|
|
2409
2411
|
|
|
2410
|
-
/**
|
|
2411
|
-
* Indicates the result of code run on the server.
|
|
2412
|
-
*/
|
|
2413
|
-
export interface CommandResult {
|
|
2414
|
-
/**
|
|
2415
|
-
* Describes changes made in the course of this command.
|
|
2416
|
-
* @return {@link dh.ide.VariableChanges}.
|
|
2417
|
-
*/
|
|
2418
|
-
get changes():VariableChanges;
|
|
2419
|
-
/**
|
|
2420
|
-
* If the command failed, the error message will be provided here.
|
|
2421
|
-
* @return String
|
|
2422
|
-
*/
|
|
2423
|
-
get error():string;
|
|
2424
|
-
}
|
|
2425
2412
|
/**
|
|
2426
2413
|
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2427
2414
|
* server.
|
|
@@ -2444,6 +2431,21 @@ export namespace dh.ide {
|
|
|
2444
2431
|
get message():string;
|
|
2445
2432
|
}
|
|
2446
2433
|
/**
|
|
2434
|
+
* Indicates the result of code run on the server.
|
|
2435
|
+
*/
|
|
2436
|
+
export interface CommandResult {
|
|
2437
|
+
/**
|
|
2438
|
+
* Describes changes made in the course of this command.
|
|
2439
|
+
* @return {@link dh.ide.VariableChanges}.
|
|
2440
|
+
*/
|
|
2441
|
+
get changes():VariableChanges;
|
|
2442
|
+
/**
|
|
2443
|
+
* If the command failed, the error message will be provided here.
|
|
2444
|
+
* @return String
|
|
2445
|
+
*/
|
|
2446
|
+
get error():string;
|
|
2447
|
+
}
|
|
2448
|
+
/**
|
|
2447
2449
|
* Specifies a type and either id or name (but not both).
|
|
2448
2450
|
*/
|
|
2449
2451
|
export interface VariableDescriptor {
|
|
@@ -2520,60 +2522,6 @@ export namespace dh.ide {
|
|
|
2520
2522
|
|
|
2521
2523
|
export namespace dh.i18n {
|
|
2522
2524
|
|
|
2523
|
-
/**
|
|
2524
|
-
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2525
|
-
*
|
|
2526
|
-
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2527
|
-
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2528
|
-
* BigDecimal.
|
|
2529
|
-
*/
|
|
2530
|
-
export class NumberFormat {
|
|
2531
|
-
/**
|
|
2532
|
-
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2533
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2534
|
-
* @param pattern -
|
|
2535
|
-
*/
|
|
2536
|
-
constructor(pattern:string);
|
|
2537
|
-
|
|
2538
|
-
/**
|
|
2539
|
-
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2540
|
-
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2541
|
-
* take advantage of caching
|
|
2542
|
-
* @param pattern -
|
|
2543
|
-
* @return dh.i18n.NumberFormat
|
|
2544
|
-
*/
|
|
2545
|
-
static getFormat(pattern:string):NumberFormat;
|
|
2546
|
-
/**
|
|
2547
|
-
* Parses the given text using the cached format matching the given pattern.
|
|
2548
|
-
* @param pattern -
|
|
2549
|
-
* @param text -
|
|
2550
|
-
* @return double
|
|
2551
|
-
*/
|
|
2552
|
-
static parse(pattern:string, text:string):number;
|
|
2553
|
-
/**
|
|
2554
|
-
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2555
|
-
* format matching the given pattern string.
|
|
2556
|
-
* @param pattern -
|
|
2557
|
-
* @param number -
|
|
2558
|
-
* @return String
|
|
2559
|
-
*/
|
|
2560
|
-
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2561
|
-
/**
|
|
2562
|
-
* Parses the given text using this instance's pattern into a JS Number.
|
|
2563
|
-
* @param text -
|
|
2564
|
-
* @return double
|
|
2565
|
-
*/
|
|
2566
|
-
parse(text:string):number;
|
|
2567
|
-
/**
|
|
2568
|
-
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2569
|
-
* @param number -
|
|
2570
|
-
* @return String
|
|
2571
|
-
*/
|
|
2572
|
-
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2573
|
-
toString():string;
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
2525
|
/**
|
|
2578
2526
|
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
2579
2527
|
* throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
|
|
@@ -2783,53 +2731,67 @@ export namespace dh.i18n {
|
|
|
2783
2731
|
toString():string;
|
|
2784
2732
|
}
|
|
2785
2733
|
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
|
-
export namespace dh.plot {
|
|
2789
|
-
|
|
2790
2734
|
/**
|
|
2791
|
-
*
|
|
2735
|
+
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2736
|
+
*
|
|
2737
|
+
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2738
|
+
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2739
|
+
* BigDecimal.
|
|
2792
2740
|
*/
|
|
2793
|
-
export
|
|
2794
|
-
readonly isLinesVisible?:boolean|null;
|
|
2795
|
-
readonly pointLabelFormat?:string|null;
|
|
2796
|
-
readonly yToolTipPattern?:string|null;
|
|
2797
|
-
readonly shapeSize?:number|null;
|
|
2798
|
-
readonly xToolTipPattern?:string|null;
|
|
2799
|
-
readonly isShapesVisible?:boolean|null;
|
|
2800
|
-
|
|
2801
|
-
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
2741
|
+
export class NumberFormat {
|
|
2802
2742
|
/**
|
|
2803
|
-
*
|
|
2743
|
+
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2744
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2745
|
+
* @param pattern -
|
|
2804
2746
|
*/
|
|
2805
|
-
|
|
2806
|
-
|
|
2747
|
+
constructor(pattern:string);
|
|
2748
|
+
|
|
2807
2749
|
/**
|
|
2808
|
-
*
|
|
2809
|
-
* the
|
|
2810
|
-
*
|
|
2750
|
+
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2751
|
+
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2752
|
+
* take advantage of caching
|
|
2753
|
+
* @param pattern -
|
|
2754
|
+
* @return dh.i18n.NumberFormat
|
|
2811
2755
|
*/
|
|
2812
|
-
|
|
2813
|
-
get lineColor():string;
|
|
2756
|
+
static getFormat(pattern:string):NumberFormat;
|
|
2814
2757
|
/**
|
|
2815
|
-
*
|
|
2816
|
-
* @
|
|
2758
|
+
* Parses the given text using the cached format matching the given pattern.
|
|
2759
|
+
* @param pattern -
|
|
2760
|
+
* @param text -
|
|
2761
|
+
* @return double
|
|
2817
2762
|
*/
|
|
2818
|
-
|
|
2819
|
-
get oneClick():OneClick;
|
|
2820
|
-
get gradientVisible():boolean;
|
|
2821
|
-
get shapeColor():string;
|
|
2763
|
+
static parse(pattern:string, text:string):number;
|
|
2822
2764
|
/**
|
|
2823
|
-
*
|
|
2765
|
+
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2766
|
+
* format matching the given pattern string.
|
|
2767
|
+
* @param pattern -
|
|
2768
|
+
* @param number -
|
|
2824
2769
|
* @return String
|
|
2825
2770
|
*/
|
|
2826
|
-
|
|
2771
|
+
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2827
2772
|
/**
|
|
2828
|
-
*
|
|
2829
|
-
* @
|
|
2773
|
+
* Parses the given text using this instance's pattern into a JS Number.
|
|
2774
|
+
* @param text -
|
|
2775
|
+
* @return double
|
|
2830
2776
|
*/
|
|
2831
|
-
|
|
2832
|
-
|
|
2777
|
+
parse(text:string):number;
|
|
2778
|
+
/**
|
|
2779
|
+
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2780
|
+
* @param number -
|
|
2781
|
+
* @return String
|
|
2782
|
+
*/
|
|
2783
|
+
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2784
|
+
toString():string;
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2790
|
+
export namespace dh.plot {
|
|
2791
|
+
|
|
2792
|
+
export interface FigureDataUpdatedEvent {
|
|
2793
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2794
|
+
get series():Series[];
|
|
2833
2795
|
}
|
|
2834
2796
|
export interface OneClick {
|
|
2835
2797
|
setValueForColumn(columnName:string, value:any):void;
|
|
@@ -2838,23 +2800,24 @@ export namespace dh.plot {
|
|
|
2838
2800
|
get columns():dh.Column[];
|
|
2839
2801
|
}
|
|
2840
2802
|
/**
|
|
2841
|
-
* Describes
|
|
2803
|
+
* Describes how to access and display data required within a series.
|
|
2842
2804
|
*/
|
|
2843
|
-
export interface
|
|
2805
|
+
export interface SeriesDataSource {
|
|
2806
|
+
/**
|
|
2807
|
+
* the type of data stored in the underlying table's Column.
|
|
2808
|
+
* @return String
|
|
2809
|
+
*/
|
|
2810
|
+
get columnType():string;
|
|
2844
2811
|
/**
|
|
2845
|
-
*
|
|
2846
|
-
* @return
|
|
2812
|
+
* the axis that this source should be drawn on.
|
|
2813
|
+
* @return dh.plot.Axis
|
|
2847
2814
|
*/
|
|
2848
|
-
get
|
|
2815
|
+
get axis():Axis;
|
|
2849
2816
|
/**
|
|
2850
|
-
*
|
|
2817
|
+
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
2851
2818
|
* @return int
|
|
2852
2819
|
*/
|
|
2853
|
-
get
|
|
2854
|
-
}
|
|
2855
|
-
export interface FigureDataUpdatedEvent {
|
|
2856
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
2857
|
-
get series():Series[];
|
|
2820
|
+
get type():SourceTypeType;
|
|
2858
2821
|
}
|
|
2859
2822
|
/**
|
|
2860
2823
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
@@ -2925,180 +2888,98 @@ export namespace dh.plot {
|
|
|
2925
2888
|
get minRange():number;
|
|
2926
2889
|
}
|
|
2927
2890
|
/**
|
|
2928
|
-
* Describes
|
|
2891
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
2929
2892
|
*/
|
|
2930
|
-
export interface
|
|
2893
|
+
export interface MultiSeries {
|
|
2931
2894
|
/**
|
|
2932
|
-
*
|
|
2895
|
+
* The name for this multi-series.
|
|
2933
2896
|
* @return String
|
|
2934
2897
|
*/
|
|
2935
|
-
get
|
|
2936
|
-
/**
|
|
2937
|
-
* the axis that this source should be drawn on.
|
|
2938
|
-
* @return dh.plot.Axis
|
|
2939
|
-
*/
|
|
2940
|
-
get axis():Axis;
|
|
2898
|
+
get name():string;
|
|
2941
2899
|
/**
|
|
2942
|
-
*
|
|
2900
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2943
2901
|
* @return int
|
|
2944
2902
|
*/
|
|
2945
|
-
get
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
export class FigureSourceException {
|
|
2949
|
-
table:dh.Table;
|
|
2950
|
-
source:SeriesDataSource;
|
|
2951
|
-
|
|
2952
|
-
protected constructor();
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
export class SourceDescriptor {
|
|
2956
|
-
axis:AxisDescriptor;
|
|
2957
|
-
table:dh.Table;
|
|
2958
|
-
columnName:string;
|
|
2959
|
-
type:string;
|
|
2960
|
-
|
|
2961
|
-
constructor();
|
|
2962
|
-
}
|
|
2963
|
-
|
|
2964
|
-
export class SeriesDataSourceException {
|
|
2965
|
-
protected constructor();
|
|
2966
|
-
|
|
2967
|
-
get source():SeriesDataSource;
|
|
2968
|
-
get message():string;
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
|
-
/**
|
|
2972
|
-
* A descriptor used with JsFigureFactory.create to create a figure from JS.
|
|
2973
|
-
*/
|
|
2974
|
-
export class FigureDescriptor {
|
|
2975
|
-
title?:string|null;
|
|
2976
|
-
titleFont?:string|null;
|
|
2977
|
-
titleColor?:string|null;
|
|
2978
|
-
isResizable?:boolean|null;
|
|
2979
|
-
isDefaultTheme?:boolean|null;
|
|
2980
|
-
updateInterval?:number|null;
|
|
2981
|
-
cols?:number|null;
|
|
2982
|
-
rows?:number|null;
|
|
2983
|
-
charts:Array<ChartDescriptor>;
|
|
2984
|
-
|
|
2985
|
-
constructor();
|
|
2903
|
+
get plotStyle():SeriesPlotStyleType;
|
|
2986
2904
|
}
|
|
2987
|
-
|
|
2988
2905
|
/**
|
|
2989
|
-
*
|
|
2906
|
+
* Provides access to the data for displaying in a figure.
|
|
2990
2907
|
*/
|
|
2991
|
-
export
|
|
2992
|
-
|
|
2908
|
+
export interface Series {
|
|
2909
|
+
readonly isLinesVisible?:boolean|null;
|
|
2910
|
+
readonly pointLabelFormat?:string|null;
|
|
2911
|
+
readonly yToolTipPattern?:string|null;
|
|
2912
|
+
readonly shapeSize?:number|null;
|
|
2913
|
+
readonly xToolTipPattern?:string|null;
|
|
2914
|
+
readonly isShapesVisible?:boolean|null;
|
|
2993
2915
|
|
|
2916
|
+
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
2994
2917
|
/**
|
|
2995
|
-
*
|
|
2996
|
-
* the same visual fidelity as the original table, but with fewer rows.
|
|
2997
|
-
* @param table - The table to downsample.
|
|
2998
|
-
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
2999
|
-
* @param yCols - The names of the Y columns to downsample.
|
|
3000
|
-
* @param width - The width of the visible area in pixels.
|
|
3001
|
-
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3002
|
-
* @return A promise that resolves to the downsampled table.
|
|
2918
|
+
* Disable updates for this Series.
|
|
3003
2919
|
*/
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
/**
|
|
3008
|
-
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3009
|
-
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3010
|
-
* keep that cached as well.
|
|
3011
|
-
*/
|
|
3012
|
-
export class ChartData {
|
|
3013
|
-
constructor(table:dh.Table);
|
|
3014
|
-
|
|
3015
|
-
update(tableData:dh.SubscriptionTableData):void;
|
|
3016
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
2920
|
+
unsubscribe():void;
|
|
2921
|
+
get shape():string;
|
|
3017
2922
|
/**
|
|
3018
|
-
*
|
|
3019
|
-
*
|
|
2923
|
+
* Contains details on how to access data within the chart for this series. keyed with the way that this series uses
|
|
2924
|
+
* the axis.
|
|
2925
|
+
* @return {@link dh.plot.SeriesDataSource}
|
|
3020
2926
|
*/
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
/**
|
|
3025
|
-
* Provide the details for a chart.
|
|
3026
|
-
*/
|
|
3027
|
-
export class Chart implements dh.HasEventHandling {
|
|
2927
|
+
get sources():SeriesDataSource[];
|
|
2928
|
+
get lineColor():string;
|
|
3028
2929
|
/**
|
|
3029
|
-
*
|
|
2930
|
+
* The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
|
|
2931
|
+
* @return int
|
|
3030
2932
|
*/
|
|
3031
|
-
|
|
2933
|
+
get plotStyle():SeriesPlotStyleType;
|
|
2934
|
+
get oneClick():OneClick;
|
|
2935
|
+
get gradientVisible():boolean;
|
|
2936
|
+
get shapeColor():string;
|
|
3032
2937
|
/**
|
|
3033
|
-
* The
|
|
2938
|
+
* The name for this series.
|
|
3034
2939
|
* @return String
|
|
3035
2940
|
*/
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
protected constructor();
|
|
3039
|
-
|
|
3040
|
-
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
3041
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
3042
|
-
hasListeners(name:string):boolean;
|
|
3043
|
-
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3044
|
-
get column():number;
|
|
3045
|
-
get showLegend():boolean;
|
|
3046
|
-
/**
|
|
3047
|
-
* The axes used in this chart.
|
|
3048
|
-
* @return dh.plot.Axis
|
|
3049
|
-
*/
|
|
3050
|
-
get axes():Axis[];
|
|
3051
|
-
get is3d():boolean;
|
|
3052
|
-
get titleFont():string;
|
|
3053
|
-
get colspan():number;
|
|
3054
|
-
get titleColor():string;
|
|
3055
|
-
get series():Series[];
|
|
3056
|
-
get rowspan():number;
|
|
2941
|
+
get name():string;
|
|
3057
2942
|
/**
|
|
3058
|
-
*
|
|
3059
|
-
* @return
|
|
2943
|
+
* indicates that this series belongs to a MultiSeries, null otherwise
|
|
2944
|
+
* @return dh.plot.MultiSeries
|
|
3060
2945
|
*/
|
|
3061
|
-
get
|
|
3062
|
-
get
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
2946
|
+
get multiSeries():MultiSeries;
|
|
2947
|
+
get shapeLabel():string;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
export class SourceDescriptor {
|
|
2951
|
+
axis:AxisDescriptor;
|
|
2952
|
+
table:dh.Table;
|
|
2953
|
+
columnName:string;
|
|
2954
|
+
type:string;
|
|
2955
|
+
|
|
2956
|
+
constructor();
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
export class AxisDescriptor {
|
|
2960
|
+
formatType:string;
|
|
2961
|
+
type:string;
|
|
2962
|
+
position:string;
|
|
2963
|
+
log?:boolean|null;
|
|
2964
|
+
label?:string|null;
|
|
2965
|
+
labelFont?:string|null;
|
|
2966
|
+
ticksFont?:string|null;
|
|
2967
|
+
formatPattern?:string|null;
|
|
2968
|
+
color?:string|null;
|
|
2969
|
+
minRange?:number|null;
|
|
2970
|
+
maxRange?:number|null;
|
|
2971
|
+
minorTicksVisible?:boolean|null;
|
|
2972
|
+
majorTicksVisible?:boolean|null;
|
|
2973
|
+
minorTickCount?:number|null;
|
|
2974
|
+
gapBetweenMajorTicks?:number|null;
|
|
2975
|
+
majorTickLocations?:Array<number>|null;
|
|
2976
|
+
tickLabelAngle?:number|null;
|
|
2977
|
+
invert?:boolean|null;
|
|
2978
|
+
isTimeAxis?:boolean|null;
|
|
2979
|
+
|
|
2980
|
+
constructor();
|
|
3066
2981
|
}
|
|
3067
2982
|
|
|
3068
|
-
/**
|
|
3069
|
-
* Provides the details for a figure.
|
|
3070
|
-
*
|
|
3071
|
-
* The Deephaven JS API supports automatic lossless downsampling of time-series data, when that data is plotted in one
|
|
3072
|
-
* or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
|
|
3073
|
-
* being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
|
|
3074
|
-
* the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
|
|
3075
|
-
* any) to reduce the number of points sent to the client.
|
|
3076
|
-
*
|
|
3077
|
-
* Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
|
|
3078
|
-
* can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
|
|
3079
|
-
* <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
|
|
3080
|
-
* than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
|
|
3081
|
-
* <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
|
|
3082
|
-
* data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
|
|
3083
|
-
*
|
|
3084
|
-
* Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
|
|
3085
|
-
* UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
|
|
3086
|
-
* accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
|
|
3087
|
-
* that the "important" values are visible.
|
|
3088
|
-
*
|
|
3089
|
-
* Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
|
|
3090
|
-
* First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
|
|
3091
|
-
* is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
|
|
3092
|
-
* configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
|
|
3093
|
-
* the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
|
|
3094
|
-
* indicating to the user why data is not ready yet - when the server side process is complete,
|
|
3095
|
-
* <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
|
|
3096
|
-
* panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
|
|
3097
|
-
* downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
|
|
3098
|
-
*
|
|
3099
|
-
* At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
|
|
3100
|
-
* client-created figures.
|
|
3101
|
-
*/
|
|
3102
2983
|
export class Figure implements dh.HasEventHandling {
|
|
3103
2984
|
/**
|
|
3104
2985
|
* The title of the figure.
|
|
@@ -3142,8 +3023,7 @@ export namespace dh.plot {
|
|
|
3142
3023
|
*/
|
|
3143
3024
|
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3144
3025
|
|
|
3145
|
-
|
|
3146
|
-
|
|
3026
|
+
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3147
3027
|
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3148
3028
|
/**
|
|
3149
3029
|
* Disable updates for all series in this figure.
|
|
@@ -3182,7 +3062,13 @@ export namespace dh.plot {
|
|
|
3182
3062
|
* @typeParam T -
|
|
3183
3063
|
*/
|
|
3184
3064
|
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3185
|
-
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
export class FigureFetchError {
|
|
3068
|
+
error:object;
|
|
3069
|
+
errors:Array<string>;
|
|
3070
|
+
|
|
3071
|
+
protected constructor();
|
|
3186
3072
|
}
|
|
3187
3073
|
|
|
3188
3074
|
export class ChartDescriptor {
|
|
@@ -3221,35 +3107,21 @@ export namespace dh.plot {
|
|
|
3221
3107
|
constructor();
|
|
3222
3108
|
}
|
|
3223
3109
|
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
export class AxisDescriptor {
|
|
3232
|
-
formatType:string;
|
|
3233
|
-
type:string;
|
|
3234
|
-
position:string;
|
|
3235
|
-
log?:boolean|null;
|
|
3236
|
-
label?:string|null;
|
|
3237
|
-
labelFont?:string|null;
|
|
3238
|
-
ticksFont?:string|null;
|
|
3239
|
-
formatPattern?:string|null;
|
|
3240
|
-
color?:string|null;
|
|
3241
|
-
minRange?:number|null;
|
|
3242
|
-
maxRange?:number|null;
|
|
3243
|
-
minorTicksVisible?:boolean|null;
|
|
3244
|
-
majorTicksVisible?:boolean|null;
|
|
3245
|
-
minorTickCount?:number|null;
|
|
3246
|
-
gapBetweenMajorTicks?:number|null;
|
|
3247
|
-
majorTickLocations?:Array<number>|null;
|
|
3248
|
-
tickLabelAngle?:number|null;
|
|
3249
|
-
invert?:boolean|null;
|
|
3250
|
-
isTimeAxis?:boolean|null;
|
|
3110
|
+
/**
|
|
3111
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3112
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3113
|
+
* keep that cached as well.
|
|
3114
|
+
*/
|
|
3115
|
+
export class ChartData {
|
|
3116
|
+
constructor(table:dh.Table);
|
|
3251
3117
|
|
|
3252
|
-
|
|
3118
|
+
update(tableData:dh.SubscriptionTableData):void;
|
|
3119
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3120
|
+
/**
|
|
3121
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3122
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3123
|
+
*/
|
|
3124
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3253
3125
|
}
|
|
3254
3126
|
|
|
3255
3127
|
export class DownsampleOptions {
|
|
@@ -3278,6 +3150,100 @@ export namespace dh.plot {
|
|
|
3278
3150
|
protected constructor();
|
|
3279
3151
|
}
|
|
3280
3152
|
|
|
3153
|
+
/**
|
|
3154
|
+
* Provide the details for a chart.
|
|
3155
|
+
*/
|
|
3156
|
+
export class Chart implements dh.HasEventHandling {
|
|
3157
|
+
/**
|
|
3158
|
+
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
3159
|
+
*/
|
|
3160
|
+
static readonly EVENT_SERIES_ADDED:string;
|
|
3161
|
+
/**
|
|
3162
|
+
* The title of the chart.
|
|
3163
|
+
* @return String
|
|
3164
|
+
*/
|
|
3165
|
+
readonly title?:string|null;
|
|
3166
|
+
|
|
3167
|
+
protected constructor();
|
|
3168
|
+
|
|
3169
|
+
addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
|
|
3170
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
|
|
3171
|
+
hasListeners(name:string):boolean;
|
|
3172
|
+
removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
|
|
3173
|
+
get column():number;
|
|
3174
|
+
get showLegend():boolean;
|
|
3175
|
+
/**
|
|
3176
|
+
* The axes used in this chart.
|
|
3177
|
+
* @return dh.plot.Axis
|
|
3178
|
+
*/
|
|
3179
|
+
get axes():Axis[];
|
|
3180
|
+
get is3d():boolean;
|
|
3181
|
+
get titleFont():string;
|
|
3182
|
+
get colspan():number;
|
|
3183
|
+
get titleColor():string;
|
|
3184
|
+
get series():Series[];
|
|
3185
|
+
get rowspan():number;
|
|
3186
|
+
/**
|
|
3187
|
+
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
3188
|
+
* @return int
|
|
3189
|
+
*/
|
|
3190
|
+
get chartType():ChartTypeType;
|
|
3191
|
+
get row():number;
|
|
3192
|
+
get legendColor():string;
|
|
3193
|
+
get legendFont():string;
|
|
3194
|
+
get multiSeries():MultiSeries[];
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
export class FigureSourceException {
|
|
3198
|
+
table:dh.Table;
|
|
3199
|
+
source:SeriesDataSource;
|
|
3200
|
+
|
|
3201
|
+
protected constructor();
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
/**
|
|
3205
|
+
* A descriptor used with JsFigureFactory.create to create a figure from JS.
|
|
3206
|
+
*/
|
|
3207
|
+
export class FigureDescriptor {
|
|
3208
|
+
title?:string|null;
|
|
3209
|
+
titleFont?:string|null;
|
|
3210
|
+
titleColor?:string|null;
|
|
3211
|
+
isResizable?:boolean|null;
|
|
3212
|
+
isDefaultTheme?:boolean|null;
|
|
3213
|
+
updateInterval?:number|null;
|
|
3214
|
+
cols?:number|null;
|
|
3215
|
+
rows?:number|null;
|
|
3216
|
+
charts:Array<ChartDescriptor>;
|
|
3217
|
+
|
|
3218
|
+
constructor();
|
|
3219
|
+
}
|
|
3220
|
+
|
|
3221
|
+
export class SeriesDataSourceException {
|
|
3222
|
+
protected constructor();
|
|
3223
|
+
|
|
3224
|
+
get source():SeriesDataSource;
|
|
3225
|
+
get message():string;
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
/**
|
|
3229
|
+
* Helper class for plot downsampling methods.
|
|
3230
|
+
*/
|
|
3231
|
+
export class Downsample {
|
|
3232
|
+
protected constructor();
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3236
|
+
* the same visual fidelity as the original table, but with fewer rows.
|
|
3237
|
+
* @param table - The table to downsample.
|
|
3238
|
+
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3239
|
+
* @param yCols - The names of the Y columns to downsample.
|
|
3240
|
+
* @param width - The width of the visible area in pixels.
|
|
3241
|
+
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3242
|
+
* @return A promise that resolves to the downsampled table.
|
|
3243
|
+
*/
|
|
3244
|
+
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3281
3247
|
|
|
3282
3248
|
type AxisTypeType = number;
|
|
3283
3249
|
export class AxisType {
|
|
@@ -3289,6 +3255,21 @@ export namespace dh.plot {
|
|
|
3289
3255
|
static readonly COLOR:AxisTypeType;
|
|
3290
3256
|
}
|
|
3291
3257
|
|
|
3258
|
+
/**
|
|
3259
|
+
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3260
|
+
* those series should be rendered.
|
|
3261
|
+
*/
|
|
3262
|
+
type ChartTypeType = number;
|
|
3263
|
+
export class ChartType {
|
|
3264
|
+
static readonly XY:ChartTypeType;
|
|
3265
|
+
static readonly PIE:ChartTypeType;
|
|
3266
|
+
static readonly OHLC:ChartTypeType;
|
|
3267
|
+
static readonly CATEGORY:ChartTypeType;
|
|
3268
|
+
static readonly XYZ:ChartTypeType;
|
|
3269
|
+
static readonly CATEGORY_3D:ChartTypeType;
|
|
3270
|
+
static readonly TREEMAP:ChartTypeType;
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3292
3273
|
type AxisFormatTypeType = number;
|
|
3293
3274
|
export class AxisFormatType {
|
|
3294
3275
|
static readonly CATEGORY:AxisFormatTypeType;
|
|
@@ -3304,19 +3285,20 @@ export namespace dh.plot {
|
|
|
3304
3285
|
static readonly NONE:AxisPositionType;
|
|
3305
3286
|
}
|
|
3306
3287
|
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
static readonly
|
|
3314
|
-
static readonly PIE:
|
|
3315
|
-
static readonly
|
|
3316
|
-
static readonly
|
|
3317
|
-
static readonly
|
|
3318
|
-
static readonly
|
|
3319
|
-
static readonly
|
|
3288
|
+
type SeriesPlotStyleType = number;
|
|
3289
|
+
export class SeriesPlotStyle {
|
|
3290
|
+
static readonly BAR:SeriesPlotStyleType;
|
|
3291
|
+
static readonly STACKED_BAR:SeriesPlotStyleType;
|
|
3292
|
+
static readonly LINE:SeriesPlotStyleType;
|
|
3293
|
+
static readonly AREA:SeriesPlotStyleType;
|
|
3294
|
+
static readonly STACKED_AREA:SeriesPlotStyleType;
|
|
3295
|
+
static readonly PIE:SeriesPlotStyleType;
|
|
3296
|
+
static readonly HISTOGRAM:SeriesPlotStyleType;
|
|
3297
|
+
static readonly OHLC:SeriesPlotStyleType;
|
|
3298
|
+
static readonly SCATTER:SeriesPlotStyleType;
|
|
3299
|
+
static readonly STEP:SeriesPlotStyleType;
|
|
3300
|
+
static readonly ERROR_BAR:SeriesPlotStyleType;
|
|
3301
|
+
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3320
3302
|
}
|
|
3321
3303
|
|
|
3322
3304
|
/**
|
|
@@ -3348,26 +3330,47 @@ export namespace dh.plot {
|
|
|
3348
3330
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3349
3331
|
}
|
|
3350
3332
|
|
|
3351
|
-
type SeriesPlotStyleType = number;
|
|
3352
|
-
export class SeriesPlotStyle {
|
|
3353
|
-
static readonly BAR:SeriesPlotStyleType;
|
|
3354
|
-
static readonly STACKED_BAR:SeriesPlotStyleType;
|
|
3355
|
-
static readonly LINE:SeriesPlotStyleType;
|
|
3356
|
-
static readonly AREA:SeriesPlotStyleType;
|
|
3357
|
-
static readonly STACKED_AREA:SeriesPlotStyleType;
|
|
3358
|
-
static readonly PIE:SeriesPlotStyleType;
|
|
3359
|
-
static readonly HISTOGRAM:SeriesPlotStyleType;
|
|
3360
|
-
static readonly OHLC:SeriesPlotStyleType;
|
|
3361
|
-
static readonly SCATTER:SeriesPlotStyleType;
|
|
3362
|
-
static readonly STEP:SeriesPlotStyleType;
|
|
3363
|
-
static readonly ERROR_BAR:SeriesPlotStyleType;
|
|
3364
|
-
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
3333
|
}
|
|
3368
3334
|
|
|
3369
3335
|
export namespace dh.lsp {
|
|
3370
3336
|
|
|
3337
|
+
export class MarkupContent {
|
|
3338
|
+
kind:string;
|
|
3339
|
+
value:string;
|
|
3340
|
+
|
|
3341
|
+
constructor();
|
|
3342
|
+
}
|
|
3343
|
+
|
|
3344
|
+
export class Range {
|
|
3345
|
+
start:Position;
|
|
3346
|
+
end:Position;
|
|
3347
|
+
|
|
3348
|
+
constructor();
|
|
3349
|
+
|
|
3350
|
+
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
export class TextDocumentContentChangeEvent {
|
|
3354
|
+
range:Range;
|
|
3355
|
+
rangeLength:number;
|
|
3356
|
+
text:string;
|
|
3357
|
+
|
|
3358
|
+
constructor();
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3361
|
+
export class Position {
|
|
3362
|
+
line:number;
|
|
3363
|
+
character:number;
|
|
3364
|
+
|
|
3365
|
+
constructor();
|
|
3366
|
+
|
|
3367
|
+
lessThan(start:Position):boolean;
|
|
3368
|
+
lessOrEqual(start:Position):boolean;
|
|
3369
|
+
greaterThan(end:Position):boolean;
|
|
3370
|
+
greaterOrEqual(end:Position):boolean;
|
|
3371
|
+
copy():Position;
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3371
3374
|
export class TextEdit {
|
|
3372
3375
|
range:Range;
|
|
3373
3376
|
text:string;
|
|
@@ -3392,13 +3395,6 @@ export namespace dh.lsp {
|
|
|
3392
3395
|
constructor();
|
|
3393
3396
|
}
|
|
3394
3397
|
|
|
3395
|
-
export class Hover {
|
|
3396
|
-
contents:MarkupContent;
|
|
3397
|
-
range:Range;
|
|
3398
|
-
|
|
3399
|
-
constructor();
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
3398
|
export class ParameterInformation {
|
|
3403
3399
|
label:string;
|
|
3404
3400
|
documentation:MarkupContent;
|
|
@@ -3406,15 +3402,6 @@ export namespace dh.lsp {
|
|
|
3406
3402
|
constructor();
|
|
3407
3403
|
}
|
|
3408
3404
|
|
|
3409
|
-
export class Range {
|
|
3410
|
-
start:Position;
|
|
3411
|
-
end:Position;
|
|
3412
|
-
|
|
3413
|
-
constructor();
|
|
3414
|
-
|
|
3415
|
-
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3416
|
-
}
|
|
3417
|
-
|
|
3418
3405
|
export class SignatureInformation {
|
|
3419
3406
|
label:string;
|
|
3420
3407
|
documentation:MarkupContent;
|
|
@@ -3424,30 +3411,9 @@ export namespace dh.lsp {
|
|
|
3424
3411
|
constructor();
|
|
3425
3412
|
}
|
|
3426
3413
|
|
|
3427
|
-
export class
|
|
3428
|
-
|
|
3429
|
-
character:number;
|
|
3430
|
-
|
|
3431
|
-
constructor();
|
|
3432
|
-
|
|
3433
|
-
lessThan(start:Position):boolean;
|
|
3434
|
-
lessOrEqual(start:Position):boolean;
|
|
3435
|
-
greaterThan(end:Position):boolean;
|
|
3436
|
-
greaterOrEqual(end:Position):boolean;
|
|
3437
|
-
copy():Position;
|
|
3438
|
-
}
|
|
3439
|
-
|
|
3440
|
-
export class MarkupContent {
|
|
3441
|
-
kind:string;
|
|
3442
|
-
value:string;
|
|
3443
|
-
|
|
3444
|
-
constructor();
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
|
-
export class TextDocumentContentChangeEvent {
|
|
3414
|
+
export class Hover {
|
|
3415
|
+
contents:MarkupContent;
|
|
3448
3416
|
range:Range;
|
|
3449
|
-
rangeLength:number;
|
|
3450
|
-
text:string;
|
|
3451
3417
|
|
|
3452
3418
|
constructor();
|
|
3453
3419
|
}
|
|
@@ -3456,18 +3422,6 @@ export namespace dh.lsp {
|
|
|
3456
3422
|
|
|
3457
3423
|
export namespace dh.calendar {
|
|
3458
3424
|
|
|
3459
|
-
export interface Holiday {
|
|
3460
|
-
/**
|
|
3461
|
-
* The date of the Holiday.
|
|
3462
|
-
* @return {@link dh.LocalDateWrapper}
|
|
3463
|
-
*/
|
|
3464
|
-
get date():dh.LocalDateWrapper;
|
|
3465
|
-
/**
|
|
3466
|
-
* The business periods that are open on the holiday.
|
|
3467
|
-
* @return dh.calendar.BusinessPeriod
|
|
3468
|
-
*/
|
|
3469
|
-
get businessPeriods():Array<BusinessPeriod>;
|
|
3470
|
-
}
|
|
3471
3425
|
/**
|
|
3472
3426
|
* Defines a calendar with business hours and holidays.
|
|
3473
3427
|
*/
|
|
@@ -3502,6 +3456,18 @@ export namespace dh.calendar {
|
|
|
3502
3456
|
get close():string;
|
|
3503
3457
|
get open():string;
|
|
3504
3458
|
}
|
|
3459
|
+
export interface Holiday {
|
|
3460
|
+
/**
|
|
3461
|
+
* The date of the Holiday.
|
|
3462
|
+
* @return {@link dh.LocalDateWrapper}
|
|
3463
|
+
*/
|
|
3464
|
+
get date():dh.LocalDateWrapper;
|
|
3465
|
+
/**
|
|
3466
|
+
* The business periods that are open on the holiday.
|
|
3467
|
+
* @return dh.calendar.BusinessPeriod
|
|
3468
|
+
*/
|
|
3469
|
+
get businessPeriods():Array<BusinessPeriod>;
|
|
3470
|
+
}
|
|
3505
3471
|
|
|
3506
3472
|
type DayOfWeekType = string;
|
|
3507
3473
|
export class DayOfWeek {
|