@deephaven/jsapi-types 1.0.0-dev0.38.0 → 1.0.0-dev0.39.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 +2026 -1944
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -75,21 +75,6 @@ export namespace dh.storage {
|
|
|
75
75
|
createDirectory(path:string):Promise<void>;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Storage service metadata about files and folders.
|
|
80
|
-
*/
|
|
81
|
-
export class ItemDetails {
|
|
82
|
-
protected constructor();
|
|
83
|
-
|
|
84
|
-
toString():string;
|
|
85
|
-
get filename():string;
|
|
86
|
-
get basename():string;
|
|
87
|
-
get size():number;
|
|
88
|
-
get etag():string;
|
|
89
|
-
get type():ItemTypeType;
|
|
90
|
-
get dirname():string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
78
|
/**
|
|
94
79
|
* Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
|
|
95
80
|
* if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
|
|
@@ -106,6 +91,21 @@ export namespace dh.storage {
|
|
|
106
91
|
get etag():string;
|
|
107
92
|
}
|
|
108
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Storage service metadata about files and folders.
|
|
96
|
+
*/
|
|
97
|
+
export class ItemDetails {
|
|
98
|
+
protected constructor();
|
|
99
|
+
|
|
100
|
+
toString():string;
|
|
101
|
+
get filename():string;
|
|
102
|
+
get basename():string;
|
|
103
|
+
get size():number;
|
|
104
|
+
get etag():string;
|
|
105
|
+
get type():ItemTypeType;
|
|
106
|
+
get dirname():string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
109
|
|
|
110
110
|
type ItemTypeType = string;
|
|
111
111
|
export class ItemType {
|
|
@@ -117,96 +117,6 @@ export namespace dh.storage {
|
|
|
117
117
|
|
|
118
118
|
export namespace dh {
|
|
119
119
|
|
|
120
|
-
/**
|
|
121
|
-
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
122
|
-
*/
|
|
123
|
-
export interface LocalTimeWrapper {
|
|
124
|
-
valueOf():string;
|
|
125
|
-
getHour():number;
|
|
126
|
-
getMinute():number;
|
|
127
|
-
getSecond():number;
|
|
128
|
-
getNano():number;
|
|
129
|
-
toString():string;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
133
|
-
*/
|
|
134
|
-
export interface Format {
|
|
135
|
-
/**
|
|
136
|
-
* The format string to apply to the value of this cell.
|
|
137
|
-
* @return String
|
|
138
|
-
*/
|
|
139
|
-
readonly formatString?:string|null;
|
|
140
|
-
/**
|
|
141
|
-
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
142
|
-
* @return String
|
|
143
|
-
*/
|
|
144
|
-
readonly backgroundColor?:string|null;
|
|
145
|
-
/**
|
|
146
|
-
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
147
|
-
* @return String
|
|
148
|
-
*/
|
|
149
|
-
readonly color?:string|null;
|
|
150
|
-
/**
|
|
151
|
-
*
|
|
152
|
-
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
153
|
-
*/
|
|
154
|
-
readonly numberFormat?:string|null;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
158
|
-
* request the viewport again.
|
|
159
|
-
*/
|
|
160
|
-
export interface ViewportRow extends Row {
|
|
161
|
-
get(column:Column):any;
|
|
162
|
-
getFormat(column:Column):Format;
|
|
163
|
-
get index():LongWrapper;
|
|
164
|
-
}
|
|
165
|
-
export interface WorkerHeapInfo {
|
|
166
|
-
/**
|
|
167
|
-
* Total heap size available for this worker.
|
|
168
|
-
*/
|
|
169
|
-
get totalHeapSize():number;
|
|
170
|
-
get freeMemory():number;
|
|
171
|
-
get maximumHeapSize():number;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
175
|
-
* columns) either by index, or scanning the complete present index.
|
|
176
|
-
* <p>
|
|
177
|
-
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
178
|
-
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
179
|
-
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
180
|
-
* options should be considered.
|
|
181
|
-
* <p>
|
|
182
|
-
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
183
|
-
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
184
|
-
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
185
|
-
* specific rows or cells out of the table.
|
|
186
|
-
*/
|
|
187
|
-
export interface SubscriptionTableData extends TableData {
|
|
188
|
-
get fullIndex():RangeSet;
|
|
189
|
-
/**
|
|
190
|
-
* The ordered set of row indexes removed since the last update
|
|
191
|
-
* @return the rangeset of removed rows
|
|
192
|
-
*/
|
|
193
|
-
get removed():RangeSet;
|
|
194
|
-
/**
|
|
195
|
-
* The ordered set of row indexes added since the last update.
|
|
196
|
-
* @return the rangeset of rows added
|
|
197
|
-
*/
|
|
198
|
-
get added():RangeSet;
|
|
199
|
-
get columns():Array<Column>;
|
|
200
|
-
/**
|
|
201
|
-
* The ordered set of row indexes updated since the last update
|
|
202
|
-
* @return the rnageset of modified rows
|
|
203
|
-
*/
|
|
204
|
-
get modified():RangeSet;
|
|
205
|
-
/**
|
|
206
|
-
* A lazily computed array of all rows available on the client.
|
|
207
|
-
*/
|
|
208
|
-
get rows():Array<Row>;
|
|
209
|
-
}
|
|
210
120
|
/**
|
|
211
121
|
* Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
|
|
212
122
|
* on tables, data in trees, and snapshots.
|
|
@@ -243,48 +153,6 @@ export namespace dh {
|
|
|
243
153
|
get rows():Array<Row>;
|
|
244
154
|
}
|
|
245
155
|
/**
|
|
246
|
-
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
247
|
-
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
248
|
-
* are correctly freed.
|
|
249
|
-
*/
|
|
250
|
-
export interface WidgetExportedObject {
|
|
251
|
-
/**
|
|
252
|
-
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
253
|
-
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
254
|
-
* {@link Widget.sendMessage}.
|
|
255
|
-
* @return the string type of this server-side object, or null.
|
|
256
|
-
*/
|
|
257
|
-
readonly type?:string|null;
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
261
|
-
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
262
|
-
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
263
|
-
*/
|
|
264
|
-
reexport():Promise<WidgetExportedObject>;
|
|
265
|
-
/**
|
|
266
|
-
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
267
|
-
* the same instance.
|
|
268
|
-
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
269
|
-
*/
|
|
270
|
-
fetch():Promise<any>;
|
|
271
|
-
/**
|
|
272
|
-
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
273
|
-
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
274
|
-
*/
|
|
275
|
-
close():void;
|
|
276
|
-
}
|
|
277
|
-
export interface LayoutHints {
|
|
278
|
-
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
279
|
-
|
|
280
|
-
get hiddenColumns():string[]|null;
|
|
281
|
-
get frozenColumns():string[]|null;
|
|
282
|
-
get columnGroups():ColumnGroup[]|null;
|
|
283
|
-
get areSavedLayoutsAllowed():boolean;
|
|
284
|
-
get frontColumns():string[]|null;
|
|
285
|
-
get backColumns():string[]|null;
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
156
|
* Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
289
157
|
*/
|
|
290
158
|
export interface LocalDateWrapper {
|
|
@@ -294,6 +162,26 @@ export namespace dh {
|
|
|
294
162
|
getDayOfMonth():number;
|
|
295
163
|
toString():string;
|
|
296
164
|
}
|
|
165
|
+
export interface HasEventHandling {
|
|
166
|
+
/**
|
|
167
|
+
* Listen for events on this object.
|
|
168
|
+
* @param name - the name of the event to listen for
|
|
169
|
+
* @param callback - a function to call when the event occurs
|
|
170
|
+
* @return Returns a cleanup function.
|
|
171
|
+
* @typeParam T - the type of the data that the event will provide
|
|
172
|
+
*/
|
|
173
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
174
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
175
|
+
hasListeners(name:string):boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Removes an event listener added to this table.
|
|
178
|
+
* @param name -
|
|
179
|
+
* @param callback -
|
|
180
|
+
* @return
|
|
181
|
+
* @typeParam T -
|
|
182
|
+
*/
|
|
183
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
184
|
+
}
|
|
297
185
|
/**
|
|
298
186
|
* Represents the contents of a single widget data message from the server, with a binary data paylod and exported
|
|
299
187
|
* objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
|
|
@@ -451,54 +339,239 @@ export namespace dh {
|
|
|
451
339
|
get isRefreshing():boolean;
|
|
452
340
|
}
|
|
453
341
|
/**
|
|
454
|
-
*
|
|
455
|
-
*
|
|
342
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
|
|
343
|
+
* request the viewport again.
|
|
456
344
|
*/
|
|
457
|
-
export interface
|
|
458
|
-
|
|
459
|
-
|
|
345
|
+
export interface ViewportRow extends Row {
|
|
346
|
+
get(column:Column):any;
|
|
347
|
+
getFormat(column:Column):Format;
|
|
348
|
+
get index():LongWrapper;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
352
|
+
*/
|
|
353
|
+
export interface LocalTimeWrapper {
|
|
354
|
+
valueOf():string;
|
|
355
|
+
getHour():number;
|
|
356
|
+
getMinute():number;
|
|
357
|
+
getSecond():number;
|
|
358
|
+
getNano():number;
|
|
359
|
+
toString():string;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
|
|
363
|
+
* used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
|
|
364
|
+
* are correctly freed.
|
|
365
|
+
*/
|
|
366
|
+
export interface WidgetExportedObject {
|
|
460
367
|
/**
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
466
|
-
* tables.</li>
|
|
467
|
-
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
468
|
-
* with errors if there is not exactly one.</li>
|
|
469
|
-
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
470
|
-
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
471
|
-
* </ul>
|
|
472
|
-
*
|
|
473
|
-
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
474
|
-
* <p>
|
|
475
|
-
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
476
|
-
* more guidance on picking a join operation.
|
|
477
|
-
* @deprecated Instead, call the specific method for the join type.
|
|
478
|
-
* @param joinType - The type of join to perform, see the list above.
|
|
479
|
-
* @param rightTable - The table to match to values in this table
|
|
480
|
-
* @param columnsToMatch - Columns that should match
|
|
481
|
-
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
482
|
-
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
483
|
-
* @return a promise that will resolve to the joined table
|
|
368
|
+
* Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
|
|
369
|
+
* null, this object cannot be fetched, but can be passed to the server, such as via
|
|
370
|
+
* {@link Widget.sendMessage}.
|
|
371
|
+
* @return the string type of this server-side object, or null.
|
|
484
372
|
*/
|
|
485
|
-
|
|
373
|
+
readonly type?:string|null;
|
|
374
|
+
|
|
486
375
|
/**
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
|
|
376
|
+
* Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
|
|
377
|
+
* was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
|
|
378
|
+
* @return a promise returning a reexported copy of this object, still referencing the same server-side object.
|
|
379
|
+
*/
|
|
380
|
+
reexport():Promise<WidgetExportedObject>;
|
|
381
|
+
/**
|
|
382
|
+
* Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
|
|
383
|
+
* the same instance.
|
|
384
|
+
* @return a promise that will resolve to a client side object that represents the reference on the server.
|
|
385
|
+
*/
|
|
386
|
+
fetch():Promise<any>;
|
|
387
|
+
/**
|
|
388
|
+
* Releases the server-side resources associated with this object, regardless of whether other client-side objects
|
|
389
|
+
* exist that also use that object. Should not be called after fetch() has been invoked.
|
|
390
|
+
*/
|
|
391
|
+
close():void;
|
|
392
|
+
}
|
|
393
|
+
export interface ColumnGroup {
|
|
394
|
+
get name():string|null;
|
|
395
|
+
get children():string[]|null;
|
|
396
|
+
get color():string|null;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
|
|
400
|
+
* details about the event.
|
|
401
|
+
* @typeParam T - the type of the event detail
|
|
402
|
+
*/
|
|
403
|
+
export interface Event<T> {
|
|
404
|
+
get detail():T;
|
|
405
|
+
get type():string;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
|
|
409
|
+
* columns) either by index, or scanning the complete present index.
|
|
410
|
+
* <p>
|
|
411
|
+
* This class supports two ways of reading the table - checking the changes made since the last update, and reading all
|
|
412
|
+
* data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
|
|
413
|
+
* in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
|
|
414
|
+
* options should be considered.
|
|
415
|
+
* <p>
|
|
416
|
+
* The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
|
|
417
|
+
* necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
|
|
418
|
+
* track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
|
|
419
|
+
* specific rows or cells out of the table.
|
|
420
|
+
*/
|
|
421
|
+
export interface SubscriptionTableData extends TableData {
|
|
422
|
+
get fullIndex():RangeSet;
|
|
423
|
+
/**
|
|
424
|
+
* The ordered set of row indexes removed since the last update
|
|
425
|
+
* @return the rangeset of removed rows
|
|
426
|
+
*/
|
|
427
|
+
get removed():RangeSet;
|
|
428
|
+
/**
|
|
429
|
+
* The ordered set of row indexes added since the last update.
|
|
430
|
+
* @return the rangeset of rows added
|
|
431
|
+
*/
|
|
432
|
+
get added():RangeSet;
|
|
433
|
+
get columns():Array<Column>;
|
|
434
|
+
/**
|
|
435
|
+
* The ordered set of row indexes updated since the last update
|
|
436
|
+
* @return the rnageset of modified rows
|
|
437
|
+
*/
|
|
438
|
+
get modified():RangeSet;
|
|
439
|
+
/**
|
|
440
|
+
* A lazily computed array of all rows available on the client.
|
|
441
|
+
*/
|
|
442
|
+
get rows():Array<Row>;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* This object may be pooled internally or discarded and not updated. Do not retain references to it.
|
|
446
|
+
*/
|
|
447
|
+
export interface Format {
|
|
448
|
+
/**
|
|
449
|
+
* The format string to apply to the value of this cell.
|
|
450
|
+
* @return String
|
|
451
|
+
*/
|
|
452
|
+
readonly formatString?:string|null;
|
|
453
|
+
/**
|
|
454
|
+
* Color to apply to the cell's background, in <b>#rrggbb</b> format.
|
|
455
|
+
* @return String
|
|
456
|
+
*/
|
|
457
|
+
readonly backgroundColor?:string|null;
|
|
458
|
+
/**
|
|
459
|
+
* Color to apply to the text, in <b>#rrggbb</b> format.
|
|
460
|
+
* @return String
|
|
461
|
+
*/
|
|
462
|
+
readonly color?:string|null;
|
|
463
|
+
/**
|
|
464
|
+
*
|
|
465
|
+
* @deprecated Prefer formatString. Number format string to apply to the value in this cell.
|
|
466
|
+
*/
|
|
467
|
+
readonly numberFormat?:string|null;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Row implementation that also provides additional read-only properties. represents visible rows in the table, but
|
|
471
|
+
* with additional properties to reflect the tree structure.
|
|
472
|
+
*/
|
|
473
|
+
export interface TreeRow extends Row {
|
|
474
|
+
get(column:Column):any;
|
|
475
|
+
getFormat(column:Column):Format;
|
|
476
|
+
/**
|
|
477
|
+
* True if this node is currently expanded to show its children; false otherwise. Those children will be the
|
|
478
|
+
* rows below this one with a greater depth than this one.
|
|
479
|
+
* @return boolean
|
|
480
|
+
*/
|
|
481
|
+
get isExpanded():boolean;
|
|
482
|
+
/**
|
|
483
|
+
* The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
|
|
484
|
+
* and its expand/collapse icon.
|
|
485
|
+
* @return int
|
|
486
|
+
*/
|
|
487
|
+
get depth():number;
|
|
488
|
+
/**
|
|
489
|
+
* True if this node has children and can be expanded; false otherwise. Note that this value may change when the
|
|
490
|
+
* table updates, depending on the table's configuration.
|
|
491
|
+
* @return boolean
|
|
492
|
+
*/
|
|
493
|
+
get hasChildren():boolean;
|
|
494
|
+
get index():LongWrapper;
|
|
495
|
+
}
|
|
496
|
+
export interface RefreshToken {
|
|
497
|
+
get bytes():string;
|
|
498
|
+
get expiry():number;
|
|
499
|
+
}
|
|
500
|
+
export interface LayoutHints {
|
|
501
|
+
readonly searchDisplayMode?:SearchDisplayModeType|null;
|
|
502
|
+
|
|
503
|
+
get hiddenColumns():string[]|null;
|
|
504
|
+
get frozenColumns():string[]|null;
|
|
505
|
+
get columnGroups():ColumnGroup[]|null;
|
|
506
|
+
get areSavedLayoutsAllowed():boolean;
|
|
507
|
+
get frontColumns():string[]|null;
|
|
508
|
+
get backColumns():string[]|null;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Similar to {@link dh.ViewportData}, but with additional properties to reflect
|
|
512
|
+
* the tree structure.
|
|
513
|
+
*/
|
|
514
|
+
export interface TreeViewportData extends TableData {
|
|
515
|
+
get(index:LongWrapper|number):TreeRow;
|
|
516
|
+
getData(index:LongWrapper|number, column:Column):any;
|
|
517
|
+
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
518
|
+
get treeSize():number;
|
|
519
|
+
/**
|
|
520
|
+
* The position of the first returned row within the tree.
|
|
521
|
+
*/
|
|
522
|
+
get offset():number;
|
|
523
|
+
get columns():Array<Column>;
|
|
524
|
+
get rows():Array<TreeRow>;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
|
|
528
|
+
* {@link dh.TotalsTable}.
|
|
529
|
+
*/
|
|
530
|
+
export interface JoinableTable {
|
|
531
|
+
freeze():Promise<Table>;
|
|
532
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
533
|
+
/**
|
|
534
|
+
* Joins this table to the provided table, using one of the specified join types:
|
|
535
|
+
* <ul>
|
|
536
|
+
* <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
|
|
537
|
+
* provided matching rule.</li>
|
|
538
|
+
* <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
|
|
539
|
+
* tables.</li>
|
|
540
|
+
* <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
|
|
541
|
+
* with errors if there is not exactly one.</li>
|
|
542
|
+
* <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
|
|
543
|
+
* with nulls if there is no match or errors if there are multiple matches.</li>
|
|
544
|
+
* </ul>
|
|
545
|
+
*
|
|
546
|
+
* Note that <code>Left</code> join is not supported here, unlike DHE.
|
|
547
|
+
* <p>
|
|
548
|
+
* See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
|
|
549
|
+
* more guidance on picking a join operation.
|
|
550
|
+
* @deprecated Instead, call the specific method for the join type.
|
|
551
|
+
* @param joinType - The type of join to perform, see the list above.
|
|
552
|
+
* @param rightTable - The table to match to values in this table
|
|
553
|
+
* @param columnsToMatch - Columns that should match
|
|
554
|
+
* @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
|
|
555
|
+
* @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
|
|
556
|
+
* @return a promise that will resolve to the joined table
|
|
557
|
+
*/
|
|
558
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
559
|
+
/**
|
|
560
|
+
* Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
|
|
561
|
+
* row from the right table.
|
|
562
|
+
* <p>
|
|
563
|
+
* The `asOfMatchRule` value can be one of:
|
|
564
|
+
* <ul>
|
|
565
|
+
* <li>LESS_THAN_EQUAL</li>
|
|
566
|
+
* <li>LESS_THAN</li>
|
|
567
|
+
* <li>GREATER_THAN_EQUAL</li>
|
|
568
|
+
* <li>GREATER_THAN</li>
|
|
569
|
+
* </ul>
|
|
570
|
+
* @param rightTable - the table to match to values in this table
|
|
571
|
+
* @param columnsToMatch - the columns that should match, according to the asOfMatchRole
|
|
572
|
+
* @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
|
|
573
|
+
* columns
|
|
574
|
+
* @param asOfMatchRule - the match rule to use, see above
|
|
502
575
|
* @return a promise that will resolve to the joined table
|
|
503
576
|
*/
|
|
504
577
|
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
@@ -540,22 +613,6 @@ export namespace dh {
|
|
|
540
613
|
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
|
|
541
614
|
}
|
|
542
615
|
/**
|
|
543
|
-
* Similar to {@link dh.ViewportData}, but with additional properties to reflect
|
|
544
|
-
* the tree structure.
|
|
545
|
-
*/
|
|
546
|
-
export interface TreeViewportData extends TableData {
|
|
547
|
-
get(index:LongWrapper|number):TreeRow;
|
|
548
|
-
getData(index:LongWrapper|number, column:Column):any;
|
|
549
|
-
getFormat(index:LongWrapper|number, column:Column):Format;
|
|
550
|
-
get treeSize():number;
|
|
551
|
-
/**
|
|
552
|
-
* The position of the first returned row within the tree.
|
|
553
|
-
*/
|
|
554
|
-
get offset():number;
|
|
555
|
-
get columns():Array<Column>;
|
|
556
|
-
get rows():Array<TreeRow>;
|
|
557
|
-
}
|
|
558
|
-
/**
|
|
559
616
|
* Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
|
|
560
617
|
* ViewportData also contains the offset to this data, so that the actual row number may be determined.
|
|
561
618
|
* <p>
|
|
@@ -578,6 +635,14 @@ export namespace dh {
|
|
|
578
635
|
get columns():Array<Column>;
|
|
579
636
|
get rows():Array<ViewportRow>;
|
|
580
637
|
}
|
|
638
|
+
export interface WorkerHeapInfo {
|
|
639
|
+
/**
|
|
640
|
+
* Total heap size available for this worker.
|
|
641
|
+
*/
|
|
642
|
+
get totalHeapSize():number;
|
|
643
|
+
get freeMemory():number;
|
|
644
|
+
get maximumHeapSize():number;
|
|
645
|
+
}
|
|
581
646
|
/**
|
|
582
647
|
* Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
|
|
583
648
|
* not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
|
|
@@ -588,48 +653,142 @@ export namespace dh {
|
|
|
588
653
|
getFormat(column:Column):Format;
|
|
589
654
|
get index():LongWrapper;
|
|
590
655
|
}
|
|
591
|
-
export interface ColumnGroup {
|
|
592
|
-
get name():string|null;
|
|
593
|
-
get children():string[]|null;
|
|
594
|
-
get color():string|null;
|
|
595
|
-
}
|
|
596
656
|
/**
|
|
597
|
-
*
|
|
598
|
-
* with additional properties to reflect the tree structure.
|
|
657
|
+
* Represents statistics for a given table column.
|
|
599
658
|
*/
|
|
600
|
-
export interface
|
|
601
|
-
get(column:Column):any;
|
|
602
|
-
getFormat(column:Column):Format;
|
|
659
|
+
export interface ColumnStatistics {
|
|
603
660
|
/**
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
661
|
+
* Gets the type of formatting that should be used for given statistic.
|
|
662
|
+
* <p>
|
|
663
|
+
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
664
|
+
* @param name - the display name of the statistic
|
|
665
|
+
* @return String
|
|
607
666
|
*/
|
|
608
|
-
|
|
667
|
+
getType(name:string):string;
|
|
609
668
|
/**
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
669
|
+
* 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
|
|
670
|
+
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
671
|
+
* than 19 unique values.
|
|
672
|
+
* @return Map of String double
|
|
613
673
|
*/
|
|
614
|
-
get
|
|
674
|
+
get uniqueValues():Map<string, number>;
|
|
615
675
|
/**
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
*
|
|
676
|
+
* Gets a map with the display name of statistics as keys and the numeric stat as a value.
|
|
677
|
+
* <p>
|
|
678
|
+
* A map of each statistic's name to its value.
|
|
679
|
+
* @return Map of String and Object
|
|
619
680
|
*/
|
|
620
|
-
get
|
|
621
|
-
get index():LongWrapper;
|
|
681
|
+
get statisticsMap():Map<string, object>;
|
|
622
682
|
}
|
|
683
|
+
|
|
623
684
|
/**
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
685
|
+
* Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
|
|
686
|
+
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
687
|
+
* methods return a new Sort instance.
|
|
627
688
|
*/
|
|
628
|
-
export
|
|
629
|
-
|
|
630
|
-
|
|
689
|
+
export class Sort {
|
|
690
|
+
static readonly ASCENDING:string;
|
|
691
|
+
static readonly DESCENDING:string;
|
|
692
|
+
static readonly REVERSE:string;
|
|
693
|
+
|
|
694
|
+
protected constructor();
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Builds a Sort instance to sort values in ascending order.
|
|
698
|
+
* @return {@link dh.Sort}
|
|
699
|
+
*/
|
|
700
|
+
asc():Sort;
|
|
701
|
+
/**
|
|
702
|
+
* Builds a Sort instance to sort values in descending order.
|
|
703
|
+
* @return {@link dh.Sort}
|
|
704
|
+
*/
|
|
705
|
+
desc():Sort;
|
|
706
|
+
/**
|
|
707
|
+
* Builds a Sort instance which takes the absolute value before applying order.
|
|
708
|
+
* @return {@link dh.Sort}
|
|
709
|
+
*/
|
|
710
|
+
abs():Sort;
|
|
711
|
+
toString():string;
|
|
712
|
+
/**
|
|
713
|
+
* True if the absolute value of the column should be used when sorting; defaults to false.
|
|
714
|
+
* @return boolean
|
|
715
|
+
*/
|
|
716
|
+
get isAbs():boolean;
|
|
717
|
+
/**
|
|
718
|
+
* The column which is sorted.
|
|
719
|
+
* @return {@link dh.Column}
|
|
720
|
+
*/
|
|
721
|
+
get column():Column;
|
|
722
|
+
/**
|
|
723
|
+
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
724
|
+
* @return String
|
|
725
|
+
*/
|
|
726
|
+
get direction():string;
|
|
631
727
|
}
|
|
632
|
-
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
731
|
+
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
732
|
+
*/
|
|
733
|
+
export class IdeConnection implements HasEventHandling {
|
|
734
|
+
/**
|
|
735
|
+
* @deprecated
|
|
736
|
+
*/
|
|
737
|
+
static readonly HACK_CONNECTION_FAILURE:string;
|
|
738
|
+
static readonly EVENT_DISCONNECT:string;
|
|
739
|
+
static readonly EVENT_RECONNECT:string;
|
|
740
|
+
static readonly EVENT_SHUTDOWN:string;
|
|
741
|
+
|
|
742
|
+
protected constructor();
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Closes the current connection, releasing any resources on the server or client.
|
|
746
|
+
*/
|
|
747
|
+
close():void;
|
|
748
|
+
running():Promise<IdeConnection>;
|
|
749
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
750
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
751
|
+
/**
|
|
752
|
+
* Makes an `object` available to another user or another client on this same server which knows the value of
|
|
753
|
+
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
754
|
+
* which knows this value can read the same object.
|
|
755
|
+
* <p>
|
|
756
|
+
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
757
|
+
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
758
|
+
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
759
|
+
* <p>
|
|
760
|
+
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
761
|
+
* prevent access by unauthorized clients.
|
|
762
|
+
* @param object - the object to share with another client/user
|
|
763
|
+
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
764
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
765
|
+
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
766
|
+
* by another client, or will reject if an error occurs.
|
|
767
|
+
*/
|
|
768
|
+
shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
|
|
769
|
+
/**
|
|
770
|
+
* Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
|
|
771
|
+
* client releases this object (or their session ends), the object will be available on the server.
|
|
772
|
+
* <p>
|
|
773
|
+
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
774
|
+
* should provide this information.
|
|
775
|
+
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
776
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
777
|
+
* @param type - The type of the object, so it can be correctly read from the server
|
|
778
|
+
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
779
|
+
*/
|
|
780
|
+
getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
|
|
781
|
+
/**
|
|
782
|
+
* Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
|
|
783
|
+
* which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
|
|
784
|
+
* log messages as are presently available.
|
|
785
|
+
* @param callback -
|
|
786
|
+
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
787
|
+
*/
|
|
788
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
789
|
+
startSession(type:string):Promise<IdeSession>;
|
|
790
|
+
getConsoleTypes():Promise<Array<string>>;
|
|
791
|
+
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
633
792
|
/**
|
|
634
793
|
* Listen for events on this object.
|
|
635
794
|
* @param name - the name of the event to listen for
|
|
@@ -649,416 +808,386 @@ export namespace dh {
|
|
|
649
808
|
*/
|
|
650
809
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
651
810
|
}
|
|
652
|
-
|
|
653
|
-
get bytes():string;
|
|
654
|
-
get expiry():number;
|
|
655
|
-
}
|
|
811
|
+
|
|
656
812
|
/**
|
|
657
|
-
*
|
|
813
|
+
* Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
|
|
814
|
+
*
|
|
815
|
+
* Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
|
|
816
|
+
* an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
|
|
817
|
+
* value can be provided describing the strategy the engine should use when grouping the rows.
|
|
658
818
|
*/
|
|
659
|
-
export
|
|
819
|
+
export class TreeTableConfig {
|
|
660
820
|
/**
|
|
661
|
-
*
|
|
662
|
-
* <p>
|
|
663
|
-
* the format type for a statistic. A null return value means that the column formatting should be used.
|
|
664
|
-
* @param name - the display name of the statistic
|
|
665
|
-
* @return String
|
|
821
|
+
* The column representing the unique ID for each item
|
|
666
822
|
*/
|
|
667
|
-
|
|
823
|
+
idColumn:string;
|
|
668
824
|
/**
|
|
669
|
-
*
|
|
670
|
-
* name to the count of how many times it occurred in the column. This map will be empty for tables containing more
|
|
671
|
-
* than 19 unique values.
|
|
672
|
-
* @return Map of String double
|
|
825
|
+
* The column representing the parent ID for each item
|
|
673
826
|
*/
|
|
674
|
-
|
|
827
|
+
parentColumn:string;
|
|
675
828
|
/**
|
|
676
|
-
*
|
|
677
|
-
* <p>
|
|
678
|
-
* A map of each statistic's name to its value.
|
|
679
|
-
* @return Map of String and Object
|
|
829
|
+
* Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
|
|
680
830
|
*/
|
|
681
|
-
|
|
831
|
+
promoteOrphansToRoot:boolean;
|
|
832
|
+
|
|
833
|
+
constructor();
|
|
682
834
|
}
|
|
683
835
|
|
|
684
836
|
/**
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
689
|
-
* instance.
|
|
837
|
+
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
838
|
+
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
839
|
+
* inform the UI right away that they have taken place.
|
|
690
840
|
*/
|
|
691
|
-
export class
|
|
692
|
-
|
|
693
|
-
|
|
841
|
+
export class Table implements JoinableTable, HasEventHandling {
|
|
842
|
+
readonly description?:string|null;
|
|
843
|
+
readonly pluginName?:string|null;
|
|
844
|
+
readonly layoutHints?:null|LayoutHints;
|
|
694
845
|
/**
|
|
695
|
-
*
|
|
696
|
-
* {@link TableData.get} for DateTime values. To create
|
|
697
|
-
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
698
|
-
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
699
|
-
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
700
|
-
* @param input - the number to wrap as a FilterValue
|
|
701
|
-
* @return an immutable FilterValue that can be built into a filter
|
|
846
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
702
847
|
*/
|
|
703
|
-
static
|
|
848
|
+
static readonly EVENT_SIZECHANGED:string;
|
|
704
849
|
/**
|
|
705
|
-
*
|
|
706
|
-
* @param term -
|
|
707
|
-
* @return {@link dh.FilterCondition}
|
|
850
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
708
851
|
*/
|
|
709
|
-
|
|
852
|
+
static readonly EVENT_UPDATED:string;
|
|
710
853
|
/**
|
|
711
|
-
*
|
|
712
|
-
* vs lower case
|
|
713
|
-
* @param term -
|
|
714
|
-
* @return {@link dh.FilterCondition}
|
|
854
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
715
855
|
*/
|
|
716
|
-
|
|
856
|
+
static readonly EVENT_ROWADDED:string;
|
|
717
857
|
/**
|
|
718
|
-
*
|
|
719
|
-
* @param term -
|
|
720
|
-
* @return {@link dh.FilterCondition}
|
|
858
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
721
859
|
*/
|
|
722
|
-
|
|
860
|
+
static readonly EVENT_ROWREMOVED:string;
|
|
723
861
|
/**
|
|
724
|
-
*
|
|
725
|
-
* upper vs lower case
|
|
726
|
-
* @param term -
|
|
727
|
-
* @return {@link dh.FilterCondition}
|
|
862
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
728
863
|
*/
|
|
729
|
-
|
|
864
|
+
static readonly EVENT_ROWUPDATED:string;
|
|
730
865
|
/**
|
|
731
|
-
*
|
|
732
|
-
* @param term -
|
|
733
|
-
* @return {@link dh.FilterCondition}
|
|
866
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
734
867
|
*/
|
|
735
|
-
|
|
868
|
+
static readonly EVENT_SORTCHANGED:string;
|
|
736
869
|
/**
|
|
737
|
-
*
|
|
738
|
-
* @param term -
|
|
739
|
-
* @return {@link dh.FilterCondition}
|
|
870
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
740
871
|
*/
|
|
741
|
-
|
|
872
|
+
static readonly EVENT_FILTERCHANGED:string;
|
|
742
873
|
/**
|
|
743
|
-
*
|
|
744
|
-
* @param term -
|
|
745
|
-
* @return {@link dh.FilterCondition}
|
|
874
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
746
875
|
*/
|
|
747
|
-
|
|
876
|
+
static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
|
|
748
877
|
/**
|
|
749
|
-
*
|
|
750
|
-
* @param term -
|
|
751
|
-
* @return {@link dh.FilterCondition}
|
|
878
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
752
879
|
*/
|
|
753
|
-
|
|
880
|
+
static readonly EVENT_DISCONNECT:string;
|
|
754
881
|
/**
|
|
755
|
-
*
|
|
756
|
-
* @param terms -
|
|
757
|
-
* @return {@link dh.FilterCondition}
|
|
882
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
758
883
|
*/
|
|
759
|
-
|
|
884
|
+
static readonly EVENT_RECONNECT:string;
|
|
760
885
|
/**
|
|
761
|
-
*
|
|
762
|
-
* lower case
|
|
763
|
-
* @param terms -
|
|
764
|
-
* @return {@link dh.FilterCondition}
|
|
886
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
765
887
|
*/
|
|
766
|
-
|
|
888
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
767
889
|
/**
|
|
768
|
-
*
|
|
769
|
-
* @param terms -
|
|
770
|
-
* @return {@link dh.FilterCondition}
|
|
890
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
771
891
|
*/
|
|
772
|
-
|
|
892
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
773
893
|
/**
|
|
774
|
-
*
|
|
775
|
-
* upper vs lower case
|
|
776
|
-
* @param terms -
|
|
777
|
-
* @return {@link dh.FilterCondition}
|
|
894
|
+
* The table size has updated, so live scrollbars and the like can be updated accordingly.
|
|
778
895
|
*/
|
|
779
|
-
|
|
896
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
780
897
|
/**
|
|
781
|
-
*
|
|
782
|
-
* @param term -
|
|
783
|
-
* @return {@link dh.FilterCondition}
|
|
898
|
+
* The size the table will have if it is uncoalesced.
|
|
784
899
|
*/
|
|
785
|
-
|
|
900
|
+
static readonly SIZE_UNCOALESCED:number;
|
|
901
|
+
|
|
902
|
+
protected constructor();
|
|
903
|
+
|
|
904
|
+
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
786
905
|
/**
|
|
787
|
-
* a
|
|
788
|
-
*
|
|
789
|
-
* @param
|
|
790
|
-
* @return {@link dh.
|
|
906
|
+
* Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
|
|
907
|
+
* caching a returned value.
|
|
908
|
+
* @param key -
|
|
909
|
+
* @return {@link dh.Column}
|
|
791
910
|
*/
|
|
792
|
-
|
|
911
|
+
findColumn(key:string):Column;
|
|
793
912
|
/**
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
* @
|
|
797
|
-
* @return {@link dh.FilterCondition}
|
|
913
|
+
* Retrieve multiple columns specified by the given names.
|
|
914
|
+
* @param keys -
|
|
915
|
+
* @return {@link dh.Column} array
|
|
798
916
|
*/
|
|
799
|
-
|
|
917
|
+
findColumns(keys:string[]):Column[];
|
|
918
|
+
isBlinkTable():boolean;
|
|
800
919
|
/**
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
* @
|
|
804
|
-
* @return {@link dh.FilterCondition}
|
|
920
|
+
* If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
|
|
921
|
+
* mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
|
|
922
|
+
* @return Promise of dh.InputTable
|
|
805
923
|
*/
|
|
806
|
-
|
|
924
|
+
inputTable():Promise<InputTable>;
|
|
807
925
|
/**
|
|
808
|
-
*
|
|
809
|
-
* @return {@link dh.FilterCondition}
|
|
926
|
+
* Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
|
|
810
927
|
*/
|
|
811
|
-
|
|
928
|
+
close():void;
|
|
929
|
+
getAttributes():string[];
|
|
812
930
|
/**
|
|
813
|
-
*
|
|
814
|
-
*
|
|
931
|
+
* null if no property exists, a string if it is an easily serializable property, or a ```Promise
|
|
932
|
+
* <Table>``` that will either resolve with a table or error out if the object can't be passed to JS.
|
|
933
|
+
* @param attributeName -
|
|
934
|
+
* @return Object
|
|
815
935
|
*/
|
|
816
|
-
|
|
936
|
+
getAttribute(attributeName:string):unknown|undefined|null;
|
|
817
937
|
/**
|
|
818
|
-
*
|
|
819
|
-
*
|
|
938
|
+
* Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
|
|
939
|
+
* immediately return the new value, but you may receive update events using the old sort before the new sort is
|
|
940
|
+
* applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
|
|
941
|
+
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
942
|
+
* not.
|
|
943
|
+
* @param sort -
|
|
944
|
+
* @return {@link dh.Sort} array
|
|
820
945
|
*/
|
|
821
|
-
|
|
946
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
822
947
|
/**
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
* <
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
*
|
|
830
|
-
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
831
|
-
* <p>
|
|
832
|
-
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
833
|
-
* </p>
|
|
834
|
-
* </li>
|
|
835
|
-
* </ul>
|
|
836
|
-
* @param method -
|
|
837
|
-
* @param args -
|
|
838
|
-
* @return
|
|
948
|
+
* Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
|
|
949
|
+
* will immediately return the new value, but you may receive update events using the old filter before the new one
|
|
950
|
+
* is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
|
|
951
|
+
* perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
|
|
952
|
+
* will not.
|
|
953
|
+
* @param filter -
|
|
954
|
+
* @return {@link dh.FilterCondition} array
|
|
839
955
|
*/
|
|
840
|
-
|
|
841
|
-
toString():string;
|
|
956
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
842
957
|
/**
|
|
843
|
-
*
|
|
844
|
-
* @param
|
|
845
|
-
* @return
|
|
958
|
+
* used when adding new filter and sort operations to the table, as long as they are present.
|
|
959
|
+
* @param customColumns -
|
|
960
|
+
* @return {@link dh.CustomColumn} array
|
|
846
961
|
*/
|
|
847
|
-
|
|
962
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
848
963
|
/**
|
|
849
|
-
*
|
|
850
|
-
*
|
|
851
|
-
*
|
|
964
|
+
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
965
|
+
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
966
|
+
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
967
|
+
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
968
|
+
* needed.
|
|
969
|
+
* @param firstRow -
|
|
970
|
+
* @param lastRow -
|
|
971
|
+
* @param columns -
|
|
972
|
+
* @param updateIntervalMs -
|
|
973
|
+
* @return {@link dh.TableViewportSubscription}
|
|
852
974
|
*/
|
|
853
|
-
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
859
|
-
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
860
|
-
*
|
|
861
|
-
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
862
|
-
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
863
|
-
* forward data to it.
|
|
864
|
-
*
|
|
865
|
-
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
866
|
-
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
867
|
-
* viewports to make it less expensive to compute for large tables.
|
|
868
|
-
*/
|
|
869
|
-
export class TableSubscription implements HasEventHandling {
|
|
870
|
-
protected constructor();
|
|
871
|
-
|
|
975
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
|
|
872
976
|
/**
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
*
|
|
977
|
+
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
978
|
+
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
979
|
+
* separate the lifespan of this promise from the table itself, call
|
|
980
|
+
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
981
|
+
* @return Promise of {@link dh.TableData}
|
|
876
982
|
*/
|
|
877
|
-
|
|
878
|
-
get columns():Array<Column>;
|
|
983
|
+
getViewportData():Promise<ViewportData>;
|
|
879
984
|
/**
|
|
880
|
-
*
|
|
985
|
+
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
986
|
+
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
987
|
+
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
988
|
+
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
989
|
+
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
990
|
+
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
991
|
+
* @param columns -
|
|
992
|
+
* @param updateIntervalMs -
|
|
993
|
+
* @return {@link dh.TableSubscription}
|
|
881
994
|
*/
|
|
882
|
-
|
|
995
|
+
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
883
996
|
/**
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
* @
|
|
888
|
-
* @
|
|
997
|
+
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
998
|
+
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
999
|
+
* order of appearance of values from the original table.
|
|
1000
|
+
* @param columns -
|
|
1001
|
+
* @return Promise of dh.Table
|
|
889
1002
|
*/
|
|
890
|
-
|
|
891
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
892
|
-
hasListeners(name:string):boolean;
|
|
1003
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
893
1004
|
/**
|
|
894
|
-
*
|
|
895
|
-
* @
|
|
896
|
-
* @param callback -
|
|
897
|
-
* @return
|
|
898
|
-
* @typeParam T -
|
|
1005
|
+
* Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1006
|
+
* @return Promise of dh.Table
|
|
899
1007
|
*/
|
|
900
|
-
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
/**
|
|
904
|
-
* Event fired when a command is issued from the client.
|
|
905
|
-
*/
|
|
906
|
-
export class CommandInfo {
|
|
907
|
-
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
908
|
-
|
|
909
|
-
get result():Promise<dh.ide.CommandResult>;
|
|
910
|
-
get code():string;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
export class CustomColumn {
|
|
914
|
-
static readonly TYPE_FORMAT_COLOR:string;
|
|
915
|
-
static readonly TYPE_FORMAT_NUMBER:string;
|
|
916
|
-
static readonly TYPE_FORMAT_DATE:string;
|
|
917
|
-
static readonly TYPE_NEW:string;
|
|
918
|
-
|
|
919
|
-
protected constructor();
|
|
920
|
-
|
|
921
|
-
valueOf():string;
|
|
922
|
-
toString():string;
|
|
1008
|
+
copy():Promise<Table>;
|
|
923
1009
|
/**
|
|
924
|
-
*
|
|
925
|
-
*
|
|
1010
|
+
* a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
|
|
1011
|
+
* a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
|
|
1012
|
+
* necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
|
|
1013
|
+
* called on it when not in use.
|
|
1014
|
+
* @param config -
|
|
1015
|
+
* @return Promise of dh.TotalsTable
|
|
926
1016
|
*/
|
|
927
|
-
|
|
1017
|
+
getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
928
1018
|
/**
|
|
929
|
-
*
|
|
930
|
-
*
|
|
1019
|
+
* a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
|
|
1020
|
+
* above for more specifics.
|
|
1021
|
+
* @param config -
|
|
1022
|
+
* @return promise of dh.TotalsTable
|
|
931
1023
|
*/
|
|
932
|
-
|
|
1024
|
+
getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
|
|
933
1025
|
/**
|
|
934
|
-
*
|
|
935
|
-
*
|
|
936
|
-
*
|
|
937
|
-
*
|
|
938
|
-
* <li>FORMAT_NUMBER</li>
|
|
939
|
-
* <li>FORMAT_DATE</li>
|
|
940
|
-
* <li>NEW</li>
|
|
941
|
-
* </ul>
|
|
942
|
-
* @return String
|
|
1026
|
+
* a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
|
|
1027
|
+
* each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
|
|
1028
|
+
* @param configObject -
|
|
1029
|
+
* @return Promise of dh.TreeTable
|
|
943
1030
|
*/
|
|
944
|
-
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
949
|
-
* roll-up table.
|
|
950
|
-
*/
|
|
951
|
-
export class RollupConfig {
|
|
1031
|
+
rollup(configObject:RollupConfig):Promise<TreeTable>;
|
|
952
1032
|
/**
|
|
953
|
-
*
|
|
1033
|
+
* a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
|
|
1034
|
+
* new `TreeTable` which must have close() called on it when not in use.
|
|
1035
|
+
* @param configObject -
|
|
1036
|
+
* @return Promise dh.TreeTable
|
|
954
1037
|
*/
|
|
955
|
-
|
|
1038
|
+
treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
|
|
956
1039
|
/**
|
|
957
|
-
*
|
|
958
|
-
*
|
|
1040
|
+
* a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
|
|
1041
|
+
* table will not update. This does not change the original table, and the new table will not have any of the client
|
|
1042
|
+
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1043
|
+
* @return Promise of dh.Table
|
|
959
1044
|
*/
|
|
960
|
-
|
|
1045
|
+
freeze():Promise<Table>;
|
|
1046
|
+
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
961
1047
|
/**
|
|
962
|
-
*
|
|
963
|
-
*
|
|
964
|
-
*
|
|
965
|
-
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
1048
|
+
*
|
|
1049
|
+
* @inheritDoc
|
|
1050
|
+
* @deprecated
|
|
966
1051
|
*/
|
|
967
|
-
|
|
968
|
-
|
|
1052
|
+
join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1053
|
+
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1054
|
+
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1055
|
+
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1056
|
+
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1057
|
+
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
969
1058
|
/**
|
|
970
|
-
*
|
|
1059
|
+
* Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
|
|
1060
|
+
* keys.
|
|
1061
|
+
* @param keys -
|
|
1062
|
+
* @param dropKeys -
|
|
1063
|
+
* @return Promise dh.PartitionedTable
|
|
971
1064
|
*/
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
constructor();
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
/**
|
|
978
|
-
* Deprecated for use in Deephaven Core.
|
|
979
|
-
* @deprecated
|
|
980
|
-
*/
|
|
981
|
-
export class Client {
|
|
982
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
983
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
984
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
985
|
-
|
|
986
|
-
constructor();
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
/**
|
|
990
|
-
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
991
|
-
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
992
|
-
* instance.
|
|
993
|
-
*/
|
|
994
|
-
export class FilterCondition {
|
|
995
|
-
protected constructor();
|
|
996
|
-
|
|
1065
|
+
partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
997
1066
|
/**
|
|
998
|
-
* the
|
|
999
|
-
* @
|
|
1067
|
+
* a promise that will resolve to ColumnStatistics for the column of this table.
|
|
1068
|
+
* @param column -
|
|
1069
|
+
* @return Promise of dh.ColumnStatistics
|
|
1000
1070
|
*/
|
|
1001
|
-
|
|
1071
|
+
getColumnStatistics(column:Column):Promise<ColumnStatistics>;
|
|
1002
1072
|
/**
|
|
1003
|
-
*
|
|
1004
|
-
* @param
|
|
1005
|
-
* @
|
|
1073
|
+
* Seek the row matching the data provided
|
|
1074
|
+
* @param startingRow - Row to start the seek from
|
|
1075
|
+
* @param column - Column to seek for value on
|
|
1076
|
+
* @param valueType - Type of value provided
|
|
1077
|
+
* @param seekValue - Value to seek
|
|
1078
|
+
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1079
|
+
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1080
|
+
* `false`.
|
|
1081
|
+
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1082
|
+
* @return A promise that resolves to the row value found.
|
|
1006
1083
|
*/
|
|
1007
|
-
|
|
1084
|
+
seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
|
|
1085
|
+
toString():string;
|
|
1008
1086
|
/**
|
|
1009
|
-
* a
|
|
1010
|
-
*
|
|
1011
|
-
* @return
|
|
1087
|
+
* True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
|
|
1088
|
+
* .inputTable() to add or remove data from the underlying table.
|
|
1089
|
+
* @return boolean
|
|
1012
1090
|
*/
|
|
1013
|
-
|
|
1091
|
+
get hasInputTable():boolean;
|
|
1014
1092
|
/**
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1093
|
+
* The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
|
|
1094
|
+
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
1095
|
+
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
1096
|
+
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
1097
|
+
* @return {@link dh.Column} array
|
|
1017
1098
|
*/
|
|
1018
|
-
toString():string;
|
|
1019
1099
|
get columns():Array<Column>;
|
|
1020
1100
|
/**
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
* <
|
|
1029
|
-
*
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
*
|
|
1034
|
-
* <
|
|
1035
|
-
*
|
|
1101
|
+
* The default configuration to be used when building a <b>TotalsTable</b> for this table.
|
|
1102
|
+
* @return dh.TotalsTableConfig
|
|
1103
|
+
*/
|
|
1104
|
+
get totalsTableConfig():TotalsTableConfig;
|
|
1105
|
+
/**
|
|
1106
|
+
* An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
|
|
1107
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1108
|
+
* for the <b>sortchanged</b> event to know when to update the UI.
|
|
1109
|
+
* @return {@link dh.Sort} array
|
|
1110
|
+
*/
|
|
1111
|
+
get sort():Array<Sort>;
|
|
1112
|
+
/**
|
|
1113
|
+
* An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
|
|
1114
|
+
* ones. To update, call <b>applyCustomColumns()</b>.
|
|
1115
|
+
* @return {@link dh.CustomColumn} array
|
|
1116
|
+
*/
|
|
1117
|
+
get customColumns():Array<CustomColumn>;
|
|
1118
|
+
/**
|
|
1119
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1120
|
+
* initial snapshot.
|
|
1121
|
+
* @return boolean
|
|
1122
|
+
*/
|
|
1123
|
+
get isRefreshing():boolean;
|
|
1124
|
+
/**
|
|
1125
|
+
* An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
|
|
1126
|
+
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1127
|
+
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
1128
|
+
* @return {@link dh.FilterCondition} array
|
|
1129
|
+
*/
|
|
1130
|
+
get filter():Array<FilterCondition>;
|
|
1131
|
+
/**
|
|
1132
|
+
* The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
|
|
1133
|
+
* will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
|
|
1134
|
+
* If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
|
|
1135
|
+
* @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
|
|
1136
|
+
*/
|
|
1137
|
+
get totalSize():number;
|
|
1138
|
+
/**
|
|
1139
|
+
* The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
|
|
1140
|
+
* the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
|
|
1141
|
+
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
1036
1142
|
* <p>
|
|
1037
|
-
*
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1040
|
-
* </li>
|
|
1041
|
-
* </ul>
|
|
1042
|
-
* @param function -
|
|
1043
|
-
* @param args -
|
|
1044
|
-
* @return dh.FilterCondition
|
|
1143
|
+
* When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
|
|
1144
|
+
* @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
|
|
1145
|
+
* uncoalesced.
|
|
1045
1146
|
*/
|
|
1046
|
-
|
|
1147
|
+
get size():number;
|
|
1047
1148
|
/**
|
|
1048
|
-
*
|
|
1049
|
-
*
|
|
1050
|
-
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1051
|
-
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1052
|
-
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1053
|
-
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1054
|
-
* {@link dh.Column.filter}).
|
|
1055
|
-
* @param value -
|
|
1056
|
-
* @param columns -
|
|
1057
|
-
* @return dh.FilterCondition
|
|
1149
|
+
* True if this table has been closed.
|
|
1150
|
+
* @return boolean
|
|
1058
1151
|
*/
|
|
1059
|
-
|
|
1152
|
+
get isClosed():boolean;
|
|
1153
|
+
/**
|
|
1154
|
+
* Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
|
|
1155
|
+
* <p>
|
|
1156
|
+
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
1157
|
+
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
1158
|
+
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
1159
|
+
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
1160
|
+
* for those columns, use {@link Table.selectDistinct}.
|
|
1161
|
+
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
1162
|
+
*/
|
|
1163
|
+
get isUncoalesced():boolean;
|
|
1164
|
+
/**
|
|
1165
|
+
* Listen for events on this object.
|
|
1166
|
+
* @param name - the name of the event to listen for
|
|
1167
|
+
* @param callback - a function to call when the event occurs
|
|
1168
|
+
* @return Returns a cleanup function.
|
|
1169
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1170
|
+
*/
|
|
1171
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1172
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1173
|
+
hasListeners(name:string):boolean;
|
|
1174
|
+
/**
|
|
1175
|
+
* Removes an event listener added to this table.
|
|
1176
|
+
* @param name -
|
|
1177
|
+
* @param callback -
|
|
1178
|
+
* @return
|
|
1179
|
+
* @typeParam T -
|
|
1180
|
+
*/
|
|
1181
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1182
|
+
/**
|
|
1183
|
+
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
1184
|
+
* do not support reverse.
|
|
1185
|
+
* @return {@link dh.Sort}
|
|
1186
|
+
*/
|
|
1187
|
+
static reverse():Sort;
|
|
1060
1188
|
}
|
|
1061
1189
|
|
|
1190
|
+
|
|
1062
1191
|
/**
|
|
1063
1192
|
* This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
|
|
1064
1193
|
* retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
|
|
@@ -1107,36 +1236,6 @@ export namespace dh {
|
|
|
1107
1236
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1108
1237
|
}
|
|
1109
1238
|
|
|
1110
|
-
/**
|
|
1111
|
-
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1112
|
-
*/
|
|
1113
|
-
export class BigDecimalWrapper {
|
|
1114
|
-
protected constructor();
|
|
1115
|
-
|
|
1116
|
-
static ofString(value:string):BigDecimalWrapper;
|
|
1117
|
-
asNumber():number;
|
|
1118
|
-
valueOf():string;
|
|
1119
|
-
toString():string;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
export class LongWrapper {
|
|
1123
|
-
protected constructor();
|
|
1124
|
-
|
|
1125
|
-
static ofString(str:string):LongWrapper;
|
|
1126
|
-
asNumber():number;
|
|
1127
|
-
valueOf():string;
|
|
1128
|
-
toString():string;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
export class QueryInfo {
|
|
1132
|
-
static readonly EVENT_TABLE_OPENED:string;
|
|
1133
|
-
static readonly EVENT_DISCONNECT:string;
|
|
1134
|
-
static readonly EVENT_RECONNECT:string;
|
|
1135
|
-
static readonly EVENT_CONNECT:string;
|
|
1136
|
-
|
|
1137
|
-
protected constructor();
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
1239
|
/**
|
|
1141
1240
|
* Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
|
|
1142
1241
|
* the server to get each Table. All tables will have the same structure.
|
|
@@ -1232,557 +1331,652 @@ export namespace dh {
|
|
|
1232
1331
|
}
|
|
1233
1332
|
|
|
1234
1333
|
/**
|
|
1235
|
-
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1239
|
-
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
1240
|
-
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
1241
|
-
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
1242
|
-
* before sending the next operation.
|
|
1243
|
-
*
|
|
1244
|
-
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
1245
|
-
*
|
|
1246
|
-
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
1247
|
-
* object.
|
|
1334
|
+
* Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
|
|
1335
|
+
* them. These instances are immutable - all operations that compose them to build bigger expressions return a new
|
|
1336
|
+
* instance.
|
|
1248
1337
|
*/
|
|
1249
|
-
export class
|
|
1338
|
+
export class FilterCondition {
|
|
1250
1339
|
protected constructor();
|
|
1251
1340
|
|
|
1252
1341
|
/**
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1255
|
-
* @param row -
|
|
1256
|
-
* @param userTimeZone -
|
|
1257
|
-
* @return Promise of dh.InputTable
|
|
1342
|
+
* the opposite of this condition
|
|
1343
|
+
* @return FilterCondition
|
|
1258
1344
|
*/
|
|
1259
|
-
|
|
1345
|
+
not():FilterCondition;
|
|
1260
1346
|
/**
|
|
1261
|
-
*
|
|
1262
|
-
* @param
|
|
1263
|
-
* @
|
|
1264
|
-
* @return Promise of dh.InputTable
|
|
1347
|
+
* a condition representing the current condition logically ANDed with the other parameters
|
|
1348
|
+
* @param filters -
|
|
1349
|
+
* @return FilterCondition
|
|
1265
1350
|
*/
|
|
1266
|
-
|
|
1351
|
+
and(...filters:FilterCondition[]):FilterCondition;
|
|
1267
1352
|
/**
|
|
1268
|
-
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
1272
|
-
* @param tableToAdd -
|
|
1273
|
-
* @return Promise of dh.InputTable
|
|
1353
|
+
* a condition representing the current condition logically ORed with the other parameters
|
|
1354
|
+
* @param filters -
|
|
1355
|
+
* @return FilterCondition.
|
|
1274
1356
|
*/
|
|
1275
|
-
|
|
1357
|
+
or(...filters:FilterCondition[]):FilterCondition;
|
|
1276
1358
|
/**
|
|
1277
|
-
*
|
|
1278
|
-
* @
|
|
1279
|
-
* @return Promise of dh.InputTable
|
|
1359
|
+
* a string suitable for debugging showing the details of this condition.
|
|
1360
|
+
* @return String.
|
|
1280
1361
|
*/
|
|
1281
|
-
|
|
1362
|
+
toString():string;
|
|
1363
|
+
get columns():Array<Column>;
|
|
1282
1364
|
/**
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1365
|
+
* a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
|
|
1366
|
+
* functions:
|
|
1367
|
+
* <ul>
|
|
1368
|
+
* <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
|
|
1369
|
+
* than the third</li>
|
|
1370
|
+
* <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
|
|
1371
|
+
* <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
|
|
1372
|
+
* <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
|
|
1373
|
+
* "not a number"</i></li>
|
|
1374
|
+
* <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
|
|
1375
|
+
* <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
|
|
1376
|
+
* <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
|
|
1377
|
+
* expression</li>
|
|
1378
|
+
* <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
|
|
1379
|
+
* <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
|
|
1380
|
+
* <p>
|
|
1381
|
+
* Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
|
|
1382
|
+
* method should be used in other cases
|
|
1383
|
+
* </p>
|
|
1384
|
+
* </li>
|
|
1385
|
+
* </ul>
|
|
1386
|
+
* @param function -
|
|
1387
|
+
* @param args -
|
|
1388
|
+
* @return dh.FilterCondition
|
|
1286
1389
|
*/
|
|
1287
|
-
|
|
1390
|
+
static invoke(func:string, ...args:FilterValue[]):FilterCondition;
|
|
1288
1391
|
/**
|
|
1289
|
-
*
|
|
1290
|
-
*
|
|
1291
|
-
*
|
|
1392
|
+
* a filter condition which will check if the given value can be found in any supported column on whatever table
|
|
1393
|
+
* this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
|
|
1394
|
+
* instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
|
|
1395
|
+
* number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
|
|
1396
|
+
* String columns, the given value will match any column which contains this string in a case-insensitive search. An
|
|
1397
|
+
* optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
|
|
1398
|
+
* {@link dh.Column.filter}).
|
|
1399
|
+
* @param value -
|
|
1400
|
+
* @param columns -
|
|
1401
|
+
* @return dh.FilterCondition
|
|
1292
1402
|
*/
|
|
1293
|
-
|
|
1403
|
+
static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
1408
|
+
* mechanism, and so reimplemented here.
|
|
1409
|
+
* <p>
|
|
1410
|
+
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
1411
|
+
* <p>
|
|
1412
|
+
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
1413
|
+
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
1414
|
+
* <p>
|
|
1415
|
+
* The table size will be -1 until a viewport has been fetched.
|
|
1416
|
+
* <p>
|
|
1417
|
+
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
1418
|
+
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
1419
|
+
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
1420
|
+
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
1421
|
+
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
1422
|
+
* the viewport).
|
|
1423
|
+
* <p>
|
|
1424
|
+
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
1425
|
+
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
1426
|
+
* <p>
|
|
1427
|
+
* <ul>
|
|
1428
|
+
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
1429
|
+
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
1430
|
+
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
1431
|
+
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
1432
|
+
* new operation is pending.</li>
|
|
1433
|
+
* <li>Custom columns are supported on Rollup tables, but not on Tree tables. If the TreeTable was created client-side,
|
|
1434
|
+
* the original Table can have custom columns applied, and the TreeTable can be recreated.</li>
|
|
1435
|
+
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
1436
|
+
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
1437
|
+
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
1438
|
+
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
1439
|
+
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
1440
|
+
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
1441
|
+
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
1442
|
+
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
1443
|
+
* where {@link TreeRowImpl.hasChildren} is false will be different from usual.</li>
|
|
1444
|
+
* </ul>
|
|
1445
|
+
*/
|
|
1446
|
+
export class TreeTable implements HasEventHandling {
|
|
1294
1447
|
/**
|
|
1295
|
-
*
|
|
1296
|
-
* @return String array.
|
|
1448
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1297
1449
|
*/
|
|
1298
|
-
|
|
1450
|
+
static readonly EVENT_UPDATED:string;
|
|
1299
1451
|
/**
|
|
1300
|
-
*
|
|
1301
|
-
* @return String array.
|
|
1452
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1302
1453
|
*/
|
|
1303
|
-
|
|
1454
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1304
1455
|
/**
|
|
1305
|
-
*
|
|
1306
|
-
* @return Column array.
|
|
1456
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1307
1457
|
*/
|
|
1308
|
-
|
|
1458
|
+
static readonly EVENT_RECONNECT:string;
|
|
1309
1459
|
/**
|
|
1310
|
-
*
|
|
1311
|
-
* @return {@link dh.Column} array.
|
|
1460
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1312
1461
|
*/
|
|
1313
|
-
|
|
1462
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1314
1463
|
/**
|
|
1315
|
-
*
|
|
1316
|
-
* @return dh.table
|
|
1464
|
+
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
1317
1465
|
*/
|
|
1318
|
-
get table():Table;
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
export class IdeSession implements HasEventHandling {
|
|
1322
|
-
static readonly EVENT_COMMANDSTARTED:string;
|
|
1323
1466
|
static readonly EVENT_REQUEST_FAILED:string;
|
|
1467
|
+
readonly description?:string|null;
|
|
1468
|
+
readonly layoutHints?:null|LayoutHints;
|
|
1324
1469
|
|
|
1325
1470
|
protected constructor();
|
|
1326
1471
|
|
|
1327
1472
|
/**
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1331
|
-
*
|
|
1473
|
+
* Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
|
|
1474
|
+
* row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
|
|
1475
|
+
* row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
|
|
1476
|
+
* boolean parameter.
|
|
1477
|
+
* @param row -
|
|
1478
|
+
* @param expandDescendants -
|
|
1332
1479
|
*/
|
|
1333
|
-
|
|
1480
|
+
expand(row:TreeRow|number, expandDescendants?:boolean):void;
|
|
1334
1481
|
/**
|
|
1335
|
-
*
|
|
1336
|
-
*
|
|
1337
|
-
* @
|
|
1482
|
+
* Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
|
|
1483
|
+
* parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
|
|
1484
|
+
* @param row -
|
|
1338
1485
|
*/
|
|
1339
|
-
|
|
1486
|
+
collapse(row:TreeRow|number):void;
|
|
1340
1487
|
/**
|
|
1341
|
-
*
|
|
1342
|
-
* size is
|
|
1343
|
-
*
|
|
1344
|
-
* @
|
|
1488
|
+
* Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
|
|
1489
|
+
* the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
|
|
1490
|
+
* is true, then its children will also be expanded.
|
|
1491
|
+
* @param row - the row to expand or collapse, either the absolute row index or the row object
|
|
1492
|
+
* @param isExpanded - true to expand the row, false to collapse
|
|
1493
|
+
* @param expandDescendants - true to expand the row and all descendants, false to expand only the row, defaults to
|
|
1494
|
+
* false
|
|
1345
1495
|
*/
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
1350
|
-
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
1496
|
+
setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
|
|
1497
|
+
expandAll():void;
|
|
1498
|
+
collapseAll():void;
|
|
1351
1499
|
/**
|
|
1352
|
-
*
|
|
1353
|
-
* @param
|
|
1354
|
-
* @return
|
|
1500
|
+
* Tests if the specified row is expanded.
|
|
1501
|
+
* @param row - the row to test, either the absolute row index or the row object
|
|
1502
|
+
* @return boolean true if the row is expanded, false otherwise
|
|
1355
1503
|
*/
|
|
1356
|
-
|
|
1357
|
-
|
|
1504
|
+
isExpanded(row:TreeRow|number):boolean;
|
|
1505
|
+
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
|
|
1506
|
+
getViewportData():Promise<TreeViewportData>;
|
|
1358
1507
|
/**
|
|
1359
|
-
*
|
|
1360
|
-
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
1361
|
-
* which knows this value can read the same object.
|
|
1362
|
-
* <p>
|
|
1363
|
-
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
1364
|
-
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
1365
|
-
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
1366
|
-
* <p>
|
|
1367
|
-
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
1368
|
-
* prevent access by unauthorized clients.
|
|
1369
|
-
* @param object - the object to share with another client/user
|
|
1370
|
-
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
1371
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
1372
|
-
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
1373
|
-
* by another client, or will reject if an error occurs.
|
|
1508
|
+
* Indicates that the table will no longer be used, and server resources can be freed.
|
|
1374
1509
|
*/
|
|
1375
|
-
|
|
1510
|
+
close():void;
|
|
1376
1511
|
/**
|
|
1377
|
-
*
|
|
1378
|
-
*
|
|
1379
|
-
*
|
|
1380
|
-
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
1381
|
-
* should provide this information.
|
|
1382
|
-
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
1383
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
1384
|
-
* @param type - The type of the object, so it can be correctly read from the server
|
|
1385
|
-
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
1512
|
+
* Applies the given sort to all levels of the tree. Returns the previous sort in use.
|
|
1513
|
+
* @param sort -
|
|
1514
|
+
* @return {@link dh.Sort} array
|
|
1386
1515
|
*/
|
|
1387
|
-
|
|
1388
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
1389
|
-
close():void;
|
|
1390
|
-
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
1391
|
-
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
1392
|
-
openDocument(params:object):void;
|
|
1393
|
-
changeDocument(params:object):void;
|
|
1394
|
-
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
1395
|
-
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
1396
|
-
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
1397
|
-
closeDocument(params:object):void;
|
|
1516
|
+
applySort(sort:Sort[]):Array<Sort>;
|
|
1398
1517
|
/**
|
|
1399
|
-
*
|
|
1400
|
-
*
|
|
1401
|
-
*
|
|
1402
|
-
* @
|
|
1518
|
+
* Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
|
|
1519
|
+
* node will be visible as well even if that parent node would not normally be visible due to the filter's
|
|
1520
|
+
* condition. Returns the previous sort in use.
|
|
1521
|
+
* @param filter -
|
|
1522
|
+
* @return {@link dh.FilterCondition} array
|
|
1403
1523
|
*/
|
|
1404
|
-
|
|
1524
|
+
applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
|
|
1405
1525
|
/**
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1408
|
-
* @param
|
|
1409
|
-
* @
|
|
1410
|
-
* @return {@link Promise} of {@link dh.Table}
|
|
1526
|
+
* Adding new columns to the table based on other columns using updateView() mechanics. Rollup tables are supported
|
|
1527
|
+
* but Tree tables will throw an {@link java.lang.UnsupportedOperationException} if this function is called.
|
|
1528
|
+
* @param customColumns -
|
|
1529
|
+
* @return {@link dh.CustomColumn} array
|
|
1411
1530
|
*/
|
|
1412
|
-
|
|
1413
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1414
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1415
|
-
hasListeners(name:string):boolean;
|
|
1416
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
export class DateWrapper extends LongWrapper {
|
|
1420
|
-
protected constructor();
|
|
1421
|
-
|
|
1422
|
-
static ofJsDate(date:Date):DateWrapper;
|
|
1423
|
-
asDate():Date;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
/**
|
|
1427
|
-
* Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
|
|
1428
|
-
*/
|
|
1429
|
-
export class ConnectOptions {
|
|
1531
|
+
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1430
1532
|
/**
|
|
1431
|
-
*
|
|
1533
|
+
* a column with the given name, or throws an exception if it cannot be found
|
|
1534
|
+
* @param key -
|
|
1535
|
+
* @return {@link dh.Column}
|
|
1432
1536
|
*/
|
|
1433
|
-
|
|
1537
|
+
findColumn(key:string):Column;
|
|
1434
1538
|
/**
|
|
1435
|
-
*
|
|
1539
|
+
* an array with all of the named columns in order, or throws an exception if one cannot be found.
|
|
1540
|
+
* @param keys -
|
|
1541
|
+
* @return {@link dh.Column} array
|
|
1436
1542
|
*/
|
|
1437
|
-
|
|
1543
|
+
findColumns(keys:string[]):Column[];
|
|
1438
1544
|
/**
|
|
1439
|
-
*
|
|
1440
|
-
*
|
|
1441
|
-
* <
|
|
1442
|
-
*
|
|
1545
|
+
* Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
|
|
1546
|
+
* values for the given columns in the source table:
|
|
1547
|
+
* <ul>
|
|
1548
|
+
* <li>Rollups may make no sense, since values are aggregated.</li>
|
|
1549
|
+
* <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
|
|
1550
|
+
* the tree.</li>
|
|
1551
|
+
* <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
|
|
1552
|
+
* in the resulting table.</li>
|
|
1553
|
+
* </ul>
|
|
1443
1554
|
*/
|
|
1444
|
-
|
|
1555
|
+
selectDistinct(columns:Column[]):Promise<Table>;
|
|
1556
|
+
getTotalsTableConfig():Promise<TotalsTableConfig>;
|
|
1557
|
+
getTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1558
|
+
getGrandTotalsTable(config?:object):Promise<TotalsTable>;
|
|
1445
1559
|
/**
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1448
|
-
*
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1451
|
-
* https, it will use fetch, otherwise it will use websockets.
|
|
1560
|
+
* a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
|
|
1561
|
+
* Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
|
|
1562
|
+
* viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
|
|
1563
|
+
* state is also not copied.
|
|
1564
|
+
* @return Promise of dh.TreeTable
|
|
1452
1565
|
*/
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
constructor();
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
/**
|
|
1459
|
-
* Provides access to data in a table. Note that several methods present their response through Promises. This allows
|
|
1460
|
-
* the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
|
|
1461
|
-
* inform the UI right away that they have taken place.
|
|
1462
|
-
*/
|
|
1463
|
-
export class Table implements JoinableTable, HasEventHandling {
|
|
1464
|
-
readonly description?:string|null;
|
|
1465
|
-
readonly pluginName?:string|null;
|
|
1466
|
-
readonly layoutHints?:null|LayoutHints;
|
|
1566
|
+
copy():Promise<TreeTable>;
|
|
1467
1567
|
/**
|
|
1468
|
-
* The
|
|
1568
|
+
* The current filter configuration of this Tree Table.
|
|
1569
|
+
* @return {@link dh.FilterCondition} array
|
|
1469
1570
|
*/
|
|
1470
|
-
|
|
1571
|
+
get filter():Array<FilterCondition>;
|
|
1471
1572
|
/**
|
|
1472
|
-
*
|
|
1573
|
+
* True if this is a roll-up and will provide the original rows that make up each grouping.
|
|
1574
|
+
* @return boolean
|
|
1473
1575
|
*/
|
|
1474
|
-
|
|
1576
|
+
get includeConstituents():boolean;
|
|
1577
|
+
get groupedColumns():Array<Column>;
|
|
1475
1578
|
/**
|
|
1476
|
-
*
|
|
1579
|
+
* True if this table has been closed.
|
|
1580
|
+
* @return boolean
|
|
1477
1581
|
*/
|
|
1478
|
-
|
|
1582
|
+
get isClosed():boolean;
|
|
1479
1583
|
/**
|
|
1480
|
-
* The
|
|
1584
|
+
* The current number of rows given the table's contents and the various expand/collapse states of each node. (No
|
|
1585
|
+
* totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
|
|
1586
|
+
* when considering collapse/expand states).
|
|
1587
|
+
* @return double
|
|
1481
1588
|
*/
|
|
1482
|
-
|
|
1589
|
+
get size():number;
|
|
1483
1590
|
/**
|
|
1484
|
-
* The
|
|
1591
|
+
* The columns that can be shown in this Tree Table.
|
|
1592
|
+
* @return {@link dh.Column} array
|
|
1485
1593
|
*/
|
|
1486
|
-
|
|
1594
|
+
get columns():Array<Column>;
|
|
1487
1595
|
/**
|
|
1488
|
-
* The
|
|
1596
|
+
* The current sort configuration of this Tree Table
|
|
1597
|
+
* @return {@link dh.Sort} array.
|
|
1489
1598
|
*/
|
|
1490
|
-
|
|
1599
|
+
get sort():Array<Sort>;
|
|
1491
1600
|
/**
|
|
1492
|
-
* The
|
|
1601
|
+
* The current list of custom columns added to this Tree Table.
|
|
1602
|
+
* @return {@link dh.CustomColumn} array
|
|
1493
1603
|
*/
|
|
1494
|
-
|
|
1604
|
+
get customColumns():Array<CustomColumn>;
|
|
1495
1605
|
/**
|
|
1496
|
-
*
|
|
1606
|
+
* True if this table may receive updates from the server, including size changed events, updated events after
|
|
1607
|
+
* initial snapshot.
|
|
1608
|
+
* @return boolean
|
|
1497
1609
|
*/
|
|
1498
|
-
|
|
1610
|
+
get isRefreshing():boolean;
|
|
1499
1611
|
/**
|
|
1500
|
-
*
|
|
1612
|
+
* Listen for events on this object.
|
|
1613
|
+
* @param name - the name of the event to listen for
|
|
1614
|
+
* @param callback - a function to call when the event occurs
|
|
1615
|
+
* @return Returns a cleanup function.
|
|
1616
|
+
* @typeParam T - the type of the data that the event will provide
|
|
1501
1617
|
*/
|
|
1502
|
-
|
|
1618
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1619
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1620
|
+
hasListeners(name:string):boolean;
|
|
1503
1621
|
/**
|
|
1504
|
-
*
|
|
1622
|
+
* Removes an event listener added to this table.
|
|
1623
|
+
* @param name -
|
|
1624
|
+
* @param callback -
|
|
1625
|
+
* @return
|
|
1626
|
+
* @typeParam T -
|
|
1505
1627
|
*/
|
|
1506
|
-
|
|
1628
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
|
|
1633
|
+
* can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
|
|
1634
|
+
* imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
|
|
1635
|
+
* called on these value literal instances. These instances are immutable - any method called on them returns a new
|
|
1636
|
+
* instance.
|
|
1637
|
+
*/
|
|
1638
|
+
export class FilterValue {
|
|
1639
|
+
protected constructor();
|
|
1640
|
+
|
|
1507
1641
|
/**
|
|
1508
|
-
*
|
|
1642
|
+
* Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
|
|
1643
|
+
* {@link TableData.get} for DateTime values. To create
|
|
1644
|
+
* a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
|
|
1645
|
+
* {@link i18n.DateTimeFormat.parse}. To create a filter with a
|
|
1646
|
+
* 64-bit long integer, use {@link LongWrapper.ofString}.
|
|
1647
|
+
* @param input - the number to wrap as a FilterValue
|
|
1648
|
+
* @return an immutable FilterValue that can be built into a filter
|
|
1509
1649
|
*/
|
|
1510
|
-
static
|
|
1650
|
+
static ofNumber(input:LongWrapper|number):FilterValue;
|
|
1511
1651
|
/**
|
|
1512
|
-
*
|
|
1652
|
+
* a filter condition checking if the current value is equal to the given parameter
|
|
1653
|
+
* @param term -
|
|
1654
|
+
* @return {@link dh.FilterCondition}
|
|
1513
1655
|
*/
|
|
1514
|
-
|
|
1656
|
+
eq(term:FilterValue):FilterCondition;
|
|
1515
1657
|
/**
|
|
1516
|
-
*
|
|
1658
|
+
* a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
|
|
1659
|
+
* vs lower case
|
|
1660
|
+
* @param term -
|
|
1661
|
+
* @return {@link dh.FilterCondition}
|
|
1517
1662
|
*/
|
|
1518
|
-
|
|
1663
|
+
eqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1519
1664
|
/**
|
|
1520
|
-
*
|
|
1665
|
+
* a filter condition checking if the current value is not equal to the given parameter
|
|
1666
|
+
* @param term -
|
|
1667
|
+
* @return {@link dh.FilterCondition}
|
|
1521
1668
|
*/
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
protected constructor();
|
|
1525
|
-
|
|
1526
|
-
batch(userCode:(arg0:unknown)=>void):Promise<Table>;
|
|
1669
|
+
notEq(term:FilterValue):FilterCondition;
|
|
1527
1670
|
/**
|
|
1528
|
-
*
|
|
1529
|
-
*
|
|
1530
|
-
* @param
|
|
1531
|
-
* @return {@link dh.
|
|
1671
|
+
* a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
|
|
1672
|
+
* upper vs lower case
|
|
1673
|
+
* @param term -
|
|
1674
|
+
* @return {@link dh.FilterCondition}
|
|
1532
1675
|
*/
|
|
1533
|
-
|
|
1676
|
+
notEqIgnoreCase(term:FilterValue):FilterCondition;
|
|
1534
1677
|
/**
|
|
1535
|
-
*
|
|
1536
|
-
* @param
|
|
1537
|
-
* @return {@link dh.
|
|
1678
|
+
* a filter condition checking if the current value is greater than the given parameter
|
|
1679
|
+
* @param term -
|
|
1680
|
+
* @return {@link dh.FilterCondition}
|
|
1538
1681
|
*/
|
|
1539
|
-
|
|
1540
|
-
isBlinkTable():boolean;
|
|
1682
|
+
greaterThan(term:FilterValue):FilterCondition;
|
|
1541
1683
|
/**
|
|
1542
|
-
*
|
|
1543
|
-
*
|
|
1544
|
-
* @return
|
|
1684
|
+
* a filter condition checking if the current value is less than the given parameter
|
|
1685
|
+
* @param term -
|
|
1686
|
+
* @return {@link dh.FilterCondition}
|
|
1545
1687
|
*/
|
|
1546
|
-
|
|
1688
|
+
lessThan(term:FilterValue):FilterCondition;
|
|
1547
1689
|
/**
|
|
1548
|
-
*
|
|
1690
|
+
* a filter condition checking if the current value is greater than or equal to the given parameter
|
|
1691
|
+
* @param term -
|
|
1692
|
+
* @return {@link dh.FilterCondition}
|
|
1549
1693
|
*/
|
|
1550
|
-
|
|
1551
|
-
getAttributes():string[];
|
|
1694
|
+
greaterThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1552
1695
|
/**
|
|
1553
|
-
*
|
|
1554
|
-
*
|
|
1555
|
-
* @
|
|
1556
|
-
* @return Object
|
|
1696
|
+
* a filter condition checking if the current value is less than or equal to the given parameter
|
|
1697
|
+
* @param term -
|
|
1698
|
+
* @return {@link dh.FilterCondition}
|
|
1557
1699
|
*/
|
|
1558
|
-
|
|
1700
|
+
lessThanOrEqualTo(term:FilterValue):FilterCondition;
|
|
1559
1701
|
/**
|
|
1560
|
-
*
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
* better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
|
|
1564
|
-
* not.
|
|
1565
|
-
* @param sort -
|
|
1566
|
-
* @return {@link dh.Sort} array
|
|
1702
|
+
* a filter condition checking if the current value is in the given set of values
|
|
1703
|
+
* @param terms -
|
|
1704
|
+
* @return {@link dh.FilterCondition}
|
|
1567
1705
|
*/
|
|
1568
|
-
|
|
1706
|
+
in(terms:FilterValue[]):FilterCondition;
|
|
1569
1707
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1573
|
-
*
|
|
1574
|
-
* will not.
|
|
1575
|
-
* @param filter -
|
|
1576
|
-
* @return {@link dh.FilterCondition} array
|
|
1708
|
+
* a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
|
|
1709
|
+
* lower case
|
|
1710
|
+
* @param terms -
|
|
1711
|
+
* @return {@link dh.FilterCondition}
|
|
1577
1712
|
*/
|
|
1578
|
-
|
|
1713
|
+
inIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1579
1714
|
/**
|
|
1580
|
-
*
|
|
1581
|
-
* @param
|
|
1582
|
-
* @return {@link dh.
|
|
1583
|
-
*/
|
|
1584
|
-
applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
|
|
1585
|
-
/**
|
|
1586
|
-
* If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
|
|
1587
|
-
* provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
|
|
1588
|
-
* will result in events to be fired once data becomes available, starting with an `updated` event and a
|
|
1589
|
-
* <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
|
|
1590
|
-
* needed.
|
|
1591
|
-
* @param firstRow -
|
|
1592
|
-
* @param lastRow -
|
|
1593
|
-
* @param columns -
|
|
1594
|
-
* @param updateIntervalMs -
|
|
1595
|
-
* @return {@link dh.TableViewportSubscription}
|
|
1596
|
-
*/
|
|
1597
|
-
setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
|
|
1598
|
-
/**
|
|
1599
|
-
* Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
|
|
1600
|
-
* resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
|
|
1601
|
-
* separate the lifespan of this promise from the table itself, call
|
|
1602
|
-
* {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
|
|
1603
|
-
* @return Promise of {@link dh.TableData}
|
|
1604
|
-
*/
|
|
1605
|
-
getViewportData():Promise<ViewportData>;
|
|
1606
|
-
/**
|
|
1607
|
-
* Creates a subscription to the specified columns, across all rows in the table. The optional parameter
|
|
1608
|
-
* updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
|
|
1609
|
-
* if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
|
|
1610
|
-
* single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
|
|
1611
|
-
* browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
|
|
1612
|
-
* called on it to stop it, and all events are fired from the TableSubscription instance.
|
|
1613
|
-
* @param columns -
|
|
1614
|
-
* @param updateIntervalMs -
|
|
1615
|
-
* @return {@link dh.TableSubscription}
|
|
1616
|
-
*/
|
|
1617
|
-
subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
|
|
1618
|
-
/**
|
|
1619
|
-
* a new table containing the distinct tuples of values from the given columns that are present in the original
|
|
1620
|
-
* table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
|
|
1621
|
-
* order of appearance of values from the original table.
|
|
1622
|
-
* @param columns -
|
|
1623
|
-
* @return Promise of dh.Table
|
|
1715
|
+
* a filter condition checking that the current value is not in the given set of values
|
|
1716
|
+
* @param terms -
|
|
1717
|
+
* @return {@link dh.FilterCondition}
|
|
1624
1718
|
*/
|
|
1625
|
-
|
|
1719
|
+
notIn(terms:FilterValue[]):FilterCondition;
|
|
1626
1720
|
/**
|
|
1627
|
-
*
|
|
1628
|
-
*
|
|
1721
|
+
* a filter condition checking that the current value is not in the given set of values, ignoring differences of
|
|
1722
|
+
* upper vs lower case
|
|
1723
|
+
* @param terms -
|
|
1724
|
+
* @return {@link dh.FilterCondition}
|
|
1629
1725
|
*/
|
|
1630
|
-
|
|
1726
|
+
notInIgnoreCase(terms:FilterValue[]):FilterCondition;
|
|
1631
1727
|
/**
|
|
1632
|
-
* a
|
|
1633
|
-
*
|
|
1634
|
-
*
|
|
1635
|
-
* called on it when not in use.
|
|
1636
|
-
* @param config -
|
|
1637
|
-
* @return Promise of dh.TotalsTable
|
|
1728
|
+
* a filter condition checking if the given value contains the given string value
|
|
1729
|
+
* @param term -
|
|
1730
|
+
* @return {@link dh.FilterCondition}
|
|
1638
1731
|
*/
|
|
1639
|
-
|
|
1732
|
+
contains(term:FilterValue):FilterCondition;
|
|
1640
1733
|
/**
|
|
1641
|
-
* a
|
|
1642
|
-
*
|
|
1643
|
-
* @param
|
|
1644
|
-
* @return
|
|
1734
|
+
* a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
|
|
1735
|
+
* lower case
|
|
1736
|
+
* @param term -
|
|
1737
|
+
* @return {@link dh.FilterCondition}
|
|
1645
1738
|
*/
|
|
1646
|
-
|
|
1739
|
+
containsIgnoreCase(term:FilterValue):FilterCondition;
|
|
1647
1740
|
/**
|
|
1648
|
-
* a
|
|
1649
|
-
*
|
|
1650
|
-
* @param
|
|
1651
|
-
* @return
|
|
1741
|
+
* a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
|
|
1742
|
+
* use Java regex syntax
|
|
1743
|
+
* @param pattern -
|
|
1744
|
+
* @return {@link dh.FilterCondition}
|
|
1652
1745
|
*/
|
|
1653
|
-
|
|
1746
|
+
matches(pattern:FilterValue):FilterCondition;
|
|
1654
1747
|
/**
|
|
1655
|
-
* a
|
|
1656
|
-
*
|
|
1657
|
-
* @param
|
|
1658
|
-
* @return
|
|
1748
|
+
* a filter condition checking if the given value matches the provided regular expressions string, ignoring
|
|
1749
|
+
* differences of upper vs lower case. Regex patterns use Java regex syntax
|
|
1750
|
+
* @param pattern -
|
|
1751
|
+
* @return {@link dh.FilterCondition}
|
|
1659
1752
|
*/
|
|
1660
|
-
|
|
1753
|
+
matchesIgnoreCase(pattern:FilterValue):FilterCondition;
|
|
1661
1754
|
/**
|
|
1662
|
-
* a
|
|
1663
|
-
*
|
|
1664
|
-
* side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
|
|
1665
|
-
* @return Promise of dh.Table
|
|
1755
|
+
* a filter condition checking if the current value is a true boolean
|
|
1756
|
+
* @return {@link dh.FilterCondition}
|
|
1666
1757
|
*/
|
|
1667
|
-
|
|
1668
|
-
snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
|
|
1758
|
+
isTrue():FilterCondition;
|
|
1669
1759
|
/**
|
|
1670
|
-
*
|
|
1671
|
-
* @
|
|
1672
|
-
* @deprecated
|
|
1760
|
+
* a filter condition checking if the current value is a false boolean
|
|
1761
|
+
* @return {@link dh.FilterCondition}
|
|
1673
1762
|
*/
|
|
1674
|
-
|
|
1675
|
-
asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
|
|
1676
|
-
crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
|
|
1677
|
-
exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1678
|
-
naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
|
|
1679
|
-
byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
|
|
1763
|
+
isFalse():FilterCondition;
|
|
1680
1764
|
/**
|
|
1681
|
-
*
|
|
1682
|
-
*
|
|
1683
|
-
* @param keys -
|
|
1684
|
-
* @param dropKeys -
|
|
1685
|
-
* @return Promise dh.PartitionedTable
|
|
1765
|
+
* a filter condition checking if the current value is a null value
|
|
1766
|
+
* @return {@link dh.FilterCondition}
|
|
1686
1767
|
*/
|
|
1687
|
-
|
|
1768
|
+
isNull():FilterCondition;
|
|
1688
1769
|
/**
|
|
1689
|
-
* a
|
|
1690
|
-
*
|
|
1691
|
-
*
|
|
1770
|
+
* a filter condition invoking the given method on the current value, with the given parameters. Currently supported
|
|
1771
|
+
* functions that can be invoked on a String:
|
|
1772
|
+
* <ul>
|
|
1773
|
+
* <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
|
|
1774
|
+
* <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
|
|
1775
|
+
* <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
|
|
1776
|
+
* regular expression</li>
|
|
1777
|
+
* <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
|
|
1778
|
+
* <p>
|
|
1779
|
+
* When invoking against a constant, this should be avoided in favor of FilterValue.contains
|
|
1780
|
+
* </p>
|
|
1781
|
+
* </li>
|
|
1782
|
+
* </ul>
|
|
1783
|
+
* @param method -
|
|
1784
|
+
* @param args -
|
|
1785
|
+
* @return
|
|
1692
1786
|
*/
|
|
1693
|
-
|
|
1787
|
+
invoke(method:string, ...args:FilterValue[]):FilterCondition;
|
|
1788
|
+
toString():string;
|
|
1694
1789
|
/**
|
|
1695
|
-
*
|
|
1696
|
-
* @param
|
|
1697
|
-
* @
|
|
1698
|
-
* @param valueType - Type of value provided
|
|
1699
|
-
* @param seekValue - Value to seek
|
|
1700
|
-
* @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
|
|
1701
|
-
* @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
|
|
1702
|
-
* `false`.
|
|
1703
|
-
* @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
|
|
1704
|
-
* @return A promise that resolves to the row value found.
|
|
1790
|
+
* Constructs a string for the filter API from the given parameter.
|
|
1791
|
+
* @param input -
|
|
1792
|
+
* @return
|
|
1705
1793
|
*/
|
|
1706
|
-
|
|
1707
|
-
toString():string;
|
|
1794
|
+
static ofString(input:any):FilterValue;
|
|
1708
1795
|
/**
|
|
1709
|
-
*
|
|
1710
|
-
*
|
|
1711
|
-
* @return
|
|
1796
|
+
* Constructs a boolean for the filter API from the given parameter.
|
|
1797
|
+
* @param b -
|
|
1798
|
+
* @return
|
|
1712
1799
|
*/
|
|
1713
|
-
|
|
1800
|
+
static ofBoolean(b:boolean):FilterValue;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* A Widget represents a server side object that sends one or more responses to the client. The client can then
|
|
1805
|
+
* interpret these responses to see what to render, or how to respond.
|
|
1806
|
+
* <p>
|
|
1807
|
+
* Most custom object types result in a single response being sent to the client, often with other exported objects, but
|
|
1808
|
+
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
1809
|
+
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
1810
|
+
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
1811
|
+
* {@link dh.WidgetMessageDetails} for more information.
|
|
1812
|
+
* <p>
|
|
1813
|
+
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
1814
|
+
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
1815
|
+
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
1816
|
+
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
1817
|
+
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
1818
|
+
* <p>
|
|
1819
|
+
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
1820
|
+
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
1821
|
+
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
1822
|
+
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
1823
|
+
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
1824
|
+
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
1825
|
+
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
1826
|
+
* <p>
|
|
1827
|
+
* This can suggest several patterns for how plugins operate:
|
|
1828
|
+
* <ul>
|
|
1829
|
+
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
1830
|
+
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
1831
|
+
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
1832
|
+
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
1833
|
+
* provided to the JS API consumer.</li>
|
|
1834
|
+
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
1835
|
+
* which provided them. One concrete example of this could have been
|
|
1836
|
+
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
1837
|
+
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
1838
|
+
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
1839
|
+
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
1840
|
+
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
1841
|
+
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
1842
|
+
* an internal table instance.</li>
|
|
1843
|
+
* </ul>
|
|
1844
|
+
*
|
|
1845
|
+
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
1846
|
+
* <ul>
|
|
1847
|
+
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
1848
|
+
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
1849
|
+
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
1850
|
+
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
1851
|
+
* be used, which columns should be mapped to each axis.</li>
|
|
1852
|
+
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
1853
|
+
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
1854
|
+
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
1855
|
+
* without the server somehow signaling that it will never reference that export again.</li>
|
|
1856
|
+
* </ul>
|
|
1857
|
+
*/
|
|
1858
|
+
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
1859
|
+
static readonly EVENT_MESSAGE:string;
|
|
1860
|
+
static readonly EVENT_CLOSE:string;
|
|
1861
|
+
|
|
1862
|
+
protected constructor();
|
|
1863
|
+
|
|
1714
1864
|
/**
|
|
1715
|
-
*
|
|
1716
|
-
* .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
|
|
1717
|
-
* in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
|
|
1718
|
-
* in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
|
|
1719
|
-
* @return {@link dh.Column} array
|
|
1865
|
+
* Ends the client connection to the server.
|
|
1720
1866
|
*/
|
|
1721
|
-
|
|
1867
|
+
close():void;
|
|
1868
|
+
getDataAsBase64():string;
|
|
1869
|
+
getDataAsU8():Uint8Array;
|
|
1870
|
+
getDataAsString():string;
|
|
1722
1871
|
/**
|
|
1723
|
-
*
|
|
1724
|
-
* @
|
|
1872
|
+
* Sends a string/bytes payload to the server, along with references to objects that exist on the server.
|
|
1873
|
+
* @param msg - string/buffer/view instance that represents data to send
|
|
1874
|
+
* @param references - an array of objects that can be safely sent to the server
|
|
1725
1875
|
*/
|
|
1726
|
-
|
|
1876
|
+
sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
|
|
1877
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
1878
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
1879
|
+
hasListeners(name:string):boolean;
|
|
1880
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1727
1881
|
/**
|
|
1728
|
-
*
|
|
1729
|
-
* return the
|
|
1730
|
-
*
|
|
1731
|
-
* @return {@link dh.Sort} array
|
|
1882
|
+
*
|
|
1883
|
+
* @return the exported objects sent in the initial message from the server. The client is responsible for closing
|
|
1884
|
+
* them when finished using them.
|
|
1732
1885
|
*/
|
|
1733
|
-
get
|
|
1886
|
+
get exportedObjects():WidgetExportedObject[];
|
|
1734
1887
|
/**
|
|
1735
|
-
*
|
|
1736
|
-
*
|
|
1737
|
-
* @return {@link dh.CustomColumn} array
|
|
1888
|
+
*
|
|
1889
|
+
* @return the type of this widget
|
|
1738
1890
|
*/
|
|
1739
|
-
get
|
|
1891
|
+
get type():string;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
/**
|
|
1895
|
+
* Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
|
|
1896
|
+
*/
|
|
1897
|
+
export class ConnectOptions {
|
|
1740
1898
|
/**
|
|
1741
|
-
*
|
|
1742
|
-
* initial snapshot.
|
|
1743
|
-
* @return boolean
|
|
1899
|
+
* Optional map of http header names and values to send to the server with each request.
|
|
1744
1900
|
*/
|
|
1745
|
-
|
|
1901
|
+
headers?:{ [key: string]: string; }|null;
|
|
1746
1902
|
/**
|
|
1747
|
-
*
|
|
1748
|
-
* return the new value immediately, even though it may take a little time to update on the server. You may listen
|
|
1749
|
-
* for the <b>filterchanged</b> event to know when to update the UI.
|
|
1750
|
-
* @return {@link dh.FilterCondition} array
|
|
1903
|
+
* True to enable debug logging. At this time, only enables logging for gRPC calls.
|
|
1751
1904
|
*/
|
|
1752
|
-
|
|
1905
|
+
debug?:boolean|null;
|
|
1753
1906
|
/**
|
|
1754
|
-
*
|
|
1755
|
-
*
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1907
|
+
* Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
|
|
1908
|
+
* of `fetch`. Ignored if {@link dh.transportFactory} is set.
|
|
1909
|
+
* <p>
|
|
1910
|
+
* Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
|
|
1758
1911
|
*/
|
|
1759
|
-
|
|
1912
|
+
useWebsockets?:boolean|null;
|
|
1760
1913
|
/**
|
|
1761
|
-
* The
|
|
1762
|
-
*
|
|
1763
|
-
* {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
|
|
1914
|
+
* The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
|
|
1915
|
+
* {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
|
|
1764
1916
|
* <p>
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1917
|
+
* Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
|
|
1918
|
+
* `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
|
|
1919
|
+
* https, it will use fetch, otherwise it will use websockets.
|
|
1768
1920
|
*/
|
|
1769
|
-
|
|
1921
|
+
transportFactory?:dh.grpc.GrpcTransportFactory|null;
|
|
1922
|
+
|
|
1923
|
+
constructor();
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
/**
|
|
1927
|
+
* Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
|
|
1928
|
+
* this type TableMap.
|
|
1929
|
+
* @deprecated
|
|
1930
|
+
*/
|
|
1931
|
+
export class TableMap {
|
|
1932
|
+
static readonly EVENT_KEYADDED:string;
|
|
1933
|
+
static readonly EVENT_DISCONNECT:string;
|
|
1934
|
+
static readonly EVENT_RECONNECT:string;
|
|
1935
|
+
static readonly EVENT_RECONNECTFAILED:string;
|
|
1936
|
+
|
|
1937
|
+
protected constructor();
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
1942
|
+
*/
|
|
1943
|
+
export class BigIntegerWrapper {
|
|
1944
|
+
protected constructor();
|
|
1945
|
+
|
|
1946
|
+
static ofString(str:string):BigIntegerWrapper;
|
|
1947
|
+
asNumber():number;
|
|
1948
|
+
valueOf():string;
|
|
1949
|
+
toString():string;
|
|
1950
|
+
equals(o:object):boolean;
|
|
1951
|
+
hashCode():number;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
/**
|
|
1955
|
+
* Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
|
|
1956
|
+
* columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
|
|
1957
|
+
*
|
|
1958
|
+
* Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
|
|
1959
|
+
* "private" table instance does, since the original cannot modify the subscription, and the private instance must
|
|
1960
|
+
* forward data to it.
|
|
1961
|
+
*
|
|
1962
|
+
* Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
|
|
1963
|
+
* subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
|
|
1964
|
+
* viewports to make it less expensive to compute for large tables.
|
|
1965
|
+
*/
|
|
1966
|
+
export class TableSubscription implements HasEventHandling {
|
|
1967
|
+
protected constructor();
|
|
1968
|
+
|
|
1770
1969
|
/**
|
|
1771
|
-
*
|
|
1772
|
-
* @
|
|
1970
|
+
* Updates the subscription to use the given columns and update interval.
|
|
1971
|
+
* @param columns - the new columns to subscribe to
|
|
1972
|
+
* @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
|
|
1773
1973
|
*/
|
|
1774
|
-
|
|
1974
|
+
changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
|
|
1975
|
+
get columns():Array<Column>;
|
|
1775
1976
|
/**
|
|
1776
|
-
*
|
|
1777
|
-
* <p>
|
|
1778
|
-
* Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
|
|
1779
|
-
* subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
|
|
1780
|
-
* this can be very expensive. To see which partitions are available, check each column on the table to see which
|
|
1781
|
-
* have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
|
|
1782
|
-
* for those columns, use {@link Table.selectDistinct}.
|
|
1783
|
-
* @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
|
|
1977
|
+
* Stops the subscription on the server.
|
|
1784
1978
|
*/
|
|
1785
|
-
|
|
1979
|
+
close():void;
|
|
1786
1980
|
/**
|
|
1787
1981
|
* Listen for events on this object.
|
|
1788
1982
|
* @param name - the name of the event to listen for
|
|
@@ -1801,36 +1995,39 @@ export namespace dh {
|
|
|
1801
1995
|
* @typeParam T -
|
|
1802
1996
|
*/
|
|
1803
1997
|
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1804
|
-
/**
|
|
1805
|
-
* a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
|
|
1806
|
-
* do not support reverse.
|
|
1807
|
-
* @return {@link dh.Sort}
|
|
1808
|
-
*/
|
|
1809
|
-
static reverse():Sort;
|
|
1810
1998
|
}
|
|
1811
1999
|
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
/**
|
|
1821
|
-
* The column representing the unique ID for each item
|
|
1822
|
-
*/
|
|
1823
|
-
idColumn:string;
|
|
1824
|
-
/**
|
|
1825
|
-
* The column representing the parent ID for each item
|
|
1826
|
-
*/
|
|
1827
|
-
parentColumn:string;
|
|
2000
|
+
export class CoreClient implements HasEventHandling {
|
|
2001
|
+
static readonly EVENT_CONNECT:string;
|
|
2002
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2003
|
+
static readonly EVENT_RECONNECT:string;
|
|
2004
|
+
static readonly EVENT_RECONNECT_AUTH_FAILED:string;
|
|
2005
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2006
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
2007
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
1828
2008
|
/**
|
|
1829
|
-
*
|
|
2009
|
+
* @deprecated
|
|
1830
2010
|
*/
|
|
1831
|
-
|
|
2011
|
+
static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
|
|
2012
|
+
static readonly LOGIN_TYPE_PASSWORD:string;
|
|
2013
|
+
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
1832
2014
|
|
|
1833
|
-
constructor();
|
|
2015
|
+
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
2016
|
+
|
|
2017
|
+
running():Promise<CoreClient>;
|
|
2018
|
+
getServerUrl():string;
|
|
2019
|
+
getAuthConfigValues():Promise<string[][]>;
|
|
2020
|
+
login(credentials:LoginCredentials):Promise<void>;
|
|
2021
|
+
relogin(token:RefreshToken):Promise<void>;
|
|
2022
|
+
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
2023
|
+
getServerConfigValues():Promise<string[][]>;
|
|
2024
|
+
getStorageService():dh.storage.StorageService;
|
|
2025
|
+
getAsIdeConnection():Promise<IdeConnection>;
|
|
2026
|
+
disconnect():void;
|
|
2027
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2028
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2029
|
+
hasListeners(name:string):boolean;
|
|
2030
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
1834
2031
|
}
|
|
1835
2032
|
|
|
1836
2033
|
/**
|
|
@@ -1915,355 +2112,285 @@ export namespace dh {
|
|
|
1915
2112
|
constructor();
|
|
1916
2113
|
|
|
1917
2114
|
toString():string;
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
* column.
|
|
1923
|
-
*/
|
|
1924
|
-
export class Column {
|
|
1925
|
-
/**
|
|
1926
|
-
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
1927
|
-
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
1928
|
-
* @return String
|
|
1929
|
-
*/
|
|
1930
|
-
readonly constituentType?:string|null;
|
|
1931
|
-
readonly description?:string|null;
|
|
1932
|
-
|
|
1933
|
-
protected constructor();
|
|
1934
|
-
|
|
1935
|
-
/**
|
|
1936
|
-
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
1937
|
-
* @param row -
|
|
1938
|
-
* @return Any
|
|
1939
|
-
*/
|
|
1940
|
-
get(row:Row):any;
|
|
1941
|
-
getFormat(row:Row):Format;
|
|
1942
|
-
/**
|
|
1943
|
-
* Creates a sort builder object, to be used when sorting by this column.
|
|
1944
|
-
* @return {@link dh.Sort}
|
|
1945
|
-
*/
|
|
1946
|
-
sort():Sort;
|
|
1947
|
-
/**
|
|
1948
|
-
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
1949
|
-
* operation, or as a builder to create a filter operation.
|
|
1950
|
-
* @return {@link dh.FilterValue}
|
|
1951
|
-
*/
|
|
1952
|
-
filter():FilterValue;
|
|
1953
|
-
/**
|
|
1954
|
-
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
1955
|
-
* @param expression -
|
|
1956
|
-
* @return {@link dh.CustomColumn}
|
|
1957
|
-
*/
|
|
1958
|
-
formatColor(expression:string):CustomColumn;
|
|
1959
|
-
/**
|
|
1960
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1961
|
-
* @param expression -
|
|
1962
|
-
* @return {@link dh.CustomColumn}
|
|
1963
|
-
*/
|
|
1964
|
-
formatNumber(expression:string):CustomColumn;
|
|
1965
|
-
/**
|
|
1966
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
1967
|
-
* @param expression -
|
|
1968
|
-
* @return {@link dh.CustomColumn}
|
|
1969
|
-
*/
|
|
1970
|
-
formatDate(expression:string):CustomColumn;
|
|
1971
|
-
toString():string;
|
|
1972
|
-
/**
|
|
1973
|
-
* Label for this column.
|
|
1974
|
-
* @return String
|
|
1975
|
-
*/
|
|
1976
|
-
get name():string;
|
|
1977
|
-
/**
|
|
1978
|
-
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
|
|
1979
|
-
* {@link Table.uncoalesced}.
|
|
1980
|
-
* @return true if the column is a partition column
|
|
1981
|
-
*/
|
|
1982
|
-
get isPartitionColumn():boolean;
|
|
1983
|
-
/**
|
|
1984
|
-
*
|
|
1985
|
-
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
1986
|
-
* @return int
|
|
1987
|
-
*/
|
|
1988
|
-
get index():number;
|
|
1989
|
-
get isSortable():boolean;
|
|
1990
|
-
/**
|
|
1991
|
-
* Type of the row data that can be found in this column.
|
|
1992
|
-
* @return String
|
|
1993
|
-
*/
|
|
1994
|
-
get type():string;
|
|
1995
|
-
/**
|
|
1996
|
-
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
1997
|
-
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
1998
|
-
* @param expression -
|
|
1999
|
-
* @return {@link dh.CustomColumn}
|
|
2000
|
-
*/
|
|
2001
|
-
static formatRowColor(expression:string):CustomColumn;
|
|
2002
|
-
/**
|
|
2003
|
-
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2004
|
-
* @param name -
|
|
2005
|
-
* @param expression -
|
|
2006
|
-
* @return {@link dh.CustomColumn}
|
|
2007
|
-
*/
|
|
2008
|
-
static createCustomColumn(name:string, expression:string):CustomColumn;
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
/**
|
|
2012
|
-
* Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
|
|
2013
|
-
* mechanism, and so reimplemented here.
|
|
2014
|
-
* <p>
|
|
2015
|
-
* Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
|
|
2016
|
-
* <p>
|
|
2017
|
-
* Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
|
|
2018
|
-
* operations are performed, but encourage the client code to re-set them to the desired position.
|
|
2019
|
-
* <p>
|
|
2020
|
-
* The table size will be -1 until a viewport has been fetched.
|
|
2021
|
-
* <p>
|
|
2022
|
-
* Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
|
|
2023
|
-
* Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
|
|
2024
|
-
* whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
|
|
2025
|
-
* expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
|
|
2026
|
-
* instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
|
|
2027
|
-
* the viewport).
|
|
2028
|
-
* <p>
|
|
2029
|
-
* Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
|
|
2030
|
-
* and count of children at each level of the hierarchy, and differences in the data that is available.
|
|
2031
|
-
* <p>
|
|
2032
|
-
* <ul>
|
|
2033
|
-
* <li>There is no {@link Table.totalSize | totalSize} property.</li>
|
|
2034
|
-
* <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
|
|
2035
|
-
* It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
|
|
2036
|
-
* change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
|
|
2037
|
-
* new operation is pending.</li>
|
|
2038
|
-
* <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
|
|
2039
|
-
* custom columns applied, and the TreeTable can be recreated.</li>
|
|
2040
|
-
* <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
|
|
2041
|
-
* {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
|
|
2042
|
-
* <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
|
|
2043
|
-
* original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
|
|
2044
|
-
* config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
|
|
2045
|
-
* roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
|
|
2046
|
-
* the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
|
|
2047
|
-
* {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
|
|
2048
|
-
* where {@link TreeRowImpl.hasChildren} is false will be different from usual.</li>
|
|
2049
|
-
* </ul>
|
|
2050
|
-
*/
|
|
2051
|
-
export class TreeTable implements HasEventHandling {
|
|
2052
|
-
/**
|
|
2053
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
2054
|
-
*/
|
|
2055
|
-
static readonly EVENT_UPDATED:string;
|
|
2056
|
-
/**
|
|
2057
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
2058
|
-
*/
|
|
2059
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2060
|
-
/**
|
|
2061
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
2062
|
-
*/
|
|
2063
|
-
static readonly EVENT_RECONNECT:string;
|
|
2064
|
-
/**
|
|
2065
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
2066
|
-
*/
|
|
2067
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
2068
|
-
/**
|
|
2069
|
-
* event.detail is the currently visible viewport data based on the active viewport configuration.
|
|
2070
|
-
*/
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
export class IdeSession implements HasEventHandling {
|
|
2118
|
+
static readonly EVENT_COMMANDSTARTED:string;
|
|
2071
2119
|
static readonly EVENT_REQUEST_FAILED:string;
|
|
2072
|
-
readonly description?:string|null;
|
|
2073
|
-
readonly layoutHints?:null|LayoutHints;
|
|
2074
2120
|
|
|
2075
2121
|
protected constructor();
|
|
2076
2122
|
|
|
2077
2123
|
/**
|
|
2078
|
-
*
|
|
2079
|
-
*
|
|
2080
|
-
*
|
|
2081
|
-
*
|
|
2082
|
-
* @param row -
|
|
2083
|
-
* @param expandDescendants -
|
|
2124
|
+
* Load the named table, with columns and size information already fully populated.
|
|
2125
|
+
* @param name -
|
|
2126
|
+
* @param applyPreviewColumns - optional boolean
|
|
2127
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2084
2128
|
*/
|
|
2085
|
-
|
|
2129
|
+
getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
|
|
2086
2130
|
/**
|
|
2087
|
-
*
|
|
2088
|
-
*
|
|
2089
|
-
* @
|
|
2131
|
+
* Load the named Figure, including its tables and tablemaps as needed.
|
|
2132
|
+
* @param name -
|
|
2133
|
+
* @return promise of dh.plot.Figure
|
|
2090
2134
|
*/
|
|
2091
|
-
|
|
2135
|
+
getFigure(name:string):Promise<dh.plot.Figure>;
|
|
2092
2136
|
/**
|
|
2093
|
-
*
|
|
2094
|
-
*
|
|
2095
|
-
*
|
|
2096
|
-
* @
|
|
2097
|
-
* @param isExpanded - true to expand the row, false to collapse
|
|
2098
|
-
* @param expandDescendants - true to expand the row and all descendants, false to expand only the row, defaults to
|
|
2099
|
-
* false
|
|
2137
|
+
* Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
|
|
2138
|
+
* size is presently not available until the viewport is first set.
|
|
2139
|
+
* @param name -
|
|
2140
|
+
* @return {@link Promise} of {@link dh.TreeTable}
|
|
2100
2141
|
*/
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2142
|
+
getTreeTable(name:string):Promise<TreeTable>;
|
|
2143
|
+
getHierarchicalTable(name:string):Promise<TreeTable>;
|
|
2144
|
+
getPartitionedTable(name:string):Promise<PartitionedTable>;
|
|
2145
|
+
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2146
|
+
newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
|
|
2104
2147
|
/**
|
|
2105
|
-
*
|
|
2106
|
-
* @param
|
|
2107
|
-
* @return
|
|
2148
|
+
* Merges the given tables into a single table. Assumes all tables have the same structure.
|
|
2149
|
+
* @param tables -
|
|
2150
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2108
2151
|
*/
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
getViewportData():Promise<TreeViewportData>;
|
|
2152
|
+
mergeTables(tables:Table[]):Promise<Table>;
|
|
2153
|
+
bindTableToVariable(table:Table, name:string):Promise<void>;
|
|
2112
2154
|
/**
|
|
2113
|
-
*
|
|
2155
|
+
* Makes the `object` available to another user or another client on this same server which knows the value of
|
|
2156
|
+
* the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
|
|
2157
|
+
* which knows this value can read the same object.
|
|
2158
|
+
* <p>
|
|
2159
|
+
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
2160
|
+
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
2161
|
+
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
2162
|
+
* <p>
|
|
2163
|
+
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
2164
|
+
* prevent access by unauthorized clients.
|
|
2165
|
+
* @param object - the object to share with another client/user
|
|
2166
|
+
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
2167
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2168
|
+
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
2169
|
+
* by another client, or will reject if an error occurs.
|
|
2170
|
+
*/
|
|
2171
|
+
shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
|
|
2172
|
+
/**
|
|
2173
|
+
* Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
|
|
2174
|
+
* client releases this object (or their session ends), the object will be available on the server.
|
|
2175
|
+
* <p>
|
|
2176
|
+
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
2177
|
+
* should provide this information.
|
|
2178
|
+
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
2179
|
+
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2180
|
+
* @param type - The type of the object, so it can be correctly read from the server
|
|
2181
|
+
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
2114
2182
|
*/
|
|
2183
|
+
getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
|
|
2184
|
+
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2115
2185
|
close():void;
|
|
2186
|
+
runCode(code:string):Promise<dh.ide.CommandResult>;
|
|
2187
|
+
onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
|
|
2188
|
+
openDocument(params:object):void;
|
|
2189
|
+
changeDocument(params:object):void;
|
|
2190
|
+
getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
|
|
2191
|
+
getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
|
|
2192
|
+
getHover(params:object):Promise<dh.lsp.Hover>;
|
|
2193
|
+
closeDocument(params:object):void;
|
|
2116
2194
|
/**
|
|
2117
|
-
*
|
|
2118
|
-
*
|
|
2119
|
-
* @
|
|
2195
|
+
* Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
|
|
2196
|
+
* values will be null.
|
|
2197
|
+
* @param size -
|
|
2198
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2120
2199
|
*/
|
|
2121
|
-
|
|
2200
|
+
emptyTable(size:number):Promise<Table>;
|
|
2122
2201
|
/**
|
|
2123
|
-
*
|
|
2124
|
-
*
|
|
2125
|
-
*
|
|
2126
|
-
* @param
|
|
2127
|
-
* @return {@link dh.
|
|
2202
|
+
* Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
|
|
2203
|
+
* the table will be populated with the interval from the specified date until now.
|
|
2204
|
+
* @param periodNanos -
|
|
2205
|
+
* @param startTime -
|
|
2206
|
+
* @return {@link Promise} of {@link dh.Table}
|
|
2128
2207
|
*/
|
|
2129
|
-
|
|
2208
|
+
timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
|
|
2209
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2210
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2211
|
+
hasListeners(name:string):boolean;
|
|
2212
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
export class CustomColumn {
|
|
2216
|
+
static readonly TYPE_FORMAT_COLOR:string;
|
|
2217
|
+
static readonly TYPE_FORMAT_NUMBER:string;
|
|
2218
|
+
static readonly TYPE_FORMAT_DATE:string;
|
|
2219
|
+
static readonly TYPE_NEW:string;
|
|
2220
|
+
|
|
2221
|
+
protected constructor();
|
|
2222
|
+
|
|
2223
|
+
valueOf():string;
|
|
2224
|
+
toString():string;
|
|
2225
|
+
static from(columnInfo:string):CustomColumn;
|
|
2130
2226
|
/**
|
|
2131
|
-
*
|
|
2132
|
-
* @
|
|
2133
|
-
* @return {@link dh.Column}
|
|
2227
|
+
* The expression to evaluate this custom column.
|
|
2228
|
+
* @return String
|
|
2134
2229
|
*/
|
|
2135
|
-
|
|
2230
|
+
get expression():string;
|
|
2136
2231
|
/**
|
|
2137
|
-
*
|
|
2138
|
-
* @
|
|
2139
|
-
* @return {@link dh.Column} array
|
|
2232
|
+
* The name of the column to use.
|
|
2233
|
+
* @return String
|
|
2140
2234
|
*/
|
|
2141
|
-
|
|
2235
|
+
get name():string;
|
|
2142
2236
|
/**
|
|
2143
|
-
*
|
|
2144
|
-
*
|
|
2237
|
+
* The options for this custom column.
|
|
2238
|
+
* @return CustomColumOptions
|
|
2239
|
+
*/
|
|
2240
|
+
get options():CustomColumnOptions;
|
|
2241
|
+
/**
|
|
2242
|
+
* Type of custom column. One of
|
|
2243
|
+
*
|
|
2145
2244
|
* <ul>
|
|
2146
|
-
* <li>
|
|
2147
|
-
* <li>
|
|
2148
|
-
*
|
|
2149
|
-
* <li>
|
|
2150
|
-
* in the resulting table.</li>
|
|
2245
|
+
* <li>FORMAT_COLOR</li>
|
|
2246
|
+
* <li>FORMAT_NUMBER</li>
|
|
2247
|
+
* <li>FORMAT_DATE</li>
|
|
2248
|
+
* <li>NEW</li>
|
|
2151
2249
|
* </ul>
|
|
2250
|
+
* @return String
|
|
2152
2251
|
*/
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2252
|
+
get type():string;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
/**
|
|
2256
|
+
* Deprecated for use in Deephaven Core.
|
|
2257
|
+
* @deprecated
|
|
2258
|
+
*/
|
|
2259
|
+
export class Client {
|
|
2260
|
+
static readonly EVENT_REQUEST_FAILED:string;
|
|
2261
|
+
static readonly EVENT_REQUEST_STARTED:string;
|
|
2262
|
+
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2263
|
+
|
|
2264
|
+
constructor();
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
/**
|
|
2268
|
+
* A js type for operating on input tables.
|
|
2269
|
+
*
|
|
2270
|
+
* Represents a User Input Table, which can have data added to it from other sources.
|
|
2271
|
+
*
|
|
2272
|
+
* You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
|
|
2273
|
+
* key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
|
|
2274
|
+
* succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
|
|
2275
|
+
* before sending the next operation.
|
|
2276
|
+
*
|
|
2277
|
+
* Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
|
|
2278
|
+
*
|
|
2279
|
+
* To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
|
|
2280
|
+
* object.
|
|
2281
|
+
*/
|
|
2282
|
+
export class InputTable {
|
|
2283
|
+
protected constructor();
|
|
2284
|
+
|
|
2157
2285
|
/**
|
|
2158
|
-
* a
|
|
2159
|
-
*
|
|
2160
|
-
*
|
|
2161
|
-
*
|
|
2162
|
-
* @return Promise of dh.
|
|
2286
|
+
* Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
|
|
2287
|
+
* property at that name and validate it can be put into the given column type.
|
|
2288
|
+
* @param row -
|
|
2289
|
+
* @param userTimeZone -
|
|
2290
|
+
* @return Promise of dh.InputTable
|
|
2163
2291
|
*/
|
|
2164
|
-
|
|
2292
|
+
addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
|
|
2165
2293
|
/**
|
|
2166
|
-
*
|
|
2167
|
-
* @
|
|
2294
|
+
* Add multiple rows to a table.
|
|
2295
|
+
* @param rows -
|
|
2296
|
+
* @param userTimeZone -
|
|
2297
|
+
* @return Promise of dh.InputTable
|
|
2168
2298
|
*/
|
|
2169
|
-
|
|
2299
|
+
addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
|
|
2170
2300
|
/**
|
|
2171
|
-
*
|
|
2172
|
-
*
|
|
2301
|
+
* Add an entire table to this Input Table. Only column names that match the definition of the input table will be
|
|
2302
|
+
* copied, and all key columns must have values filled in. This only copies the current state of the source table;
|
|
2303
|
+
* future updates to the source table will not be reflected in the Input Table. The returned promise will be
|
|
2304
|
+
* resolved to the same InputTable instance this method was called upon once the server returns.
|
|
2305
|
+
* @param tableToAdd -
|
|
2306
|
+
* @return Promise of dh.InputTable
|
|
2173
2307
|
*/
|
|
2174
|
-
|
|
2175
|
-
get groupedColumns():Array<Column>;
|
|
2308
|
+
addTable(tableToAdd:Table):Promise<InputTable>;
|
|
2176
2309
|
/**
|
|
2177
|
-
*
|
|
2178
|
-
* @
|
|
2310
|
+
* Add multiple tables to this Input Table.
|
|
2311
|
+
* @param tablesToAdd -
|
|
2312
|
+
* @return Promise of dh.InputTable
|
|
2179
2313
|
*/
|
|
2180
|
-
|
|
2314
|
+
addTables(tablesToAdd:Table[]):Promise<InputTable>;
|
|
2181
2315
|
/**
|
|
2182
|
-
*
|
|
2183
|
-
*
|
|
2184
|
-
*
|
|
2185
|
-
* @return double
|
|
2316
|
+
* Deletes an entire table from this Input Table. Key columns must match the Input Table.
|
|
2317
|
+
* @param tableToDelete -
|
|
2318
|
+
* @return Promise of dh.InputTable
|
|
2186
2319
|
*/
|
|
2187
|
-
|
|
2320
|
+
deleteTable(tableToDelete:Table):Promise<InputTable>;
|
|
2188
2321
|
/**
|
|
2189
|
-
*
|
|
2190
|
-
* @
|
|
2322
|
+
* Delete multiple tables from this Input Table.
|
|
2323
|
+
* @param tablesToDelete -
|
|
2324
|
+
* @return
|
|
2191
2325
|
*/
|
|
2192
|
-
|
|
2326
|
+
deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
|
|
2327
|
+
/**
|
|
2328
|
+
* A list of the key columns, by name
|
|
2329
|
+
* @return String array.
|
|
2330
|
+
*/
|
|
2331
|
+
get keys():string[];
|
|
2193
2332
|
/**
|
|
2194
|
-
*
|
|
2195
|
-
* @return
|
|
2333
|
+
* A list of the value columns, by name
|
|
2334
|
+
* @return String array.
|
|
2196
2335
|
*/
|
|
2197
|
-
get
|
|
2336
|
+
get values():string[];
|
|
2198
2337
|
/**
|
|
2199
|
-
*
|
|
2200
|
-
*
|
|
2201
|
-
* @return boolean
|
|
2338
|
+
* A list of the key columns.
|
|
2339
|
+
* @return Column array.
|
|
2202
2340
|
*/
|
|
2203
|
-
get
|
|
2341
|
+
get keyColumns():Column[];
|
|
2204
2342
|
/**
|
|
2205
|
-
*
|
|
2206
|
-
* @
|
|
2207
|
-
* @param callback - a function to call when the event occurs
|
|
2208
|
-
* @return Returns a cleanup function.
|
|
2209
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2343
|
+
* A list of the value Column objects
|
|
2344
|
+
* @return {@link dh.Column} array.
|
|
2210
2345
|
*/
|
|
2211
|
-
|
|
2212
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2213
|
-
hasListeners(name:string):boolean;
|
|
2346
|
+
get valueColumns():Column[];
|
|
2214
2347
|
/**
|
|
2215
|
-
*
|
|
2216
|
-
* @
|
|
2217
|
-
* @param callback -
|
|
2218
|
-
* @return
|
|
2219
|
-
* @typeParam T -
|
|
2348
|
+
* The source table for this Input Table
|
|
2349
|
+
* @return dh.table
|
|
2220
2350
|
*/
|
|
2221
|
-
|
|
2351
|
+
get table():Table;
|
|
2222
2352
|
}
|
|
2223
2353
|
|
|
2224
2354
|
/**
|
|
2225
|
-
*
|
|
2226
|
-
* to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
|
|
2227
|
-
* methods return a new Sort instance.
|
|
2355
|
+
* Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
2228
2356
|
*/
|
|
2229
|
-
export class
|
|
2230
|
-
static readonly ASCENDING:string;
|
|
2231
|
-
static readonly DESCENDING:string;
|
|
2232
|
-
static readonly REVERSE:string;
|
|
2233
|
-
|
|
2357
|
+
export class BigDecimalWrapper {
|
|
2234
2358
|
protected constructor();
|
|
2235
2359
|
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
*/
|
|
2240
|
-
asc():Sort;
|
|
2241
|
-
/**
|
|
2242
|
-
* Builds a Sort instance to sort values in descending order.
|
|
2243
|
-
* @return {@link dh.Sort}
|
|
2244
|
-
*/
|
|
2245
|
-
desc():Sort;
|
|
2246
|
-
/**
|
|
2247
|
-
* Builds a Sort instance which takes the absolute value before applying order.
|
|
2248
|
-
* @return {@link dh.Sort}
|
|
2249
|
-
*/
|
|
2250
|
-
abs():Sort;
|
|
2360
|
+
static ofString(value:string):BigDecimalWrapper;
|
|
2361
|
+
asNumber():number;
|
|
2362
|
+
valueOf():string;
|
|
2251
2363
|
toString():string;
|
|
2364
|
+
equals(o:object):boolean;
|
|
2365
|
+
hashCode():number;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
export class LoginCredentials {
|
|
2369
|
+
type?:string|null;
|
|
2370
|
+
username?:string|null;
|
|
2371
|
+
token?:string|null;
|
|
2372
|
+
|
|
2373
|
+
constructor();
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
/**
|
|
2377
|
+
* Options for custom columns.
|
|
2378
|
+
*/
|
|
2379
|
+
export class CustomColumnOptions {
|
|
2252
2380
|
/**
|
|
2253
|
-
*
|
|
2254
|
-
*
|
|
2255
|
-
*/
|
|
2256
|
-
get isAbs():boolean;
|
|
2257
|
-
/**
|
|
2258
|
-
* The column which is sorted.
|
|
2259
|
-
* @return {@link dh.Column}
|
|
2260
|
-
*/
|
|
2261
|
-
get column():Column;
|
|
2262
|
-
/**
|
|
2263
|
-
* The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
|
|
2264
|
-
* @return String
|
|
2381
|
+
* When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
|
|
2382
|
+
* nodes.
|
|
2265
2383
|
*/
|
|
2266
|
-
|
|
2384
|
+
rollupNodeType?:RollupNodeTypeType|null;
|
|
2385
|
+
|
|
2386
|
+
constructor();
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
export class DateWrapper extends LongWrapper {
|
|
2390
|
+
protected constructor();
|
|
2391
|
+
|
|
2392
|
+
static ofJsDate(date:Date):DateWrapper;
|
|
2393
|
+
asDate():Date;
|
|
2267
2394
|
}
|
|
2268
2395
|
|
|
2269
2396
|
/**
|
|
@@ -2292,242 +2419,152 @@ export namespace dh {
|
|
|
2292
2419
|
get size():number;
|
|
2293
2420
|
}
|
|
2294
2421
|
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
* some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
|
|
2301
|
-
* backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
|
|
2302
|
-
* object type, the client code that handles the payloads is expected to know what to expect. See
|
|
2303
|
-
* {@link dh.WidgetMessageDetails} for more information.
|
|
2304
|
-
* <p>
|
|
2305
|
-
* When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
|
|
2306
|
-
* responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
|
|
2307
|
-
* event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
|
|
2308
|
-
* can close, and after close no more messages will be processed. There can be some latency in closing locally while
|
|
2309
|
-
* remote messages are still pending - it is up to implementations of plugins to handle this case.
|
|
2310
|
-
* <p>
|
|
2311
|
-
* Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
|
|
2312
|
-
* What it does handle however, is allowing those messages to include references to server-side objects with those
|
|
2313
|
-
* payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
|
|
2314
|
-
* objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
|
|
2315
|
-
* reference to them and pass them back to the server, either to the current plugin instance, or through another API.
|
|
2316
|
-
* The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
|
|
2317
|
-
* entirely to the plugin. Messages will arrive in the order they were sent.
|
|
2318
|
-
* <p>
|
|
2319
|
-
* This can suggest several patterns for how plugins operate:
|
|
2320
|
-
* <ul>
|
|
2321
|
-
* <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
|
|
2322
|
-
* easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
|
|
2323
|
-
* `pandas.DataFrame` will result in a widget that only contains a static
|
|
2324
|
-
* {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
|
|
2325
|
-
* provided to the JS API consumer.</li>
|
|
2326
|
-
* <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
|
|
2327
|
-
* which provided them. One concrete example of this could have been
|
|
2328
|
-
* {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
|
|
2329
|
-
* before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
|
|
2330
|
-
* the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
|
|
2331
|
-
* <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
|
|
2332
|
-
* instance, so when the widget goes away, those objects should be released as well. This is also an example of
|
|
2333
|
-
* {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
|
|
2334
|
-
* an internal table instance.</li>
|
|
2335
|
-
* </ul>
|
|
2336
|
-
*
|
|
2337
|
-
* Handling server objects in messages also has more than one potential pattern that can be used:
|
|
2338
|
-
* <ul>
|
|
2339
|
-
* <li>One object per message - the message clearly is about that object, no other details required.</li>
|
|
2340
|
-
* <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
|
|
2341
|
-
* referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
|
|
2342
|
-
* behaves, where the figure descriptor schema includes an index for each created series, describing which table should
|
|
2343
|
-
* be used, which columns should be mapped to each axis.</li>
|
|
2344
|
-
* <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
|
|
2345
|
-
* was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
|
|
2346
|
-
* messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
|
|
2347
|
-
* without the server somehow signaling that it will never reference that export again.</li>
|
|
2348
|
-
* </ul>
|
|
2349
|
-
*/
|
|
2350
|
-
export class Widget implements WidgetMessageDetails, HasEventHandling {
|
|
2351
|
-
static readonly EVENT_MESSAGE:string;
|
|
2352
|
-
static readonly EVENT_CLOSE:string;
|
|
2422
|
+
export class QueryInfo {
|
|
2423
|
+
static readonly EVENT_TABLE_OPENED:string;
|
|
2424
|
+
static readonly EVENT_DISCONNECT:string;
|
|
2425
|
+
static readonly EVENT_RECONNECT:string;
|
|
2426
|
+
static readonly EVENT_CONNECT:string;
|
|
2353
2427
|
|
|
2354
2428
|
protected constructor();
|
|
2429
|
+
}
|
|
2355
2430
|
|
|
2431
|
+
/**
|
|
2432
|
+
* Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
|
|
2433
|
+
* roll-up table.
|
|
2434
|
+
*/
|
|
2435
|
+
export class RollupConfig {
|
|
2356
2436
|
/**
|
|
2357
|
-
*
|
|
2437
|
+
* Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
|
|
2358
2438
|
*/
|
|
2359
|
-
|
|
2360
|
-
getDataAsBase64():string;
|
|
2361
|
-
getDataAsU8():Uint8Array;
|
|
2362
|
-
getDataAsString():string;
|
|
2439
|
+
groupingColumns:Array<String>;
|
|
2363
2440
|
/**
|
|
2364
|
-
*
|
|
2365
|
-
*
|
|
2366
|
-
* @param references - an array of objects that can be safely sent to the server
|
|
2441
|
+
* Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
|
|
2442
|
+
* roll-up table.
|
|
2367
2443
|
*/
|
|
2368
|
-
|
|
2369
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2370
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2371
|
-
hasListeners(name:string):boolean;
|
|
2372
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2444
|
+
aggregations:{ [key: string]: Array<string>; };
|
|
2373
2445
|
/**
|
|
2374
|
-
*
|
|
2375
|
-
*
|
|
2376
|
-
*
|
|
2446
|
+
* Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
|
|
2447
|
+
* rows in the underlying table which make up that grouping. Since these values might be a different type from the
|
|
2448
|
+
* rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
|
|
2449
|
+
* as if they were Column.constituentType instead of Column.type. Defaults to false.
|
|
2377
2450
|
*/
|
|
2378
|
-
|
|
2451
|
+
includeConstituents:boolean;
|
|
2452
|
+
includeOriginalColumns?:boolean|null;
|
|
2379
2453
|
/**
|
|
2380
|
-
*
|
|
2381
|
-
* @return the type of this widget
|
|
2454
|
+
* Optional parameter indicating if original column descriptions should be included. Defaults to true.
|
|
2382
2455
|
*/
|
|
2383
|
-
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
export class LoginCredentials {
|
|
2387
|
-
type?:string|null;
|
|
2388
|
-
username?:string|null;
|
|
2389
|
-
token?:string|null;
|
|
2456
|
+
includeDescriptions:boolean;
|
|
2390
2457
|
|
|
2391
2458
|
constructor();
|
|
2392
2459
|
}
|
|
2393
2460
|
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
static readonly EVENT_REQUEST_FAILED:string;
|
|
2400
|
-
static readonly EVENT_REQUEST_STARTED:string;
|
|
2401
|
-
static readonly EVENT_REQUEST_SUCCEEDED:string;
|
|
2461
|
+
/**
|
|
2462
|
+
* Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
|
|
2463
|
+
* column.
|
|
2464
|
+
*/
|
|
2465
|
+
export class Column {
|
|
2402
2466
|
/**
|
|
2403
|
-
*
|
|
2467
|
+
* If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
|
|
2468
|
+
* column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
|
|
2469
|
+
* @return String
|
|
2404
2470
|
*/
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
static readonly LOGIN_TYPE_ANONYMOUS:string;
|
|
2408
|
-
|
|
2409
|
-
constructor(serverUrl:string, connectOptions?:ConnectOptions);
|
|
2471
|
+
readonly constituentType?:string|null;
|
|
2472
|
+
readonly description?:string|null;
|
|
2410
2473
|
|
|
2411
|
-
|
|
2412
|
-
getServerUrl():string;
|
|
2413
|
-
getAuthConfigValues():Promise<string[][]>;
|
|
2414
|
-
login(credentials:LoginCredentials):Promise<void>;
|
|
2415
|
-
relogin(token:RefreshToken):Promise<void>;
|
|
2416
|
-
onConnected(timeoutInMillis?:number):Promise<void>;
|
|
2417
|
-
getServerConfigValues():Promise<string[][]>;
|
|
2418
|
-
getStorageService():dh.storage.StorageService;
|
|
2419
|
-
getAsIdeConnection():Promise<IdeConnection>;
|
|
2420
|
-
disconnect():void;
|
|
2421
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
2422
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2423
|
-
hasListeners(name:string):boolean;
|
|
2424
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
2425
|
-
}
|
|
2474
|
+
protected constructor();
|
|
2426
2475
|
|
|
2427
|
-
/**
|
|
2428
|
-
* Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
|
|
2429
|
-
* some options, JS applications can run code on the server, and interact with available exportable objects.
|
|
2430
|
-
*/
|
|
2431
|
-
export class IdeConnection implements HasEventHandling {
|
|
2432
2476
|
/**
|
|
2433
|
-
*
|
|
2477
|
+
* the value for this column in the given row. Type will be consistent with the type of the Column.
|
|
2478
|
+
* @param row -
|
|
2479
|
+
* @return Any
|
|
2480
|
+
*/
|
|
2481
|
+
get(row:Row):any;
|
|
2482
|
+
getFormat(row:Row):Format;
|
|
2483
|
+
/**
|
|
2484
|
+
* Creates a sort builder object, to be used when sorting by this column.
|
|
2485
|
+
* @return {@link dh.Sort}
|
|
2434
2486
|
*/
|
|
2435
|
-
|
|
2436
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2437
|
-
static readonly EVENT_RECONNECT:string;
|
|
2438
|
-
static readonly EVENT_SHUTDOWN:string;
|
|
2439
|
-
|
|
2440
|
-
protected constructor();
|
|
2441
|
-
|
|
2487
|
+
sort():Sort;
|
|
2442
2488
|
/**
|
|
2443
|
-
*
|
|
2489
|
+
* Creates a new value for use in filters based on this column. Used either as a parameter to another filter
|
|
2490
|
+
* operation, or as a builder to create a filter operation.
|
|
2491
|
+
* @return {@link dh.FilterValue}
|
|
2444
2492
|
*/
|
|
2445
|
-
|
|
2446
|
-
running():Promise<IdeConnection>;
|
|
2447
|
-
getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
|
|
2448
|
-
subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
|
|
2493
|
+
filter():FilterValue;
|
|
2449
2494
|
/**
|
|
2450
|
-
*
|
|
2451
|
-
*
|
|
2452
|
-
*
|
|
2453
|
-
* <p>
|
|
2454
|
-
* Shared objects will remain available using the sharedTicketBytes until the client that first shared them
|
|
2455
|
-
* releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
|
|
2456
|
-
* the remote end has signaled that it has successfully fetched the object before releasing it from this client.
|
|
2457
|
-
* <p>
|
|
2458
|
-
* Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
|
|
2459
|
-
* prevent access by unauthorized clients.
|
|
2460
|
-
* @param object - the object to share with another client/user
|
|
2461
|
-
* @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
|
|
2462
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2463
|
-
* @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
|
|
2464
|
-
* by another client, or will reject if an error occurs.
|
|
2495
|
+
* a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
|
|
2496
|
+
* @param expression -
|
|
2497
|
+
* @return {@link dh.CustomColumn}
|
|
2465
2498
|
*/
|
|
2466
|
-
|
|
2499
|
+
formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
2467
2500
|
/**
|
|
2468
|
-
*
|
|
2469
|
-
*
|
|
2470
|
-
*
|
|
2471
|
-
* The type of the object must be passed so that the object can be read from the server correct - the other client
|
|
2472
|
-
* should provide this information.
|
|
2473
|
-
* @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
|
|
2474
|
-
* string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
|
|
2475
|
-
* @param type - The type of the object, so it can be correctly read from the server
|
|
2476
|
-
* @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
|
|
2501
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2502
|
+
* @param expression -
|
|
2503
|
+
* @return {@link dh.CustomColumn}
|
|
2477
2504
|
*/
|
|
2478
|
-
|
|
2505
|
+
formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
2479
2506
|
/**
|
|
2480
|
-
*
|
|
2481
|
-
*
|
|
2482
|
-
*
|
|
2483
|
-
* @param callback -
|
|
2484
|
-
* @return {@link io.deephaven.web.shared.fu.JsRunnable}
|
|
2507
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2508
|
+
* @param expression -
|
|
2509
|
+
* @return {@link dh.CustomColumn}
|
|
2485
2510
|
*/
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
getConsoleTypes():Promise<Array<string>>;
|
|
2489
|
-
getWorkerHeapInfo():Promise<WorkerHeapInfo>;
|
|
2511
|
+
formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
2512
|
+
toString():string;
|
|
2490
2513
|
/**
|
|
2491
|
-
*
|
|
2492
|
-
* @
|
|
2493
|
-
* @param callback - a function to call when the event occurs
|
|
2494
|
-
* @return Returns a cleanup function.
|
|
2495
|
-
* @typeParam T - the type of the data that the event will provide
|
|
2514
|
+
* Label for this column.
|
|
2515
|
+
* @return String
|
|
2496
2516
|
*/
|
|
2497
|
-
|
|
2498
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
|
|
2499
|
-
hasListeners(name:string):boolean;
|
|
2517
|
+
get name():string;
|
|
2500
2518
|
/**
|
|
2501
|
-
*
|
|
2519
|
+
* True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
|
|
2520
|
+
* {@link Table.uncoalesced}.
|
|
2521
|
+
* @return true if the column is a partition column
|
|
2522
|
+
*/
|
|
2523
|
+
get isPartitionColumn():boolean;
|
|
2524
|
+
/**
|
|
2525
|
+
*
|
|
2526
|
+
* @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
|
|
2527
|
+
* @return int
|
|
2528
|
+
*/
|
|
2529
|
+
get index():number;
|
|
2530
|
+
get isSortable():boolean;
|
|
2531
|
+
/**
|
|
2532
|
+
* Type of the row data that can be found in this column.
|
|
2533
|
+
* @return String
|
|
2534
|
+
*/
|
|
2535
|
+
get type():string;
|
|
2536
|
+
/**
|
|
2537
|
+
* Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
|
|
2538
|
+
* table using <b>applyCustomColumns</b> with the parameters specified.
|
|
2539
|
+
* @param expression -
|
|
2540
|
+
* @param options -
|
|
2541
|
+
* @return {@link dh.CustomColumn}
|
|
2542
|
+
*/
|
|
2543
|
+
static formatRowColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
2544
|
+
/**
|
|
2545
|
+
* a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
|
|
2502
2546
|
* @param name -
|
|
2503
|
-
* @param
|
|
2504
|
-
* @
|
|
2505
|
-
* @
|
|
2547
|
+
* @param expression -
|
|
2548
|
+
* @param options -
|
|
2549
|
+
* @return {@link dh.CustomColumn}
|
|
2506
2550
|
*/
|
|
2507
|
-
|
|
2551
|
+
static createCustomColumn(name:string, expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
|
|
2508
2552
|
}
|
|
2509
2553
|
|
|
2510
2554
|
/**
|
|
2511
|
-
*
|
|
2512
|
-
* this type TableMap.
|
|
2513
|
-
* @deprecated
|
|
2555
|
+
* Event fired when a command is issued from the client.
|
|
2514
2556
|
*/
|
|
2515
|
-
export class
|
|
2516
|
-
|
|
2517
|
-
static readonly EVENT_DISCONNECT:string;
|
|
2518
|
-
static readonly EVENT_RECONNECT:string;
|
|
2519
|
-
static readonly EVENT_RECONNECTFAILED:string;
|
|
2557
|
+
export class CommandInfo {
|
|
2558
|
+
constructor(code:string, result:Promise<dh.ide.CommandResult>);
|
|
2520
2559
|
|
|
2521
|
-
|
|
2560
|
+
get result():Promise<dh.ide.CommandResult>;
|
|
2561
|
+
get code():string;
|
|
2522
2562
|
}
|
|
2523
2563
|
|
|
2524
|
-
|
|
2525
|
-
* Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
|
|
2526
|
-
*/
|
|
2527
|
-
export class BigIntegerWrapper {
|
|
2564
|
+
export class LongWrapper {
|
|
2528
2565
|
protected constructor();
|
|
2529
2566
|
|
|
2530
|
-
static ofString(str:string):
|
|
2567
|
+
static ofString(str:string):LongWrapper;
|
|
2531
2568
|
asNumber():number;
|
|
2532
2569
|
valueOf():string;
|
|
2533
2570
|
toString():string;
|
|
@@ -2544,6 +2581,13 @@ export namespace dh {
|
|
|
2544
2581
|
static readonly BOOLEAN:ValueTypeType;
|
|
2545
2582
|
}
|
|
2546
2583
|
|
|
2584
|
+
type SearchDisplayModeType = string;
|
|
2585
|
+
export class SearchDisplayMode {
|
|
2586
|
+
static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
|
|
2587
|
+
static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
|
|
2588
|
+
static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2547
2591
|
/**
|
|
2548
2592
|
* A set of string constants that can be used to describe the different objects the JS API can export.
|
|
2549
2593
|
*/
|
|
@@ -2582,17 +2626,96 @@ export namespace dh {
|
|
|
2582
2626
|
static readonly SKIP:AggregationOperationType;
|
|
2583
2627
|
}
|
|
2584
2628
|
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2629
|
+
/**
|
|
2630
|
+
* Describes the type of node in a rollup table.
|
|
2631
|
+
*/
|
|
2632
|
+
type RollupNodeTypeType = string;
|
|
2633
|
+
export class RollupNodeType {
|
|
2634
|
+
static readonly ROLLUP_NODE_TYPE_AGGREGATED:RollupNodeTypeType;
|
|
2635
|
+
static readonly ROLLUP_NODE_TYPE_CONSTITUENT:RollupNodeTypeType;
|
|
2590
2636
|
}
|
|
2591
2637
|
|
|
2592
2638
|
}
|
|
2593
2639
|
|
|
2594
2640
|
export namespace dh.ide {
|
|
2595
2641
|
|
|
2642
|
+
/**
|
|
2643
|
+
* Indicates the result of code run on the server.
|
|
2644
|
+
*/
|
|
2645
|
+
export interface CommandResult {
|
|
2646
|
+
/**
|
|
2647
|
+
* Describes changes made in the course of this command.
|
|
2648
|
+
* @return {@link dh.ide.VariableChanges}.
|
|
2649
|
+
*/
|
|
2650
|
+
get changes():VariableChanges;
|
|
2651
|
+
/**
|
|
2652
|
+
* If the command failed, the error message will be provided here.
|
|
2653
|
+
* @return String
|
|
2654
|
+
*/
|
|
2655
|
+
get error():string;
|
|
2656
|
+
}
|
|
2657
|
+
/**
|
|
2658
|
+
* A format to describe a variable available to be read from the server. Application fields are optional, and only
|
|
2659
|
+
* populated when a variable is provided by application mode.
|
|
2660
|
+
* <p>
|
|
2661
|
+
* APIs which take a VariableDefinition must at least be provided an object with a <b>type</b> and <b>id</b> field.
|
|
2662
|
+
*/
|
|
2663
|
+
export interface VariableDefinition {
|
|
2664
|
+
get name():string;
|
|
2665
|
+
/**
|
|
2666
|
+
* Optional description for the variable's contents, typically used to provide more detail that wouldn't be
|
|
2667
|
+
* reasonable to put in the title
|
|
2668
|
+
* @return String
|
|
2669
|
+
*/
|
|
2670
|
+
get description():string;
|
|
2671
|
+
/**
|
|
2672
|
+
* An opaque identifier for this variable
|
|
2673
|
+
* @return String
|
|
2674
|
+
*/
|
|
2675
|
+
get id():string;
|
|
2676
|
+
/**
|
|
2677
|
+
* The type of the variable, one of <b>dh.VariableType</b>
|
|
2678
|
+
* @return dh.VariableType.
|
|
2679
|
+
*/
|
|
2680
|
+
get type():dh.VariableTypeType;
|
|
2681
|
+
/**
|
|
2682
|
+
* The name of the variable, to be used when rendering it to a user
|
|
2683
|
+
* @return String
|
|
2684
|
+
*/
|
|
2685
|
+
get title():string;
|
|
2686
|
+
/**
|
|
2687
|
+
* Optional description for the variable's contents, typically used to provide more detail that wouldn't be
|
|
2688
|
+
* reasonable to put in the title
|
|
2689
|
+
* @return String
|
|
2690
|
+
*/
|
|
2691
|
+
get applicationId():string;
|
|
2692
|
+
/**
|
|
2693
|
+
* The name of the application which provided this variable
|
|
2694
|
+
* @return String
|
|
2695
|
+
*/
|
|
2696
|
+
get applicationName():string;
|
|
2697
|
+
}
|
|
2698
|
+
/**
|
|
2699
|
+
* Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
|
|
2700
|
+
* server.
|
|
2701
|
+
*/
|
|
2702
|
+
export interface LogItem {
|
|
2703
|
+
/**
|
|
2704
|
+
* The level of the log message, enabling the client to ignore messages.
|
|
2705
|
+
* @return String
|
|
2706
|
+
*/
|
|
2707
|
+
get logLevel():string;
|
|
2708
|
+
/**
|
|
2709
|
+
* Timestamp of the message in microseconds since Jan 1, 1970 UTC.
|
|
2710
|
+
* @return double
|
|
2711
|
+
*/
|
|
2712
|
+
get micros():number;
|
|
2713
|
+
/**
|
|
2714
|
+
* The log message written on the server.
|
|
2715
|
+
* @return String
|
|
2716
|
+
*/
|
|
2717
|
+
get message():string;
|
|
2718
|
+
}
|
|
2596
2719
|
/**
|
|
2597
2720
|
* Describes changes in the current set of variables in the script session. Note that variables that changed value
|
|
2598
2721
|
* without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
|
|
@@ -2615,96 +2738,147 @@ export namespace dh.ide {
|
|
|
2615
2738
|
*
|
|
2616
2739
|
* @return The variables that changed value during this operation.
|
|
2617
2740
|
*/
|
|
2618
|
-
get updated():Array<VariableDefinition>;
|
|
2741
|
+
get updated():Array<VariableDefinition>;
|
|
2742
|
+
}
|
|
2743
|
+
/**
|
|
2744
|
+
* Specifies a type and either id or name (but not both).
|
|
2745
|
+
*/
|
|
2746
|
+
export interface VariableDescriptor {
|
|
2747
|
+
type:string;
|
|
2748
|
+
id?:string|null;
|
|
2749
|
+
name?:string|null;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
export namespace dh.grpc {
|
|
2754
|
+
|
|
2755
|
+
/**
|
|
2756
|
+
* Options for creating a gRPC stream transport instance.
|
|
2757
|
+
*/
|
|
2758
|
+
export interface GrpcTransportOptions {
|
|
2759
|
+
/**
|
|
2760
|
+
* The gRPC method URL.
|
|
2761
|
+
*/
|
|
2762
|
+
url:URL;
|
|
2763
|
+
/**
|
|
2764
|
+
* True to enable debug logging for this stream.
|
|
2765
|
+
*/
|
|
2766
|
+
debug:boolean;
|
|
2767
|
+
/**
|
|
2768
|
+
* Callback for when headers and status are received. The headers are a map of header names to values, and the
|
|
2769
|
+
* status is the HTTP status code. If the connection could not be made, the status should be 0.
|
|
2770
|
+
*/
|
|
2771
|
+
onHeaders:(headers:{ [key: string]: string|Array<string>; },status:number)=>void;
|
|
2772
|
+
/**
|
|
2773
|
+
* Callback for when a chunk of data is received.
|
|
2774
|
+
*/
|
|
2775
|
+
onChunk:(chunk:Uint8Array)=>void;
|
|
2776
|
+
/**
|
|
2777
|
+
* Callback for when the stream ends, with an error instance if it can be provided. Note that the present
|
|
2778
|
+
* implementation does not consume errors, even if provided.
|
|
2779
|
+
*/
|
|
2780
|
+
onEnd:(error?:Error|undefined|null)=>void;
|
|
2619
2781
|
}
|
|
2620
2782
|
/**
|
|
2621
|
-
*
|
|
2622
|
-
* server.
|
|
2783
|
+
* Factory for creating gRPC transports.
|
|
2623
2784
|
*/
|
|
2624
|
-
export interface
|
|
2625
|
-
/**
|
|
2626
|
-
* The level of the log message, enabling the client to ignore messages.
|
|
2627
|
-
* @return String
|
|
2628
|
-
*/
|
|
2629
|
-
get logLevel():string;
|
|
2785
|
+
export interface GrpcTransportFactory {
|
|
2630
2786
|
/**
|
|
2631
|
-
*
|
|
2632
|
-
* @
|
|
2787
|
+
* Create a new transport instance.
|
|
2788
|
+
* @param options - options for creating the transport
|
|
2789
|
+
* @return a transport instance to use for gRPC communication
|
|
2633
2790
|
*/
|
|
2634
|
-
|
|
2791
|
+
create(options:GrpcTransportOptions):GrpcTransport;
|
|
2635
2792
|
/**
|
|
2636
|
-
*
|
|
2637
|
-
* @
|
|
2793
|
+
* Return true to signal that created transports may have {@link GrpcTransport.sendMessage} called on it
|
|
2794
|
+
* more than once before {@link GrpcTransport.finishSend} should be called.
|
|
2795
|
+
* @return true to signal that the implementation can stream multiple messages, false otherwise indicating that
|
|
2796
|
+
* Open/Next gRPC calls should be used
|
|
2638
2797
|
*/
|
|
2639
|
-
get
|
|
2798
|
+
get supportsClientStreaming():boolean;
|
|
2640
2799
|
}
|
|
2641
2800
|
/**
|
|
2642
|
-
*
|
|
2801
|
+
* gRPC transport implementation.
|
|
2643
2802
|
*/
|
|
2644
|
-
export interface
|
|
2803
|
+
export interface GrpcTransport {
|
|
2645
2804
|
/**
|
|
2646
|
-
*
|
|
2647
|
-
* @
|
|
2805
|
+
* Starts the stream, sending metadata to the server.
|
|
2806
|
+
* @param metadata - the headers to send the server when opening the connection
|
|
2648
2807
|
*/
|
|
2649
|
-
|
|
2808
|
+
start(metadata:{ [key: string]: string|Array<string>; }):void;
|
|
2650
2809
|
/**
|
|
2651
|
-
*
|
|
2652
|
-
* @
|
|
2810
|
+
* Sends a message to the server.
|
|
2811
|
+
* @param msgBytes - bytes to send to the server
|
|
2653
2812
|
*/
|
|
2654
|
-
|
|
2813
|
+
sendMessage(msgBytes:Uint8Array):void;
|
|
2814
|
+
/**
|
|
2815
|
+
* "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still
|
|
2816
|
+
* open to receiving messages.
|
|
2817
|
+
*/
|
|
2818
|
+
finishSend():void;
|
|
2819
|
+
/**
|
|
2820
|
+
* End the stream, both notifying the server that no more messages will be sent nor received, and preventing the
|
|
2821
|
+
* client from receiving any more events.
|
|
2822
|
+
*/
|
|
2823
|
+
cancel():void;
|
|
2655
2824
|
}
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
export namespace dh.i18n {
|
|
2828
|
+
|
|
2656
2829
|
/**
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2659
|
-
*
|
|
2660
|
-
*
|
|
2830
|
+
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2831
|
+
*
|
|
2832
|
+
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2833
|
+
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2834
|
+
* BigDecimal.
|
|
2661
2835
|
*/
|
|
2662
|
-
export
|
|
2663
|
-
get name():string;
|
|
2836
|
+
export class NumberFormat {
|
|
2664
2837
|
/**
|
|
2665
|
-
*
|
|
2666
|
-
*
|
|
2667
|
-
* @
|
|
2838
|
+
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2839
|
+
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2840
|
+
* @param pattern -
|
|
2668
2841
|
*/
|
|
2669
|
-
|
|
2842
|
+
constructor(pattern:string);
|
|
2843
|
+
|
|
2670
2844
|
/**
|
|
2671
|
-
*
|
|
2672
|
-
*
|
|
2845
|
+
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2846
|
+
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2847
|
+
* take advantage of caching
|
|
2848
|
+
* @param pattern -
|
|
2849
|
+
* @return dh.i18n.NumberFormat
|
|
2673
2850
|
*/
|
|
2674
|
-
|
|
2851
|
+
static getFormat(pattern:string):NumberFormat;
|
|
2675
2852
|
/**
|
|
2676
|
-
*
|
|
2677
|
-
* @
|
|
2853
|
+
* Parses the given text using the cached format matching the given pattern.
|
|
2854
|
+
* @param pattern -
|
|
2855
|
+
* @param text -
|
|
2856
|
+
* @return double
|
|
2678
2857
|
*/
|
|
2679
|
-
|
|
2858
|
+
static parse(pattern:string, text:string):number;
|
|
2680
2859
|
/**
|
|
2681
|
-
*
|
|
2860
|
+
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2861
|
+
* format matching the given pattern string.
|
|
2862
|
+
* @param pattern -
|
|
2863
|
+
* @param number -
|
|
2682
2864
|
* @return String
|
|
2683
2865
|
*/
|
|
2684
|
-
|
|
2866
|
+
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2685
2867
|
/**
|
|
2686
|
-
*
|
|
2687
|
-
*
|
|
2688
|
-
* @return
|
|
2868
|
+
* Parses the given text using this instance's pattern into a JS Number.
|
|
2869
|
+
* @param text -
|
|
2870
|
+
* @return double
|
|
2689
2871
|
*/
|
|
2690
|
-
|
|
2872
|
+
parse(text:string):number;
|
|
2691
2873
|
/**
|
|
2692
|
-
*
|
|
2874
|
+
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2875
|
+
* @param number -
|
|
2693
2876
|
* @return String
|
|
2694
2877
|
*/
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
/**
|
|
2698
|
-
* Specifies a type and either id or name (but not both).
|
|
2699
|
-
*/
|
|
2700
|
-
export interface VariableDescriptor {
|
|
2701
|
-
type:string;
|
|
2702
|
-
id?:string|null;
|
|
2703
|
-
name?:string|null;
|
|
2878
|
+
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2879
|
+
toString():string;
|
|
2704
2880
|
}
|
|
2705
|
-
}
|
|
2706
2881
|
|
|
2707
|
-
export namespace dh.i18n {
|
|
2708
2882
|
|
|
2709
2883
|
/**
|
|
2710
2884
|
* Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
|
|
@@ -2915,147 +3089,48 @@ export namespace dh.i18n {
|
|
|
2915
3089
|
toString():string;
|
|
2916
3090
|
}
|
|
2917
3091
|
|
|
2918
|
-
/**
|
|
2919
|
-
* Exported wrapper of the GWT NumberFormat, plus LongWrapper support
|
|
2920
|
-
*
|
|
2921
|
-
* Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
|
|
2922
|
-
* implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
|
|
2923
|
-
* BigDecimal.
|
|
2924
|
-
*/
|
|
2925
|
-
export class NumberFormat {
|
|
2926
|
-
/**
|
|
2927
|
-
* Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
|
|
2928
|
-
* function, which will create and cache an instance so that later calls share the same instance.
|
|
2929
|
-
* @param pattern -
|
|
2930
|
-
*/
|
|
2931
|
-
constructor(pattern:string);
|
|
2932
|
-
|
|
2933
|
-
/**
|
|
2934
|
-
* a number format instance matching the specified format. If this format has not been specified before, a new
|
|
2935
|
-
* instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
|
|
2936
|
-
* take advantage of caching
|
|
2937
|
-
* @param pattern -
|
|
2938
|
-
* @return dh.i18n.NumberFormat
|
|
2939
|
-
*/
|
|
2940
|
-
static getFormat(pattern:string):NumberFormat;
|
|
2941
|
-
/**
|
|
2942
|
-
* Parses the given text using the cached format matching the given pattern.
|
|
2943
|
-
* @param pattern -
|
|
2944
|
-
* @param text -
|
|
2945
|
-
* @return double
|
|
2946
|
-
*/
|
|
2947
|
-
static parse(pattern:string, text:string):number;
|
|
2948
|
-
/**
|
|
2949
|
-
* Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
|
|
2950
|
-
* format matching the given pattern string.
|
|
2951
|
-
* @param pattern -
|
|
2952
|
-
* @param number -
|
|
2953
|
-
* @return String
|
|
2954
|
-
*/
|
|
2955
|
-
static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2956
|
-
/**
|
|
2957
|
-
* Parses the given text using this instance's pattern into a JS Number.
|
|
2958
|
-
* @param text -
|
|
2959
|
-
* @return double
|
|
2960
|
-
*/
|
|
2961
|
-
parse(text:string):number;
|
|
2962
|
-
/**
|
|
2963
|
-
* Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
|
|
2964
|
-
* @param number -
|
|
2965
|
-
* @return String
|
|
2966
|
-
*/
|
|
2967
|
-
format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
|
|
2968
|
-
toString():string;
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
3092
|
}
|
|
2973
3093
|
|
|
2974
|
-
export namespace dh.
|
|
3094
|
+
export namespace dh.plot {
|
|
2975
3095
|
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
export interface GrpcTransportOptions {
|
|
2980
|
-
/**
|
|
2981
|
-
* The gRPC method URL.
|
|
2982
|
-
*/
|
|
2983
|
-
url:URL;
|
|
2984
|
-
/**
|
|
2985
|
-
* True to enable debug logging for this stream.
|
|
2986
|
-
*/
|
|
2987
|
-
debug:boolean;
|
|
2988
|
-
/**
|
|
2989
|
-
* Callback for when headers and status are received. The headers are a map of header names to values, and the
|
|
2990
|
-
* status is the HTTP status code. If the connection could not be made, the status should be 0.
|
|
2991
|
-
*/
|
|
2992
|
-
onHeaders:(headers:{ [key: string]: string|Array<string>; },status:number)=>void;
|
|
2993
|
-
/**
|
|
2994
|
-
* Callback for when a chunk of data is received.
|
|
2995
|
-
*/
|
|
2996
|
-
onChunk:(chunk:Uint8Array)=>void;
|
|
2997
|
-
/**
|
|
2998
|
-
* Callback for when the stream ends, with an error instance if it can be provided. Note that the present
|
|
2999
|
-
* implementation does not consume errors, even if provided.
|
|
3000
|
-
*/
|
|
3001
|
-
onEnd:(error?:Error|undefined|null)=>void;
|
|
3096
|
+
export interface FigureDataUpdatedEvent {
|
|
3097
|
+
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3098
|
+
get series():Series[];
|
|
3002
3099
|
}
|
|
3003
3100
|
/**
|
|
3004
|
-
*
|
|
3101
|
+
* Describes a template that will be used to make new series instances when a new table added to a plotBy.
|
|
3005
3102
|
*/
|
|
3006
|
-
export interface
|
|
3103
|
+
export interface MultiSeries {
|
|
3007
3104
|
/**
|
|
3008
|
-
*
|
|
3009
|
-
* @
|
|
3010
|
-
* @return a transport instance to use for gRPC communication
|
|
3105
|
+
* The name for this multi-series.
|
|
3106
|
+
* @return String
|
|
3011
3107
|
*/
|
|
3012
|
-
|
|
3108
|
+
get name():string;
|
|
3013
3109
|
/**
|
|
3014
|
-
*
|
|
3015
|
-
*
|
|
3016
|
-
* @return true to signal that the implementation can stream multiple messages, false otherwise indicating that
|
|
3017
|
-
* Open/Next gRPC calls should be used
|
|
3110
|
+
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
3111
|
+
* @return int
|
|
3018
3112
|
*/
|
|
3019
|
-
get
|
|
3113
|
+
get plotStyle():SeriesPlotStyleType;
|
|
3020
3114
|
}
|
|
3021
3115
|
/**
|
|
3022
|
-
*
|
|
3116
|
+
* Describes how to access and display data required within a series.
|
|
3023
3117
|
*/
|
|
3024
|
-
export interface
|
|
3025
|
-
/**
|
|
3026
|
-
* Starts the stream, sending metadata to the server.
|
|
3027
|
-
* @param metadata - the headers to send the server when opening the connection
|
|
3028
|
-
*/
|
|
3029
|
-
start(metadata:{ [key: string]: string|Array<string>; }):void;
|
|
3118
|
+
export interface SeriesDataSource {
|
|
3030
3119
|
/**
|
|
3031
|
-
*
|
|
3032
|
-
* @
|
|
3120
|
+
* the type of data stored in the underlying table's Column.
|
|
3121
|
+
* @return String
|
|
3033
3122
|
*/
|
|
3034
|
-
|
|
3123
|
+
get columnType():string;
|
|
3035
3124
|
/**
|
|
3036
|
-
*
|
|
3037
|
-
*
|
|
3125
|
+
* the axis that this source should be drawn on.
|
|
3126
|
+
* @return dh.plot.Axis
|
|
3038
3127
|
*/
|
|
3039
|
-
|
|
3128
|
+
get axis():Axis;
|
|
3040
3129
|
/**
|
|
3041
|
-
*
|
|
3042
|
-
*
|
|
3130
|
+
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
3131
|
+
* @return int
|
|
3043
3132
|
*/
|
|
3044
|
-
|
|
3045
|
-
}
|
|
3046
|
-
}
|
|
3047
|
-
|
|
3048
|
-
export namespace dh.plot {
|
|
3049
|
-
|
|
3050
|
-
export interface OneClick {
|
|
3051
|
-
setValueForColumn(columnName:string, value:any):void;
|
|
3052
|
-
getValueForColumn(columName:string):any;
|
|
3053
|
-
get requireAllFiltersToDisplay():boolean;
|
|
3054
|
-
get columns():dh.Column[];
|
|
3055
|
-
}
|
|
3056
|
-
export interface FigureDataUpdatedEvent {
|
|
3057
|
-
getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
|
|
3058
|
-
get series():Series[];
|
|
3133
|
+
get type():SourceTypeType;
|
|
3059
3134
|
}
|
|
3060
3135
|
/**
|
|
3061
3136
|
* Provides access to the data for displaying in a figure.
|
|
@@ -3101,20 +3176,11 @@ export namespace dh.plot {
|
|
|
3101
3176
|
get multiSeries():MultiSeries;
|
|
3102
3177
|
get shapeLabel():string;
|
|
3103
3178
|
}
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
* The name for this multi-series.
|
|
3110
|
-
* @return String
|
|
3111
|
-
*/
|
|
3112
|
-
get name():string;
|
|
3113
|
-
/**
|
|
3114
|
-
* The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
|
|
3115
|
-
* @return int
|
|
3116
|
-
*/
|
|
3117
|
-
get plotStyle():SeriesPlotStyleType;
|
|
3179
|
+
export interface OneClick {
|
|
3180
|
+
setValueForColumn(columnName:string, value:any):void;
|
|
3181
|
+
getValueForColumn(columName:string):any;
|
|
3182
|
+
get requireAllFiltersToDisplay():boolean;
|
|
3183
|
+
get columns():dh.Column[];
|
|
3118
3184
|
}
|
|
3119
3185
|
/**
|
|
3120
3186
|
* Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
|
|
@@ -3184,113 +3250,6 @@ export namespace dh.plot {
|
|
|
3184
3250
|
get formatType():AxisFormatTypeType;
|
|
3185
3251
|
get minRange():number;
|
|
3186
3252
|
}
|
|
3187
|
-
/**
|
|
3188
|
-
* Describes how to access and display data required within a series.
|
|
3189
|
-
*/
|
|
3190
|
-
export interface SeriesDataSource {
|
|
3191
|
-
/**
|
|
3192
|
-
* the type of data stored in the underlying table's Column.
|
|
3193
|
-
* @return String
|
|
3194
|
-
*/
|
|
3195
|
-
get columnType():string;
|
|
3196
|
-
/**
|
|
3197
|
-
* the axis that this source should be drawn on.
|
|
3198
|
-
* @return dh.plot.Axis
|
|
3199
|
-
*/
|
|
3200
|
-
get axis():Axis;
|
|
3201
|
-
/**
|
|
3202
|
-
* the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
|
|
3203
|
-
* @return int
|
|
3204
|
-
*/
|
|
3205
|
-
get type():SourceTypeType;
|
|
3206
|
-
}
|
|
3207
|
-
|
|
3208
|
-
export class ChartDescriptor {
|
|
3209
|
-
colspan?:number|null;
|
|
3210
|
-
rowspan?:number|null;
|
|
3211
|
-
series:Array<SeriesDescriptor>;
|
|
3212
|
-
axes:Array<AxisDescriptor>;
|
|
3213
|
-
chartType:string;
|
|
3214
|
-
title?:string|null;
|
|
3215
|
-
titleFont?:string|null;
|
|
3216
|
-
titleColor?:string|null;
|
|
3217
|
-
showLegend?:boolean|null;
|
|
3218
|
-
legendFont?:string|null;
|
|
3219
|
-
legendColor?:string|null;
|
|
3220
|
-
is3d?:boolean|null;
|
|
3221
|
-
|
|
3222
|
-
constructor();
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3225
|
-
/**
|
|
3226
|
-
* Helper class for plot downsampling methods.
|
|
3227
|
-
*/
|
|
3228
|
-
export class Downsample {
|
|
3229
|
-
protected constructor();
|
|
3230
|
-
|
|
3231
|
-
/**
|
|
3232
|
-
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3233
|
-
* the same visual fidelity as the original table, but with fewer rows.
|
|
3234
|
-
* @param table - The table to downsample.
|
|
3235
|
-
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3236
|
-
* @param yCols - The names of the Y columns to downsample.
|
|
3237
|
-
* @param width - The width of the visible area in pixels.
|
|
3238
|
-
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3239
|
-
* @return A promise that resolves to the downsampled table.
|
|
3240
|
-
*/
|
|
3241
|
-
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3242
|
-
}
|
|
3243
|
-
|
|
3244
|
-
/**
|
|
3245
|
-
* Provide the details for a chart.
|
|
3246
|
-
*/
|
|
3247
|
-
export class Chart implements dh.HasEventHandling {
|
|
3248
|
-
/**
|
|
3249
|
-
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
3250
|
-
*/
|
|
3251
|
-
static readonly EVENT_SERIES_ADDED:string;
|
|
3252
|
-
/**
|
|
3253
|
-
* The title of the chart.
|
|
3254
|
-
* @return String
|
|
3255
|
-
*/
|
|
3256
|
-
readonly title?:string|null;
|
|
3257
|
-
|
|
3258
|
-
protected constructor();
|
|
3259
|
-
|
|
3260
|
-
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3261
|
-
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3262
|
-
hasListeners(name:string):boolean;
|
|
3263
|
-
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3264
|
-
get column():number;
|
|
3265
|
-
get showLegend():boolean;
|
|
3266
|
-
/**
|
|
3267
|
-
* The axes used in this chart.
|
|
3268
|
-
* @return dh.plot.Axis
|
|
3269
|
-
*/
|
|
3270
|
-
get axes():Axis[];
|
|
3271
|
-
get is3d():boolean;
|
|
3272
|
-
get titleFont():string;
|
|
3273
|
-
get colspan():number;
|
|
3274
|
-
get titleColor():string;
|
|
3275
|
-
get series():Series[];
|
|
3276
|
-
get rowspan():number;
|
|
3277
|
-
/**
|
|
3278
|
-
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
3279
|
-
* @return int
|
|
3280
|
-
*/
|
|
3281
|
-
get chartType():ChartTypeType;
|
|
3282
|
-
get row():number;
|
|
3283
|
-
get legendColor():string;
|
|
3284
|
-
get legendFont():string;
|
|
3285
|
-
get multiSeries():MultiSeries[];
|
|
3286
|
-
}
|
|
3287
|
-
|
|
3288
|
-
export class FigureSourceException {
|
|
3289
|
-
table:dh.Table;
|
|
3290
|
-
source:SeriesDataSource;
|
|
3291
|
-
|
|
3292
|
-
protected constructor();
|
|
3293
|
-
}
|
|
3294
3253
|
|
|
3295
3254
|
export class SeriesDescriptor {
|
|
3296
3255
|
plotStyle:string;
|
|
@@ -3311,13 +3270,6 @@ export namespace dh.plot {
|
|
|
3311
3270
|
constructor();
|
|
3312
3271
|
}
|
|
3313
3272
|
|
|
3314
|
-
export class FigureFetchError {
|
|
3315
|
-
error:object;
|
|
3316
|
-
errors:Array<string>;
|
|
3317
|
-
|
|
3318
|
-
protected constructor();
|
|
3319
|
-
}
|
|
3320
|
-
|
|
3321
3273
|
export class DownsampleOptions {
|
|
3322
3274
|
/**
|
|
3323
3275
|
* Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
|
|
@@ -3345,22 +3297,39 @@ export namespace dh.plot {
|
|
|
3345
3297
|
}
|
|
3346
3298
|
|
|
3347
3299
|
/**
|
|
3348
|
-
*
|
|
3349
|
-
*
|
|
3350
|
-
*
|
|
3300
|
+
* Provides the details for a figure.
|
|
3301
|
+
*
|
|
3302
|
+
* The Deephaven JS API supports automatic lossless downsampling of time-series data, when that data is plotted in one
|
|
3303
|
+
* or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
|
|
3304
|
+
* being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
|
|
3305
|
+
* the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
|
|
3306
|
+
* any) to reduce the number of points sent to the client.
|
|
3307
|
+
*
|
|
3308
|
+
* Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
|
|
3309
|
+
* can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
|
|
3310
|
+
* <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
|
|
3311
|
+
* than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
|
|
3312
|
+
* <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
|
|
3313
|
+
* data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
|
|
3314
|
+
*
|
|
3315
|
+
* Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
|
|
3316
|
+
* UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
|
|
3317
|
+
* accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
|
|
3318
|
+
* that the "important" values are visible.
|
|
3319
|
+
*
|
|
3320
|
+
* Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
|
|
3321
|
+
* First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
|
|
3322
|
+
* is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
|
|
3323
|
+
* configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
|
|
3324
|
+
* the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
|
|
3325
|
+
* indicating to the user why data is not ready yet - when the server side process is complete,
|
|
3326
|
+
* <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
|
|
3327
|
+
* panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
|
|
3328
|
+
* downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
|
|
3329
|
+
*
|
|
3330
|
+
* At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
|
|
3331
|
+
* client-created figures.
|
|
3351
3332
|
*/
|
|
3352
|
-
export class ChartData {
|
|
3353
|
-
constructor(table:dh.Table);
|
|
3354
|
-
|
|
3355
|
-
update(tableData:dh.SubscriptionTableData):void;
|
|
3356
|
-
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3357
|
-
/**
|
|
3358
|
-
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3359
|
-
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3360
|
-
*/
|
|
3361
|
-
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3362
|
-
}
|
|
3363
|
-
|
|
3364
3333
|
export class Figure implements dh.HasEventHandling {
|
|
3365
3334
|
/**
|
|
3366
3335
|
* The title of the figure.
|
|
@@ -3404,61 +3373,167 @@ export namespace dh.plot {
|
|
|
3404
3373
|
*/
|
|
3405
3374
|
static readonly EVENT_DOWNSAMPLENEEDED:string;
|
|
3406
3375
|
|
|
3407
|
-
|
|
3408
|
-
|
|
3376
|
+
protected constructor();
|
|
3377
|
+
|
|
3378
|
+
subscribe(forceDisableDownsample?:DownsampleOptions):void;
|
|
3379
|
+
/**
|
|
3380
|
+
* Disable updates for all series in this figure.
|
|
3381
|
+
*/
|
|
3382
|
+
unsubscribe():void;
|
|
3383
|
+
/**
|
|
3384
|
+
* Close the figure, and clean up subscriptions.
|
|
3385
|
+
*/
|
|
3386
|
+
close():void;
|
|
3387
|
+
/**
|
|
3388
|
+
* The charts to draw.
|
|
3389
|
+
* @return dh.plot.Chart
|
|
3390
|
+
*/
|
|
3391
|
+
get charts():Chart[];
|
|
3392
|
+
get updateInterval():number;
|
|
3393
|
+
get titleColor():string;
|
|
3394
|
+
get titleFont():string;
|
|
3395
|
+
get rows():number;
|
|
3396
|
+
get cols():number;
|
|
3397
|
+
get errors():Array<string>;
|
|
3398
|
+
/**
|
|
3399
|
+
* Listen for events on this object.
|
|
3400
|
+
* @param name - the name of the event to listen for
|
|
3401
|
+
* @param callback - a function to call when the event occurs
|
|
3402
|
+
* @return Returns a cleanup function.
|
|
3403
|
+
* @typeParam T - the type of the data that the event will provide
|
|
3404
|
+
*/
|
|
3405
|
+
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3406
|
+
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3407
|
+
hasListeners(name:string):boolean;
|
|
3408
|
+
/**
|
|
3409
|
+
* Removes an event listener added to this table.
|
|
3410
|
+
* @param name -
|
|
3411
|
+
* @param callback -
|
|
3412
|
+
* @return
|
|
3413
|
+
* @typeParam T -
|
|
3414
|
+
*/
|
|
3415
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3416
|
+
static create(config:FigureDescriptor):Promise<Figure>;
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
export class FigureFetchError {
|
|
3420
|
+
error:object;
|
|
3421
|
+
errors:Array<string>;
|
|
3422
|
+
|
|
3423
|
+
protected constructor();
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3426
|
+
export class ChartDescriptor {
|
|
3427
|
+
colspan?:number|null;
|
|
3428
|
+
rowspan?:number|null;
|
|
3429
|
+
series:Array<SeriesDescriptor>;
|
|
3430
|
+
axes:Array<AxisDescriptor>;
|
|
3431
|
+
chartType:string;
|
|
3432
|
+
title?:string|null;
|
|
3433
|
+
titleFont?:string|null;
|
|
3434
|
+
titleColor?:string|null;
|
|
3435
|
+
showLegend?:boolean|null;
|
|
3436
|
+
legendFont?:string|null;
|
|
3437
|
+
legendColor?:string|null;
|
|
3438
|
+
is3d?:boolean|null;
|
|
3439
|
+
|
|
3440
|
+
constructor();
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
export class SourceDescriptor {
|
|
3444
|
+
axis:AxisDescriptor;
|
|
3445
|
+
table:dh.Table;
|
|
3446
|
+
columnName:string;
|
|
3447
|
+
type:string;
|
|
3448
|
+
|
|
3449
|
+
constructor();
|
|
3450
|
+
}
|
|
3451
|
+
|
|
3452
|
+
export class FigureSourceException {
|
|
3453
|
+
table:dh.Table;
|
|
3454
|
+
source:SeriesDataSource;
|
|
3455
|
+
|
|
3456
|
+
protected constructor();
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
/**
|
|
3460
|
+
* Helper class for plot downsampling methods.
|
|
3461
|
+
*/
|
|
3462
|
+
export class Downsample {
|
|
3463
|
+
protected constructor();
|
|
3464
|
+
|
|
3409
3465
|
/**
|
|
3410
|
-
*
|
|
3466
|
+
* Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
|
|
3467
|
+
* the same visual fidelity as the original table, but with fewer rows.
|
|
3468
|
+
* @param table - The table to downsample.
|
|
3469
|
+
* @param xCol - The name of the X column to downsample. Must be an Instant or long.
|
|
3470
|
+
* @param yCols - The names of the Y columns to downsample.
|
|
3471
|
+
* @param width - The width of the visible area in pixels.
|
|
3472
|
+
* @param xRange - The visible range as `[start, end]` or null to always use all data.
|
|
3473
|
+
* @return A promise that resolves to the downsampled table.
|
|
3411
3474
|
*/
|
|
3412
|
-
|
|
3475
|
+
static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
/**
|
|
3479
|
+
* Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
|
|
3480
|
+
* underlying table, but also support a mapping function to let client code translate data in some way for display and
|
|
3481
|
+
* keep that cached as well.
|
|
3482
|
+
*/
|
|
3483
|
+
export class ChartData {
|
|
3484
|
+
constructor(table:dh.Table);
|
|
3485
|
+
|
|
3486
|
+
update(tableData:dh.SubscriptionTableData):void;
|
|
3487
|
+
getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
|
|
3413
3488
|
/**
|
|
3414
|
-
*
|
|
3489
|
+
* Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
|
|
3490
|
+
* memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
|
|
3415
3491
|
*/
|
|
3416
|
-
|
|
3492
|
+
removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
/**
|
|
3496
|
+
* Provide the details for a chart.
|
|
3497
|
+
*/
|
|
3498
|
+
export class Chart implements dh.HasEventHandling {
|
|
3417
3499
|
/**
|
|
3418
|
-
*
|
|
3419
|
-
* @return dh.plot.Chart
|
|
3500
|
+
* a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
|
|
3420
3501
|
*/
|
|
3421
|
-
|
|
3422
|
-
get updateInterval():number;
|
|
3423
|
-
get titleColor():string;
|
|
3424
|
-
get titleFont():string;
|
|
3425
|
-
get rows():number;
|
|
3426
|
-
get cols():number;
|
|
3427
|
-
get errors():Array<string>;
|
|
3502
|
+
static readonly EVENT_SERIES_ADDED:string;
|
|
3428
3503
|
/**
|
|
3429
|
-
*
|
|
3430
|
-
* @
|
|
3431
|
-
* @param callback - a function to call when the event occurs
|
|
3432
|
-
* @return Returns a cleanup function.
|
|
3433
|
-
* @typeParam T - the type of the data that the event will provide
|
|
3504
|
+
* The title of the chart.
|
|
3505
|
+
* @return String
|
|
3434
3506
|
*/
|
|
3507
|
+
readonly title?:string|null;
|
|
3508
|
+
|
|
3509
|
+
protected constructor();
|
|
3510
|
+
|
|
3435
3511
|
addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
|
|
3436
3512
|
nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
|
|
3437
3513
|
hasListeners(name:string):boolean;
|
|
3514
|
+
removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
|
|
3515
|
+
get column():number;
|
|
3516
|
+
get showLegend():boolean;
|
|
3438
3517
|
/**
|
|
3439
|
-
*
|
|
3440
|
-
* @
|
|
3441
|
-
* @param callback -
|
|
3442
|
-
* @return
|
|
3443
|
-
* @typeParam T -
|
|
3518
|
+
* The axes used in this chart.
|
|
3519
|
+
* @return dh.plot.Axis
|
|
3444
3520
|
*/
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
get
|
|
3461
|
-
get message():string;
|
|
3521
|
+
get axes():Axis[];
|
|
3522
|
+
get is3d():boolean;
|
|
3523
|
+
get titleFont():string;
|
|
3524
|
+
get colspan():number;
|
|
3525
|
+
get titleColor():string;
|
|
3526
|
+
get series():Series[];
|
|
3527
|
+
get rowspan():number;
|
|
3528
|
+
/**
|
|
3529
|
+
* The type of this chart, see <b>ChartType</b> enum for more details.
|
|
3530
|
+
* @return int
|
|
3531
|
+
*/
|
|
3532
|
+
get chartType():ChartTypeType;
|
|
3533
|
+
get row():number;
|
|
3534
|
+
get legendColor():string;
|
|
3535
|
+
get legendFont():string;
|
|
3536
|
+
get multiSeries():MultiSeries[];
|
|
3462
3537
|
}
|
|
3463
3538
|
|
|
3464
3539
|
/**
|
|
@@ -3478,6 +3553,13 @@ export namespace dh.plot {
|
|
|
3478
3553
|
constructor();
|
|
3479
3554
|
}
|
|
3480
3555
|
|
|
3556
|
+
export class SeriesDataSourceException {
|
|
3557
|
+
protected constructor();
|
|
3558
|
+
|
|
3559
|
+
get source():SeriesDataSource;
|
|
3560
|
+
get message():string;
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3481
3563
|
export class AxisDescriptor {
|
|
3482
3564
|
formatType:string;
|
|
3483
3565
|
type:string;
|
|
@@ -3503,6 +3585,27 @@ export namespace dh.plot {
|
|
|
3503
3585
|
}
|
|
3504
3586
|
|
|
3505
3587
|
|
|
3588
|
+
type AxisFormatTypeType = number;
|
|
3589
|
+
export class AxisFormatType {
|
|
3590
|
+
static readonly CATEGORY:AxisFormatTypeType;
|
|
3591
|
+
static readonly NUMBER:AxisFormatTypeType;
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
/**
|
|
3595
|
+
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3596
|
+
* those series should be rendered.
|
|
3597
|
+
*/
|
|
3598
|
+
type ChartTypeType = number;
|
|
3599
|
+
export class ChartType {
|
|
3600
|
+
static readonly XY:ChartTypeType;
|
|
3601
|
+
static readonly PIE:ChartTypeType;
|
|
3602
|
+
static readonly OHLC:ChartTypeType;
|
|
3603
|
+
static readonly CATEGORY:ChartTypeType;
|
|
3604
|
+
static readonly XYZ:ChartTypeType;
|
|
3605
|
+
static readonly CATEGORY_3D:ChartTypeType;
|
|
3606
|
+
static readonly TREEMAP:ChartTypeType;
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3506
3609
|
type AxisPositionType = number;
|
|
3507
3610
|
export class AxisPosition {
|
|
3508
3611
|
static readonly TOP:AxisPositionType;
|
|
@@ -3528,37 +3631,6 @@ export namespace dh.plot {
|
|
|
3528
3631
|
static readonly TREEMAP:SeriesPlotStyleType;
|
|
3529
3632
|
}
|
|
3530
3633
|
|
|
3531
|
-
type AxisTypeType = number;
|
|
3532
|
-
export class AxisType {
|
|
3533
|
-
static readonly X:AxisTypeType;
|
|
3534
|
-
static readonly Y:AxisTypeType;
|
|
3535
|
-
static readonly SHAPE:AxisTypeType;
|
|
3536
|
-
static readonly SIZE:AxisTypeType;
|
|
3537
|
-
static readonly LABEL:AxisTypeType;
|
|
3538
|
-
static readonly COLOR:AxisTypeType;
|
|
3539
|
-
}
|
|
3540
|
-
|
|
3541
|
-
/**
|
|
3542
|
-
* This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
|
|
3543
|
-
* those series should be rendered.
|
|
3544
|
-
*/
|
|
3545
|
-
type ChartTypeType = number;
|
|
3546
|
-
export class ChartType {
|
|
3547
|
-
static readonly XY:ChartTypeType;
|
|
3548
|
-
static readonly PIE:ChartTypeType;
|
|
3549
|
-
static readonly OHLC:ChartTypeType;
|
|
3550
|
-
static readonly CATEGORY:ChartTypeType;
|
|
3551
|
-
static readonly XYZ:ChartTypeType;
|
|
3552
|
-
static readonly CATEGORY_3D:ChartTypeType;
|
|
3553
|
-
static readonly TREEMAP:ChartTypeType;
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
|
-
type AxisFormatTypeType = number;
|
|
3557
|
-
export class AxisFormatType {
|
|
3558
|
-
static readonly CATEGORY:AxisFormatTypeType;
|
|
3559
|
-
static readonly NUMBER:AxisFormatTypeType;
|
|
3560
|
-
}
|
|
3561
|
-
|
|
3562
3634
|
/**
|
|
3563
3635
|
* This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
|
|
3564
3636
|
* 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
|
|
@@ -3588,17 +3660,25 @@ export namespace dh.plot {
|
|
|
3588
3660
|
static readonly HOVER_TEXT:SourceTypeType;
|
|
3589
3661
|
}
|
|
3590
3662
|
|
|
3663
|
+
type AxisTypeType = number;
|
|
3664
|
+
export class AxisType {
|
|
3665
|
+
static readonly X:AxisTypeType;
|
|
3666
|
+
static readonly Y:AxisTypeType;
|
|
3667
|
+
static readonly SHAPE:AxisTypeType;
|
|
3668
|
+
static readonly SIZE:AxisTypeType;
|
|
3669
|
+
static readonly LABEL:AxisTypeType;
|
|
3670
|
+
static readonly COLOR:AxisTypeType;
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3591
3673
|
}
|
|
3592
3674
|
|
|
3593
3675
|
export namespace dh.lsp {
|
|
3594
3676
|
|
|
3595
|
-
export class
|
|
3596
|
-
|
|
3597
|
-
|
|
3677
|
+
export class ParameterInformation {
|
|
3678
|
+
label:string;
|
|
3679
|
+
documentation:MarkupContent;
|
|
3598
3680
|
|
|
3599
3681
|
constructor();
|
|
3600
|
-
|
|
3601
|
-
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3602
3682
|
}
|
|
3603
3683
|
|
|
3604
3684
|
export class TextEdit {
|
|
@@ -3608,33 +3688,35 @@ export namespace dh.lsp {
|
|
|
3608
3688
|
constructor();
|
|
3609
3689
|
}
|
|
3610
3690
|
|
|
3611
|
-
export class
|
|
3612
|
-
|
|
3613
|
-
|
|
3691
|
+
export class Hover {
|
|
3692
|
+
contents:MarkupContent;
|
|
3693
|
+
range:Range;
|
|
3614
3694
|
|
|
3615
3695
|
constructor();
|
|
3616
3696
|
}
|
|
3617
3697
|
|
|
3618
|
-
export class
|
|
3698
|
+
export class Range {
|
|
3699
|
+
start:Position;
|
|
3700
|
+
end:Position;
|
|
3701
|
+
|
|
3702
|
+
constructor();
|
|
3703
|
+
|
|
3704
|
+
isInside(innerStart:Position, innerEnd:Position):boolean;
|
|
3705
|
+
}
|
|
3706
|
+
|
|
3707
|
+
export class SignatureInformation {
|
|
3619
3708
|
label:string;
|
|
3620
|
-
kind:number;
|
|
3621
|
-
detail:string;
|
|
3622
3709
|
documentation:MarkupContent;
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
textEdit:TextEdit;
|
|
3626
|
-
sortText:string;
|
|
3627
|
-
filterText:string;
|
|
3628
|
-
insertTextFormat:number;
|
|
3629
|
-
additionalTextEdits:Array<TextEdit>;
|
|
3630
|
-
commitCharacters:Array<string>;
|
|
3710
|
+
parameters:Array<ParameterInformation>;
|
|
3711
|
+
activeParameter:number;
|
|
3631
3712
|
|
|
3632
3713
|
constructor();
|
|
3633
3714
|
}
|
|
3634
3715
|
|
|
3635
|
-
export class
|
|
3636
|
-
contents:MarkupContent;
|
|
3716
|
+
export class TextDocumentContentChangeEvent {
|
|
3637
3717
|
range:Range;
|
|
3718
|
+
rangeLength:number;
|
|
3719
|
+
text:string;
|
|
3638
3720
|
|
|
3639
3721
|
constructor();
|
|
3640
3722
|
}
|
|
@@ -3652,26 +3734,26 @@ export namespace dh.lsp {
|
|
|
3652
3734
|
copy():Position;
|
|
3653
3735
|
}
|
|
3654
3736
|
|
|
3655
|
-
export class
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3737
|
+
export class CompletionItem {
|
|
3738
|
+
label:string;
|
|
3739
|
+
kind:number;
|
|
3740
|
+
detail:string;
|
|
3741
|
+
documentation:MarkupContent;
|
|
3742
|
+
deprecated:boolean;
|
|
3743
|
+
preselect:boolean;
|
|
3744
|
+
textEdit:TextEdit;
|
|
3745
|
+
sortText:string;
|
|
3746
|
+
filterText:string;
|
|
3747
|
+
insertTextFormat:number;
|
|
3748
|
+
additionalTextEdits:Array<TextEdit>;
|
|
3749
|
+
commitCharacters:Array<string>;
|
|
3666
3750
|
|
|
3667
3751
|
constructor();
|
|
3668
3752
|
}
|
|
3669
3753
|
|
|
3670
|
-
export class
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
parameters:Array<ParameterInformation>;
|
|
3674
|
-
activeParameter:number;
|
|
3754
|
+
export class MarkupContent {
|
|
3755
|
+
kind:string;
|
|
3756
|
+
value:string;
|
|
3675
3757
|
|
|
3676
3758
|
constructor();
|
|
3677
3759
|
}
|
|
@@ -3710,10 +3792,6 @@ export namespace dh.calendar {
|
|
|
3710
3792
|
*/
|
|
3711
3793
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3712
3794
|
}
|
|
3713
|
-
export interface BusinessPeriod {
|
|
3714
|
-
get close():string;
|
|
3715
|
-
get open():string;
|
|
3716
|
-
}
|
|
3717
3795
|
export interface Holiday {
|
|
3718
3796
|
/**
|
|
3719
3797
|
* The date of the Holiday.
|
|
@@ -3726,6 +3804,10 @@ export namespace dh.calendar {
|
|
|
3726
3804
|
*/
|
|
3727
3805
|
get businessPeriods():Array<BusinessPeriod>;
|
|
3728
3806
|
}
|
|
3807
|
+
export interface BusinessPeriod {
|
|
3808
|
+
get close():string;
|
|
3809
|
+
get open():string;
|
|
3810
|
+
}
|
|
3729
3811
|
|
|
3730
3812
|
type DayOfWeekType = string;
|
|
3731
3813
|
export class DayOfWeek {
|