@perspective-dev/client 5.6.1 → 5.8.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.
Files changed (142) hide show
  1. package/README.md +5 -1
  2. package/dist/cdn/perspective.js +3 -2
  3. package/dist/cdn/perspective.js.map +4 -4
  4. package/dist/esm/perspective.browser.d.ts +71 -17
  5. package/dist/esm/perspective.js +2 -2
  6. package/dist/esm/perspective.js.map +4 -4
  7. package/dist/esm/perspective.node.d.ts +20 -3
  8. package/dist/esm/perspective.node.js +734 -39
  9. package/dist/esm/perspective.node.js.map +4 -4
  10. package/dist/esm/public_types.d.ts +31 -0
  11. package/dist/esm/virtual_servers/clickhouse.d.ts +41 -0
  12. package/dist/esm/virtual_servers/clickhouse.js +6 -1
  13. package/dist/esm/virtual_servers/clickhouse.js.map +3 -3
  14. package/dist/esm/virtual_servers/duckdb.d.ts +19 -9
  15. package/dist/esm/virtual_servers/duckdb.js +1 -1
  16. package/dist/esm/virtual_servers/duckdb.js.map +3 -3
  17. package/dist/esm/wasm/cdn.d.ts +12 -0
  18. package/dist/esm/wasm/migrate.d.ts +40 -0
  19. package/dist/esm/wasm/registry.d.ts +123 -0
  20. package/dist/esm/wasm/registry.js +3 -0
  21. package/dist/esm/wasm/registry.js.map +7 -0
  22. package/{src/ts/ts-rs/AggSpec.ts → dist/ts-rs/AggSpec.d.ts} +1 -1
  23. package/{src/ts/ts-rs/Features.ts → dist/ts-rs/Features.d.ts} +16 -6
  24. package/{src/ts/ts-rs/Filter.ts → dist/ts-rs/Filter.d.ts} +1 -1
  25. package/{src/ts/ts-rs/FilterTerm.ts → dist/ts-rs/FilterTerm.d.ts} +1 -1
  26. package/{src/ts/ts-rs/JoinOptions.ts → dist/ts-rs/JoinOptions.d.ts} +1 -1
  27. package/dist/ts-rs/ListFlatten.d.ts +3 -0
  28. package/dist/ts-rs/MapFlatten.d.ts +3 -0
  29. package/{src/ts/ts-rs/OnRemoveData.ts → dist/ts-rs/OnRemoveData.d.ts} +1 -1
  30. package/{src/ts/ts-rs/OnUpdateData.ts → dist/ts-rs/OnUpdateData.d.ts} +1 -1
  31. package/{src/ts/ts-rs/OnUpdateOptions.ts → dist/ts-rs/OnUpdateOptions.d.ts} +1 -1
  32. package/{src/ts/ts-rs/Sort.ts → dist/ts-rs/Sort.d.ts} +1 -1
  33. package/dist/ts-rs/StructFlatten.d.ts +3 -0
  34. package/dist/ts-rs/TableIndex.d.ts +9 -0
  35. package/dist/ts-rs/TableInitOptions.d.ts +65 -0
  36. package/{src/ts/ts-rs/UpdateOptions.ts → dist/ts-rs/UpdateOptions.d.ts} +1 -1
  37. package/{src/ts/ts-rs/ViewConfig.ts → dist/ts-rs/ViewConfig.d.ts} +8 -8
  38. package/{src/ts/ts-rs/ViewConfigUpdate.ts → dist/ts-rs/ViewConfigUpdate.d.ts} +8 -8
  39. package/{src/ts/ts-rs/ViewOnUpdateResp.ts → dist/ts-rs/ViewOnUpdateResp.d.ts} +1 -1
  40. package/{src/ts/ts-rs/WindowAggSpec.ts → dist/ts-rs/WindowAggSpec.d.ts} +1 -1
  41. package/{src/ts/ts-rs/WindowSort.ts → dist/ts-rs/WindowSort.d.ts} +1 -1
  42. package/{src/ts/ts-rs/WindowSpec.ts → dist/ts-rs/WindowSpec.d.ts} +1 -1
  43. package/{src/ts/ts-rs/Windows.ts → dist/ts-rs/Windows.d.ts} +1 -1
  44. package/dist/wasm/perspective-js.d.ts +136 -58
  45. package/dist/wasm/perspective-js.js +190 -24
  46. package/dist/wasm/perspective-js.wasm +0 -0
  47. package/dist/wasm/perspective-js.wasm.d.ts +14 -8
  48. package/dist/wasm/perspective-migrate.d.ts +41 -0
  49. package/dist/wasm/perspective-migrate.js +524 -0
  50. package/dist/wasm/perspective-migrate.wasm +0 -0
  51. package/dist/wasm/perspective-migrate.wasm.d.ts +8 -0
  52. package/package.json +30 -15
  53. package/dist/esm/ts-rs/AggSpec.d.ts +0 -8
  54. package/dist/esm/ts-rs/Aggregate.d.ts +0 -1
  55. package/dist/esm/ts-rs/ColumnType.d.ts +0 -4
  56. package/dist/esm/ts-rs/ColumnWindow.d.ts +0 -4
  57. package/dist/esm/ts-rs/DeleteOptions.d.ts +0 -6
  58. package/dist/esm/ts-rs/Expressions.d.ts +0 -3
  59. package/dist/esm/ts-rs/Features.d.ts +0 -71
  60. package/dist/esm/ts-rs/Filter.d.ts +0 -2
  61. package/dist/esm/ts-rs/FilterReducer.d.ts +0 -1
  62. package/dist/esm/ts-rs/FilterTerm.d.ts +0 -2
  63. package/dist/esm/ts-rs/GroupRollupMode.d.ts +0 -1
  64. package/dist/esm/ts-rs/JoinOptions.d.ts +0 -9
  65. package/dist/esm/ts-rs/JoinType.d.ts +0 -1
  66. package/dist/esm/ts-rs/ListFlatten.d.ts +0 -1
  67. package/dist/esm/ts-rs/OnRemoveData.d.ts +0 -6
  68. package/dist/esm/ts-rs/OnUpdateData.d.ts +0 -6
  69. package/dist/esm/ts-rs/OnUpdateMode.d.ts +0 -9
  70. package/dist/esm/ts-rs/OnUpdateOptions.d.ts +0 -7
  71. package/dist/esm/ts-rs/Scalar.d.ts +0 -5
  72. package/dist/esm/ts-rs/Sort.d.ts +0 -2
  73. package/dist/esm/ts-rs/SortDir.d.ts +0 -1
  74. package/dist/esm/ts-rs/SplitRollupMode.d.ts +0 -9
  75. package/dist/esm/ts-rs/SystemInfo.d.ts +0 -40
  76. package/dist/esm/ts-rs/TableInitOptions.d.ts +0 -45
  77. package/dist/esm/ts-rs/TableReadFormat.d.ts +0 -7
  78. package/dist/esm/ts-rs/TypedArrayWindow.d.ts +0 -33
  79. package/dist/esm/ts-rs/UpdateOptions.d.ts +0 -8
  80. package/dist/esm/ts-rs/ViewConfig.d.ts +0 -24
  81. package/dist/esm/ts-rs/ViewConfigUpdate.d.ts +0 -116
  82. package/dist/esm/ts-rs/ViewOnRemoveResp.d.ts +0 -4
  83. package/dist/esm/ts-rs/ViewOnUpdateResp.d.ts +0 -4
  84. package/dist/esm/ts-rs/ViewWindow.d.ts +0 -30
  85. package/dist/esm/ts-rs/WindowAggSpec.d.ts +0 -25
  86. package/dist/esm/ts-rs/WindowSort.d.ts +0 -7
  87. package/dist/esm/ts-rs/WindowSortDir.d.ts +0 -6
  88. package/dist/esm/ts-rs/WindowSpec.d.ts +0 -47
  89. package/dist/esm/ts-rs/Windows.d.ts +0 -10
  90. package/src/rust/client.rs +0 -590
  91. package/src/rust/generic_sql_model.rs +0 -276
  92. package/src/rust/lib.rs +0 -99
  93. package/src/rust/table.rs +0 -397
  94. package/src/rust/table_data.rs +0 -164
  95. package/src/rust/typed_array.rs +0 -386
  96. package/src/rust/utils/browser.rs +0 -35
  97. package/src/rust/utils/console_logger.rs +0 -237
  98. package/src/rust/utils/errors.rs +0 -274
  99. package/src/rust/utils/futures.rs +0 -274
  100. package/src/rust/utils/json.rs +0 -252
  101. package/src/rust/utils/local_poll_loop.rs +0 -63
  102. package/src/rust/utils/mod.rs +0 -32
  103. package/src/rust/utils/serde.rs +0 -46
  104. package/src/rust/utils/trace_allocator.rs +0 -98
  105. package/src/rust/view.rs +0 -463
  106. package/src/rust/virtual_server.rs +0 -991
  107. package/src/ts/perspective-server.worker.ts +0 -74
  108. package/src/ts/perspective.browser.ts +0 -380
  109. package/src/ts/perspective.cdn.ts +0 -28
  110. package/src/ts/perspective.node.ts +0 -556
  111. package/src/ts/ts-rs/ListFlatten.ts +0 -3
  112. package/src/ts/ts-rs/TableInitOptions.ts +0 -42
  113. package/src/ts/virtual_server.ts +0 -83
  114. package/src/ts/virtual_servers/clickhouse.ts +0 -533
  115. package/src/ts/virtual_servers/duckdb.ts +0 -549
  116. package/src/ts/wasm/browser.ts +0 -134
  117. package/src/ts/wasm/cdn.ts +0 -32
  118. package/src/ts/wasm/decompress.ts +0 -83
  119. package/src/ts/wasm/emscripten_api.ts +0 -91
  120. package/src/ts/wasm/engine.ts +0 -309
  121. package/src/ts/wasm/features.ts +0 -31
  122. package/src/ts/wasm/perspective-server.poly.ts +0 -460
  123. package/src/ts/websocket.ts +0 -95
  124. package/tsconfig.json +0 -22
  125. /package/{src/ts/ts-rs/Aggregate.ts → dist/ts-rs/Aggregate.d.ts} +0 -0
  126. /package/{src/ts/ts-rs/ColumnType.ts → dist/ts-rs/ColumnType.d.ts} +0 -0
  127. /package/{src/ts/ts-rs/ColumnWindow.ts → dist/ts-rs/ColumnWindow.d.ts} +0 -0
  128. /package/{src/ts/ts-rs/DeleteOptions.ts → dist/ts-rs/DeleteOptions.d.ts} +0 -0
  129. /package/{src/ts/ts-rs/Expressions.ts → dist/ts-rs/Expressions.d.ts} +0 -0
  130. /package/{src/ts/ts-rs/FilterReducer.ts → dist/ts-rs/FilterReducer.d.ts} +0 -0
  131. /package/{src/ts/ts-rs/GroupRollupMode.ts → dist/ts-rs/GroupRollupMode.d.ts} +0 -0
  132. /package/{src/ts/ts-rs/JoinType.ts → dist/ts-rs/JoinType.d.ts} +0 -0
  133. /package/{src/ts/ts-rs/OnUpdateMode.ts → dist/ts-rs/OnUpdateMode.d.ts} +0 -0
  134. /package/{src/ts/ts-rs/Scalar.ts → dist/ts-rs/Scalar.d.ts} +0 -0
  135. /package/{src/ts/ts-rs/SortDir.ts → dist/ts-rs/SortDir.d.ts} +0 -0
  136. /package/{src/ts/ts-rs/SplitRollupMode.ts → dist/ts-rs/SplitRollupMode.d.ts} +0 -0
  137. /package/{src/ts/ts-rs/SystemInfo.ts → dist/ts-rs/SystemInfo.d.ts} +0 -0
  138. /package/{src/ts/ts-rs/TableReadFormat.ts → dist/ts-rs/TableReadFormat.d.ts} +0 -0
  139. /package/{src/ts/ts-rs/TypedArrayWindow.ts → dist/ts-rs/TypedArrayWindow.d.ts} +0 -0
  140. /package/{src/ts/ts-rs/ViewOnRemoveResp.ts → dist/ts-rs/ViewOnRemoveResp.d.ts} +0 -0
  141. /package/{src/ts/ts-rs/ViewWindow.ts → dist/ts-rs/ViewWindow.d.ts} +0 -0
  142. /package/{src/ts/ts-rs/WindowSortDir.ts → dist/ts-rs/WindowSortDir.d.ts} +0 -0
@@ -1,12 +1,12 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
- import type { Aggregate } from "./Aggregate.js";
3
- import type { Expressions } from "./Expressions.js";
4
- import type { Filter } from "./Filter.js";
5
- import type { FilterReducer } from "./FilterReducer.js";
6
- import type { GroupRollupMode } from "./GroupRollupMode.js";
7
- import type { Sort } from "./Sort.js";
8
- import type { SplitRollupMode } from "./SplitRollupMode.js";
9
- import type { Windows } from "./Windows.js";
2
+ import type { Aggregate } from "./Aggregate.d.ts";
3
+ import type { Expressions } from "./Expressions.d.ts";
4
+ import type { Filter } from "./Filter.d.ts";
5
+ import type { FilterReducer } from "./FilterReducer.d.ts";
6
+ import type { GroupRollupMode } from "./GroupRollupMode.d.ts";
7
+ import type { Sort } from "./Sort.d.ts";
8
+ import type { SplitRollupMode } from "./SplitRollupMode.d.ts";
9
+ import type { Windows } from "./Windows.d.ts";
10
10
 
11
11
  export type ViewConfigUpdate = {
12
12
  /**
@@ -1,3 +1,3 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
2
 
3
- export type ViewOnUpdateResp = { delta: Uint8Array | undefined, port_id: number, };
3
+ export type ViewOnUpdateResp = { delta: Uint8Array | undefined, port_id: number, reset: boolean, };
@@ -1,5 +1,5 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
- import type { ColumnType } from "./ColumnType.js";
2
+ import type { ColumnType } from "./ColumnType.d.ts";
3
3
 
4
4
  /**
5
5
  * Specification for a window aggregate.
@@ -1,5 +1,5 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
- import type { WindowSortDir } from "./WindowSortDir.js";
2
+ import type { WindowSortDir } from "./WindowSortDir.d.ts";
3
3
 
4
4
  /**
5
5
  * The `Table` column which orders each partition, with its direction -
@@ -1,5 +1,5 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
- import type { WindowSort } from "./WindowSort.js";
2
+ import type { WindowSort } from "./WindowSort.d.ts";
3
3
 
4
4
  /**
5
5
  * The serialized form of [`WindowSpec`].
@@ -1,5 +1,5 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
- import type { WindowSpec } from "./WindowSpec.js";
2
+ import type { WindowSpec } from "./WindowSpec.d.ts";
3
3
 
4
4
  /**
5
5
  * The window columns of a `ViewConfig`, keyed by output column alias -
@@ -7,7 +7,7 @@
7
7
  */
8
8
  export interface VirtualHostedTable {
9
9
  name: string;
10
- index?: string;
10
+ index?: string | string[];
11
11
  limit?: number;
12
12
  }
13
13
 
@@ -93,6 +93,39 @@ export interface VirtualServerHandler {
93
93
  config: ViewConfig,
94
94
  ): { min: Scalar; max: Scalar } | Promise<{ min: Scalar; max: Scalar }>;
95
95
 
96
+ /**
97
+ * Expand the row at `rowIndex` of a `"rollup"` mode `group_by` view to
98
+ * show its children, each collapsed, returning the number of rows shown.
99
+ * Required when `getFeatures()` declares `expand_collapse`.
100
+ */
101
+ viewExpand?(
102
+ viewId: string,
103
+ config: ViewConfig,
104
+ rowIndex: number,
105
+ ): number | Promise<number>;
106
+
107
+ /**
108
+ * Collapse the row at `rowIndex` of a `"rollup"` mode `group_by` view,
109
+ * discarding its descendants' expansion, returning the number of rows
110
+ * hidden. Required when `getFeatures()` declares `expand_collapse`.
111
+ */
112
+ viewCollapse?(
113
+ viewId: string,
114
+ config: ViewConfig,
115
+ rowIndex: number,
116
+ ): number | Promise<number>;
117
+
118
+ /**
119
+ * Expand every row of a `"rollup"` mode `group_by` view whose path is no
120
+ * longer than `depth` and collapse the rest. Required when
121
+ * `getFeatures()` declares `expand_collapse`.
122
+ */
123
+ viewSetDepth?(
124
+ viewId: string,
125
+ config: ViewConfig,
126
+ depth: number,
127
+ ): void | Promise<void>;
128
+
96
129
  /** Defaults to no optional features. */
97
130
  getFeatures?(): Features | Promise<Features>;
98
131
 
@@ -113,48 +146,48 @@ export interface VirtualServerHandler {
113
146
 
114
147
 
115
148
 
116
- export type * from "../../src/ts/ts-rs/ViewWindow.d.ts";
117
- export type * from "../../src/ts/ts-rs/ColumnType.d.ts";
118
- export type * from "../../src/ts/ts-rs/ColumnWindow.d.ts";
119
- export type * from "../../src/ts/ts-rs/TableInitOptions.d.ts";
120
- export type * from "../../src/ts/ts-rs/ViewConfigUpdate.d.ts";
121
- export type * from "../../src/ts/ts-rs/ViewOnUpdateResp.d.ts";
122
- export type * from "../../src/ts/ts-rs/ViewOnRemoveResp.d.ts";
123
- export type * from "../../src/ts/ts-rs/OnRemoveData.d.ts";
124
- export type * from "../../src/ts/ts-rs/OnUpdateData.d.ts";
125
- export type * from "../../src/ts/ts-rs/OnUpdateOptions.d.ts";
126
- export type * from "../../src/ts/ts-rs/UpdateOptions.d.ts";
127
- export type * from "../../src/ts/ts-rs/DeleteOptions.d.ts";
128
- export type * from "../../src/ts/ts-rs/Scalar.d.ts";
129
- export type * from "../../src/ts/ts-rs/SystemInfo.d.ts";
130
- export type * from "../../src/ts/ts-rs/SortDir.d.ts";
131
- export type * from "../../src/ts/ts-rs/Filter.d.ts";
132
- export type * from "../../src/ts/ts-rs/ViewConfig.d.ts";
133
- export type * from "../../src/ts/ts-rs/JoinOptions.ts";
134
- export type * from "../../src/ts/ts-rs/JoinType.ts";
135
- export type * from "../../src/ts/ts-rs/TypedArrayWindow.ts";
136
- export type * from "../../src/ts/ts-rs/Features.ts";
137
- export type * from "../../src/ts/ts-rs/AggSpec.ts";
138
- export type * from "../../src/ts/ts-rs/WindowAggSpec.ts";
149
+ export type * from "../ts-rs/ViewWindow.d.ts";
150
+ export type * from "../ts-rs/ColumnType.d.ts";
151
+ export type * from "../ts-rs/ColumnWindow.d.ts";
152
+ export type * from "../ts-rs/TableInitOptions.d.ts";
153
+ export type * from "../ts-rs/ViewConfigUpdate.d.ts";
154
+ export type * from "../ts-rs/ViewOnUpdateResp.d.ts";
155
+ export type * from "../ts-rs/ViewOnRemoveResp.d.ts";
156
+ export type * from "../ts-rs/OnRemoveData.d.ts";
157
+ export type * from "../ts-rs/OnUpdateData.d.ts";
158
+ export type * from "../ts-rs/OnUpdateOptions.d.ts";
159
+ export type * from "../ts-rs/UpdateOptions.d.ts";
160
+ export type * from "../ts-rs/DeleteOptions.d.ts";
161
+ export type * from "../ts-rs/Scalar.d.ts";
162
+ export type * from "../ts-rs/SystemInfo.d.ts";
163
+ export type * from "../ts-rs/SortDir.d.ts";
164
+ export type * from "../ts-rs/Filter.d.ts";
165
+ export type * from "../ts-rs/ViewConfig.d.ts";
166
+ export type * from "../ts-rs/JoinOptions.d.ts";
167
+ export type * from "../ts-rs/JoinType.d.ts";
168
+ export type * from "../ts-rs/TypedArrayWindow.d.ts";
169
+ export type * from "../ts-rs/Features.d.ts";
170
+ export type * from "../ts-rs/AggSpec.d.ts";
171
+ export type * from "../ts-rs/WindowAggSpec.d.ts";
139
172
 
140
- import type {ColumnWindow} from "../../src/ts/ts-rs/ColumnWindow.d.ts";
141
- import type {ColumnType} from "../../src/ts/ts-rs/ColumnType.d.ts";
142
- import type {ViewWindow} from "../../src/ts/ts-rs/ViewWindow.d.ts";
143
- import type {TypedArrayWindow} from "../../src/ts/ts-rs/TypedArrayWindow.ts";
144
- import type {TableInitOptions} from "../../src/ts/ts-rs/TableInitOptions.d.ts";
145
- import type {JoinOptions} from "../../src/ts/ts-rs/JoinOptions.ts";
146
- import type {JoinType} from "../../src/ts/ts-rs/JoinType.ts";
147
- import type {ViewConfigUpdate} from "../../src/ts/ts-rs/ViewConfigUpdate.d.ts";
148
- import type * as on_update_args from "../../src/ts/ts-rs/ViewOnUpdateResp.d.ts";
149
- import type {OnRemoveData} from "../../src/ts/ts-rs/OnRemoveData.d.ts";
150
- import type {OnUpdateData} from "../../src/ts/ts-rs/OnUpdateData.d.ts";
151
- import type {OnUpdateOptions} from "../../src/ts/ts-rs/OnUpdateOptions.d.ts";
152
- import type {UpdateOptions} from "../../src/ts/ts-rs/UpdateOptions.d.ts";
153
- import type {DeleteOptions} from "../../src/ts/ts-rs/DeleteOptions.d.ts";
154
- import type {SystemInfo} from "../../src/ts/ts-rs/SystemInfo.d.ts";
155
- import type {ViewConfig} from "../../src/ts/ts-rs/ViewConfig.d.ts";
156
- import type {Scalar} from "../../src/ts/ts-rs/Scalar.d.ts";
157
- import type {Features} from "../../src/ts/ts-rs/Features.ts";
173
+ import type {ColumnWindow} from "../ts-rs/ColumnWindow.d.ts";
174
+ import type {ColumnType} from "../ts-rs/ColumnType.d.ts";
175
+ import type {ViewWindow} from "../ts-rs/ViewWindow.d.ts";
176
+ import type {TypedArrayWindow} from "../ts-rs/TypedArrayWindow.d.ts";
177
+ import type {TableInitOptions} from "../ts-rs/TableInitOptions.d.ts";
178
+ import type {JoinOptions} from "../ts-rs/JoinOptions.d.ts";
179
+ import type {JoinType} from "../ts-rs/JoinType.d.ts";
180
+ import type {ViewConfigUpdate} from "../ts-rs/ViewConfigUpdate.d.ts";
181
+ import type * as on_update_args from "../ts-rs/ViewOnUpdateResp.d.ts";
182
+ import type {OnRemoveData} from "../ts-rs/OnRemoveData.d.ts";
183
+ import type {OnUpdateData} from "../ts-rs/OnUpdateData.d.ts";
184
+ import type {OnUpdateOptions} from "../ts-rs/OnUpdateOptions.d.ts";
185
+ import type {UpdateOptions} from "../ts-rs/UpdateOptions.d.ts";
186
+ import type {DeleteOptions} from "../ts-rs/DeleteOptions.d.ts";
187
+ import type {SystemInfo} from "../ts-rs/SystemInfo.d.ts";
188
+ import type {ViewConfig} from "../ts-rs/ViewConfig.d.ts";
189
+ import type {Scalar} from "../ts-rs/Scalar.d.ts";
190
+ import type {Features} from "../ts-rs/Features.d.ts";
158
191
 
159
192
 
160
193
 
@@ -343,9 +376,10 @@ export class Client {
343
376
  * - `options` - Optional configuration which provides one of:
344
377
  * - `limit` - The max number of rows the resulting [`Table`] can
345
378
  * store.
346
- * - `index` - The column name to use as an _index_ column. If this
347
- * `Table` is being instantiated by _data_, this column name must be
348
- * present in the data.
379
+ * - `index` - The column name, or an array of column names, to use as
380
+ * an _index_. If this `Table` is being instantiated by _data_, these
381
+ * column names must be present in the data. An array keys rows by
382
+ * the combination of the columns' values.
349
383
  * - `name` - The name of the table. This will be generated if it is
350
384
  * not provided.
351
385
  * - `format` - The explicit format of the input data, can be one of
@@ -383,6 +417,12 @@ export class Client {
383
417
  * ```javascript
384
418
  * const table = await client.table(data, { index: "Row ID" });
385
419
  * ```
420
+ *
421
+ * Create a table with a composite `index`:
422
+ *
423
+ * ```javascript
424
+ * const table = await client.table(data, { index: ["name", "sector"] });
425
+ * ```
386
426
  */
387
427
  table(value: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>, options?: TableInitOptions | null): Promise<Table>;
388
428
  /**
@@ -420,18 +460,27 @@ export class GenericSQLVirtualServerModel {
420
460
  * Creates a new `JsDuckDBSqlBuilder` instance.
421
461
  */
422
462
  constructor(args?: any | null);
463
+ /**
464
+ * Returns the SQL relation reference for an entity id.
465
+ */
466
+ quoteEntity(entity_id: string): string;
423
467
  /**
424
468
  * Returns the SQL query that plans the view `config` would build and
425
469
  * reports its result columns without materializing it (`split_by` folded
426
470
  * into `group_by`, no `PIVOT`), or `undefined` when the config selects no
427
471
  * columns.
428
472
  */
429
- tableDescribe(table_id: string, config: any, schema: any): string;
473
+ tableDescribe(table_id: string, config: any, schema: any, unordered?: boolean | null): string;
430
474
  /**
431
475
  * Returns the SQL query to create a view from a table with the given
432
476
  * configuration.
433
477
  */
434
- tableMakeView(table_id: string, view_id: string, config: any, schema: any): string;
478
+ tableMakeView(table_id: string, view_id: string, config: any, schema: any, unordered?: boolean | null): string;
479
+ /**
480
+ * Returns the entity id of the hosted table at relation path `parts`,
481
+ * each part quoted only when it is not a bare identifier.
482
+ */
483
+ tablePath(parts: string[]): string;
435
484
  /**
436
485
  * Returns the SQL query to describe a table's schema.
437
486
  */
@@ -440,6 +489,11 @@ export class GenericSQLVirtualServerModel {
440
489
  * Returns the SQL query to get the row count of a table.
441
490
  */
442
491
  tableSize(table_id: string): string;
492
+ /**
493
+ * Returns the `UPDATE` collapsing the `row_index`-th visible row, whose
494
+ * affected-row count is the number of rows hidden.
495
+ */
496
+ viewCollapse(view_id: string, config: any, row_index: number): string;
443
497
  /**
444
498
  * Returns the SQL query to get the column count of a view.
445
499
  */
@@ -448,6 +502,11 @@ export class GenericSQLVirtualServerModel {
448
502
  * Returns the SQL query to delete a view.
449
503
  */
450
504
  viewDelete(view_id: string): string;
505
+ /**
506
+ * Returns the `UPDATE` expanding the `row_index`-th visible row, whose
507
+ * affected-row count is the number of rows shown.
508
+ */
509
+ viewExpand(view_id: string, config: any, row_index: number): string;
451
510
  /**
452
511
  * Returns the SQL query to fetch data from a view with the given viewport.
453
512
  */
@@ -464,6 +523,11 @@ export class GenericSQLVirtualServerModel {
464
523
  * Returns the SQL query to describe a view's schema.
465
524
  */
466
525
  viewSchema(view_id: string): string;
526
+ /**
527
+ * Returns the `UPDATE` expanding exactly the rows whose path is no longer
528
+ * than `depth`.
529
+ */
530
+ viewSetDepth(view_id: string, config: any, depth: number): string;
467
531
  /**
468
532
  * Returns the SQL query to get the row count of a view.
469
533
  */
@@ -555,6 +619,10 @@ export class Table {
555
619
  * Get a copy of the [`Client`] this [`Table`] came from.
556
620
  */
557
621
  get_client(): Promise<Client>;
622
+ /**
623
+ * Returns the features supported by the server hosting this [`Table`].
624
+ */
625
+ get_features(): Promise<Features>;
558
626
  /**
559
627
  * Returns the name of the index column for the table.
560
628
  *
@@ -562,10 +630,12 @@ export class Table {
562
630
  *
563
631
  * ```javascript
564
632
  * const table = await client.table("x,y\n1,2\n3,4", { index: "x" });
565
- * const index = table.get_index(); // "x"
633
+ * const index = await table.get_index(); // "x"
634
+ * const table2 = await client.table(data, { index: ["x", "y"] });
635
+ * const index2 = await table2.get_index(); // ["x", "y"]
566
636
  * ```
567
637
  */
568
- get_index(): Promise<string>;
638
+ get_index(): Promise<string | string[] | undefined>;
569
639
  /**
570
640
  * Returns the user-specified row limit for this table.
571
641
  */
@@ -596,12 +666,14 @@ export class Table {
596
666
  * # Arguments
597
667
  *
598
668
  * - `indices` - A list of `index` column values for rows that should be
599
- * removed.
669
+ * removed. For a composite `index`, each entry is an array of the index
670
+ * column values in key order.
600
671
  *
601
672
  * # JavaScript Examples
602
673
  *
603
674
  * ```javascript
604
675
  * await table.remove([1, 2, 3]);
676
+ * await composite_table.remove([["AAPL", "Tech"], ["MSFT", "Tech"]]);
605
677
  * ```
606
678
  */
607
679
  remove(value: any, options?: UpdateOptions | null): Promise<void>;
@@ -1013,16 +1085,21 @@ export interface InitOutput {
1013
1085
  readonly genericsqlvirtualservermodel_expressionsDescribe: (a: number, b: number, c: number, d: number, e: number) => void;
1014
1086
  readonly genericsqlvirtualservermodel_getHostedTables: (a: number, b: number) => void;
1015
1087
  readonly genericsqlvirtualservermodel_new: (a: number, b: number) => void;
1016
- readonly genericsqlvirtualservermodel_tableDescribe: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1017
- readonly genericsqlvirtualservermodel_tableMakeView: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
1088
+ readonly genericsqlvirtualservermodel_quoteEntity: (a: number, b: number, c: number, d: number) => void;
1089
+ readonly genericsqlvirtualservermodel_tableDescribe: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1090
+ readonly genericsqlvirtualservermodel_tableMakeView: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1091
+ readonly genericsqlvirtualservermodel_tablePath: (a: number, b: number, c: number, d: number) => void;
1018
1092
  readonly genericsqlvirtualservermodel_tableSchema: (a: number, b: number, c: number, d: number) => void;
1019
1093
  readonly genericsqlvirtualservermodel_tableSize: (a: number, b: number, c: number, d: number) => void;
1094
+ readonly genericsqlvirtualservermodel_viewCollapse: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1020
1095
  readonly genericsqlvirtualservermodel_viewColumnSize: (a: number, b: number, c: number, d: number) => void;
1021
1096
  readonly genericsqlvirtualservermodel_viewDelete: (a: number, b: number, c: number, d: number) => void;
1097
+ readonly genericsqlvirtualservermodel_viewExpand: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1022
1098
  readonly genericsqlvirtualservermodel_viewGetData: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1023
1099
  readonly genericsqlvirtualservermodel_viewGetMinMax: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1024
1100
  readonly genericsqlvirtualservermodel_viewMakeTable: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1025
1101
  readonly genericsqlvirtualservermodel_viewSchema: (a: number, b: number, c: number, d: number) => void;
1102
+ readonly genericsqlvirtualservermodel_viewSetDepth: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1026
1103
  readonly genericsqlvirtualservermodel_viewSize: (a: number, b: number, c: number, d: number) => void;
1027
1104
  readonly init: () => void;
1028
1105
  readonly proxysession_close: (a: number) => number;
@@ -1034,6 +1111,7 @@ export interface InitOutput {
1034
1111
  readonly table_delete: (a: number, b: number) => number;
1035
1112
  readonly table_describe: (a: number, b: number) => number;
1036
1113
  readonly table_get_client: (a: number) => number;
1114
+ readonly table_get_features: (a: number) => number;
1037
1115
  readonly table_get_index: (a: number) => number;
1038
1116
  readonly table_get_limit: (a: number) => number;
1039
1117
  readonly table_get_name: (a: number) => number;
@@ -1085,12 +1163,12 @@ export interface InitOutput {
1085
1163
  readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1086
1164
  readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
1087
1165
  readonly virtualserver_new: (a: number, b: number) => void;
1088
- readonly __wasm_bindgen_func_elem_1688: (a: number, b: number) => void;
1089
- readonly __wasm_bindgen_func_elem_4639: (a: number, b: number) => void;
1090
- readonly __wasm_bindgen_func_elem_13018: (a: number, b: number, c: number, d: number) => void;
1091
- readonly __wasm_bindgen_func_elem_4641: (a: number, b: number, c: number) => void;
1092
- readonly __wasm_bindgen_func_elem_2057: (a: number, b: number) => number;
1093
- readonly __wasm_bindgen_func_elem_2058: (a: number, b: number) => void;
1166
+ readonly __wasm_bindgen_func_elem_1738: (a: number, b: number) => void;
1167
+ readonly __wasm_bindgen_func_elem_4802: (a: number, b: number) => void;
1168
+ readonly __wasm_bindgen_func_elem_13337: (a: number, b: number, c: number, d: number) => void;
1169
+ readonly __wasm_bindgen_func_elem_4804: (a: number, b: number, c: number) => void;
1170
+ readonly __wasm_bindgen_func_elem_2108: (a: number, b: number) => number;
1171
+ readonly __wasm_bindgen_func_elem_2109: (a: number, b: number) => void;
1094
1172
  readonly __wbindgen_export: (a: number, b: number) => number;
1095
1173
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1096
1174
  readonly __wbindgen_export3: (a: number) => void;