@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.
- package/README.md +5 -1
- package/dist/cdn/perspective.js +3 -2
- package/dist/cdn/perspective.js.map +4 -4
- package/dist/esm/perspective.browser.d.ts +71 -17
- package/dist/esm/perspective.js +2 -2
- package/dist/esm/perspective.js.map +4 -4
- package/dist/esm/perspective.node.d.ts +20 -3
- package/dist/esm/perspective.node.js +734 -39
- package/dist/esm/perspective.node.js.map +4 -4
- package/dist/esm/public_types.d.ts +31 -0
- package/dist/esm/virtual_servers/clickhouse.d.ts +41 -0
- package/dist/esm/virtual_servers/clickhouse.js +6 -1
- package/dist/esm/virtual_servers/clickhouse.js.map +3 -3
- package/dist/esm/virtual_servers/duckdb.d.ts +19 -9
- package/dist/esm/virtual_servers/duckdb.js +1 -1
- package/dist/esm/virtual_servers/duckdb.js.map +3 -3
- package/dist/esm/wasm/cdn.d.ts +12 -0
- package/dist/esm/wasm/migrate.d.ts +40 -0
- package/dist/esm/wasm/registry.d.ts +123 -0
- package/dist/esm/wasm/registry.js +3 -0
- package/dist/esm/wasm/registry.js.map +7 -0
- package/{src/ts/ts-rs/AggSpec.ts → dist/ts-rs/AggSpec.d.ts} +1 -1
- package/{src/ts/ts-rs/Features.ts → dist/ts-rs/Features.d.ts} +16 -6
- package/{src/ts/ts-rs/Filter.ts → dist/ts-rs/Filter.d.ts} +1 -1
- package/{src/ts/ts-rs/FilterTerm.ts → dist/ts-rs/FilterTerm.d.ts} +1 -1
- package/{src/ts/ts-rs/JoinOptions.ts → dist/ts-rs/JoinOptions.d.ts} +1 -1
- package/dist/ts-rs/ListFlatten.d.ts +3 -0
- package/dist/ts-rs/MapFlatten.d.ts +3 -0
- package/{src/ts/ts-rs/OnRemoveData.ts → dist/ts-rs/OnRemoveData.d.ts} +1 -1
- package/{src/ts/ts-rs/OnUpdateData.ts → dist/ts-rs/OnUpdateData.d.ts} +1 -1
- package/{src/ts/ts-rs/OnUpdateOptions.ts → dist/ts-rs/OnUpdateOptions.d.ts} +1 -1
- package/{src/ts/ts-rs/Sort.ts → dist/ts-rs/Sort.d.ts} +1 -1
- package/dist/ts-rs/StructFlatten.d.ts +3 -0
- package/dist/ts-rs/TableIndex.d.ts +9 -0
- package/dist/ts-rs/TableInitOptions.d.ts +65 -0
- package/{src/ts/ts-rs/UpdateOptions.ts → dist/ts-rs/UpdateOptions.d.ts} +1 -1
- package/{src/ts/ts-rs/ViewConfig.ts → dist/ts-rs/ViewConfig.d.ts} +8 -8
- package/{src/ts/ts-rs/ViewConfigUpdate.ts → dist/ts-rs/ViewConfigUpdate.d.ts} +8 -8
- package/{src/ts/ts-rs/ViewOnUpdateResp.ts → dist/ts-rs/ViewOnUpdateResp.d.ts} +1 -1
- package/{src/ts/ts-rs/WindowAggSpec.ts → dist/ts-rs/WindowAggSpec.d.ts} +1 -1
- package/{src/ts/ts-rs/WindowSort.ts → dist/ts-rs/WindowSort.d.ts} +1 -1
- package/{src/ts/ts-rs/WindowSpec.ts → dist/ts-rs/WindowSpec.d.ts} +1 -1
- package/{src/ts/ts-rs/Windows.ts → dist/ts-rs/Windows.d.ts} +1 -1
- package/dist/wasm/perspective-js.d.ts +136 -58
- package/dist/wasm/perspective-js.js +190 -24
- package/dist/wasm/perspective-js.wasm +0 -0
- package/dist/wasm/perspective-js.wasm.d.ts +14 -8
- package/dist/wasm/perspective-migrate.d.ts +41 -0
- package/dist/wasm/perspective-migrate.js +524 -0
- package/dist/wasm/perspective-migrate.wasm +0 -0
- package/dist/wasm/perspective-migrate.wasm.d.ts +8 -0
- package/package.json +30 -15
- package/dist/esm/ts-rs/AggSpec.d.ts +0 -8
- package/dist/esm/ts-rs/Aggregate.d.ts +0 -1
- package/dist/esm/ts-rs/ColumnType.d.ts +0 -4
- package/dist/esm/ts-rs/ColumnWindow.d.ts +0 -4
- package/dist/esm/ts-rs/DeleteOptions.d.ts +0 -6
- package/dist/esm/ts-rs/Expressions.d.ts +0 -3
- package/dist/esm/ts-rs/Features.d.ts +0 -71
- package/dist/esm/ts-rs/Filter.d.ts +0 -2
- package/dist/esm/ts-rs/FilterReducer.d.ts +0 -1
- package/dist/esm/ts-rs/FilterTerm.d.ts +0 -2
- package/dist/esm/ts-rs/GroupRollupMode.d.ts +0 -1
- package/dist/esm/ts-rs/JoinOptions.d.ts +0 -9
- package/dist/esm/ts-rs/JoinType.d.ts +0 -1
- package/dist/esm/ts-rs/ListFlatten.d.ts +0 -1
- package/dist/esm/ts-rs/OnRemoveData.d.ts +0 -6
- package/dist/esm/ts-rs/OnUpdateData.d.ts +0 -6
- package/dist/esm/ts-rs/OnUpdateMode.d.ts +0 -9
- package/dist/esm/ts-rs/OnUpdateOptions.d.ts +0 -7
- package/dist/esm/ts-rs/Scalar.d.ts +0 -5
- package/dist/esm/ts-rs/Sort.d.ts +0 -2
- package/dist/esm/ts-rs/SortDir.d.ts +0 -1
- package/dist/esm/ts-rs/SplitRollupMode.d.ts +0 -9
- package/dist/esm/ts-rs/SystemInfo.d.ts +0 -40
- package/dist/esm/ts-rs/TableInitOptions.d.ts +0 -45
- package/dist/esm/ts-rs/TableReadFormat.d.ts +0 -7
- package/dist/esm/ts-rs/TypedArrayWindow.d.ts +0 -33
- package/dist/esm/ts-rs/UpdateOptions.d.ts +0 -8
- package/dist/esm/ts-rs/ViewConfig.d.ts +0 -24
- package/dist/esm/ts-rs/ViewConfigUpdate.d.ts +0 -116
- package/dist/esm/ts-rs/ViewOnRemoveResp.d.ts +0 -4
- package/dist/esm/ts-rs/ViewOnUpdateResp.d.ts +0 -4
- package/dist/esm/ts-rs/ViewWindow.d.ts +0 -30
- package/dist/esm/ts-rs/WindowAggSpec.d.ts +0 -25
- package/dist/esm/ts-rs/WindowSort.d.ts +0 -7
- package/dist/esm/ts-rs/WindowSortDir.d.ts +0 -6
- package/dist/esm/ts-rs/WindowSpec.d.ts +0 -47
- package/dist/esm/ts-rs/Windows.d.ts +0 -10
- package/src/rust/client.rs +0 -590
- package/src/rust/generic_sql_model.rs +0 -276
- package/src/rust/lib.rs +0 -99
- package/src/rust/table.rs +0 -397
- package/src/rust/table_data.rs +0 -164
- package/src/rust/typed_array.rs +0 -386
- package/src/rust/utils/browser.rs +0 -35
- package/src/rust/utils/console_logger.rs +0 -237
- package/src/rust/utils/errors.rs +0 -274
- package/src/rust/utils/futures.rs +0 -274
- package/src/rust/utils/json.rs +0 -252
- package/src/rust/utils/local_poll_loop.rs +0 -63
- package/src/rust/utils/mod.rs +0 -32
- package/src/rust/utils/serde.rs +0 -46
- package/src/rust/utils/trace_allocator.rs +0 -98
- package/src/rust/view.rs +0 -463
- package/src/rust/virtual_server.rs +0 -991
- package/src/ts/perspective-server.worker.ts +0 -74
- package/src/ts/perspective.browser.ts +0 -380
- package/src/ts/perspective.cdn.ts +0 -28
- package/src/ts/perspective.node.ts +0 -556
- package/src/ts/ts-rs/ListFlatten.ts +0 -3
- package/src/ts/ts-rs/TableInitOptions.ts +0 -42
- package/src/ts/virtual_server.ts +0 -83
- package/src/ts/virtual_servers/clickhouse.ts +0 -533
- package/src/ts/virtual_servers/duckdb.ts +0 -549
- package/src/ts/wasm/browser.ts +0 -134
- package/src/ts/wasm/cdn.ts +0 -32
- package/src/ts/wasm/decompress.ts +0 -83
- package/src/ts/wasm/emscripten_api.ts +0 -91
- package/src/ts/wasm/engine.ts +0 -309
- package/src/ts/wasm/features.ts +0 -31
- package/src/ts/wasm/perspective-server.poly.ts +0 -460
- package/src/ts/websocket.ts +0 -95
- package/tsconfig.json +0 -22
- /package/{src/ts/ts-rs/Aggregate.ts → dist/ts-rs/Aggregate.d.ts} +0 -0
- /package/{src/ts/ts-rs/ColumnType.ts → dist/ts-rs/ColumnType.d.ts} +0 -0
- /package/{src/ts/ts-rs/ColumnWindow.ts → dist/ts-rs/ColumnWindow.d.ts} +0 -0
- /package/{src/ts/ts-rs/DeleteOptions.ts → dist/ts-rs/DeleteOptions.d.ts} +0 -0
- /package/{src/ts/ts-rs/Expressions.ts → dist/ts-rs/Expressions.d.ts} +0 -0
- /package/{src/ts/ts-rs/FilterReducer.ts → dist/ts-rs/FilterReducer.d.ts} +0 -0
- /package/{src/ts/ts-rs/GroupRollupMode.ts → dist/ts-rs/GroupRollupMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/JoinType.ts → dist/ts-rs/JoinType.d.ts} +0 -0
- /package/{src/ts/ts-rs/OnUpdateMode.ts → dist/ts-rs/OnUpdateMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/Scalar.ts → dist/ts-rs/Scalar.d.ts} +0 -0
- /package/{src/ts/ts-rs/SortDir.ts → dist/ts-rs/SortDir.d.ts} +0 -0
- /package/{src/ts/ts-rs/SplitRollupMode.ts → dist/ts-rs/SplitRollupMode.d.ts} +0 -0
- /package/{src/ts/ts-rs/SystemInfo.ts → dist/ts-rs/SystemInfo.d.ts} +0 -0
- /package/{src/ts/ts-rs/TableReadFormat.ts → dist/ts-rs/TableReadFormat.d.ts} +0 -0
- /package/{src/ts/ts-rs/TypedArrayWindow.ts → dist/ts-rs/TypedArrayWindow.d.ts} +0 -0
- /package/{src/ts/ts-rs/ViewOnRemoveResp.ts → dist/ts-rs/ViewOnRemoveResp.d.ts} +0 -0
- /package/{src/ts/ts-rs/ViewWindow.ts → dist/ts-rs/ViewWindow.d.ts} +0 -0
- /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.
|
|
3
|
-
import type { Expressions } from "./Expressions.
|
|
4
|
-
import type { Filter } from "./Filter.
|
|
5
|
-
import type { FilterReducer } from "./FilterReducer.
|
|
6
|
-
import type { GroupRollupMode } from "./GroupRollupMode.
|
|
7
|
-
import type { Sort } from "./Sort.
|
|
8
|
-
import type { SplitRollupMode } from "./SplitRollupMode.
|
|
9
|
-
import type { Windows } from "./Windows.
|
|
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 { WindowSortDir } from "./WindowSortDir.
|
|
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 { WindowSpec } from "./WindowSpec.
|
|
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 "
|
|
117
|
-
export type * from "
|
|
118
|
-
export type * from "
|
|
119
|
-
export type * from "
|
|
120
|
-
export type * from "
|
|
121
|
-
export type * from "
|
|
122
|
-
export type * from "
|
|
123
|
-
export type * from "
|
|
124
|
-
export type * from "
|
|
125
|
-
export type * from "
|
|
126
|
-
export type * from "
|
|
127
|
-
export type * from "
|
|
128
|
-
export type * from "
|
|
129
|
-
export type * from "
|
|
130
|
-
export type * from "
|
|
131
|
-
export type * from "
|
|
132
|
-
export type * from "
|
|
133
|
-
export type * from "
|
|
134
|
-
export type * from "
|
|
135
|
-
export type * from "
|
|
136
|
-
export type * from "
|
|
137
|
-
export type * from "
|
|
138
|
-
export type * from "
|
|
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 "
|
|
141
|
-
import type {ColumnType} from "
|
|
142
|
-
import type {ViewWindow} from "
|
|
143
|
-
import type {TypedArrayWindow} from "
|
|
144
|
-
import type {TableInitOptions} from "
|
|
145
|
-
import type {JoinOptions} from "
|
|
146
|
-
import type {JoinType} from "
|
|
147
|
-
import type {ViewConfigUpdate} from "
|
|
148
|
-
import type * as on_update_args from "
|
|
149
|
-
import type {OnRemoveData} from "
|
|
150
|
-
import type {OnUpdateData} from "
|
|
151
|
-
import type {OnUpdateOptions} from "
|
|
152
|
-
import type {UpdateOptions} from "
|
|
153
|
-
import type {DeleteOptions} from "
|
|
154
|
-
import type {SystemInfo} from "
|
|
155
|
-
import type {ViewConfig} from "
|
|
156
|
-
import type {Scalar} from "
|
|
157
|
-
import type {Features} from "
|
|
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
|
|
347
|
-
* `Table` is being instantiated by _data_,
|
|
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
|
|
1017
|
-
readonly
|
|
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
|
|
1089
|
-
readonly
|
|
1090
|
-
readonly
|
|
1091
|
-
readonly
|
|
1092
|
-
readonly
|
|
1093
|
-
readonly
|
|
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;
|