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