@meshagent/meshagent 0.38.4 → 0.39.1
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/CHANGELOG.md +14 -2
- package/dist/browser/datasets-client.d.ts +415 -0
- package/dist/{node/database-client.js → browser/datasets-client.js} +480 -234
- package/dist/browser/entrypoint.js +9 -17
- package/dist/browser/index.d.ts +1 -2
- package/dist/browser/index.js +1 -2
- package/dist/browser/meshagent-client.d.ts +179 -3
- package/dist/browser/meshagent-client.js +333 -25
- package/dist/browser/participant-token.d.ts +5 -5
- package/dist/browser/participant-token.js +14 -13
- package/dist/browser/room-client.d.ts +5 -3
- package/dist/browser/room-client.js +70 -4
- package/dist/esm/datasets-client.d.ts +415 -0
- package/dist/esm/{database-client.js → datasets-client.js} +473 -227
- package/dist/esm/entrypoint.js +6 -12
- package/dist/esm/index.d.ts +1 -2
- package/dist/esm/index.js +1 -2
- package/dist/esm/meshagent-client.d.ts +179 -3
- package/dist/esm/meshagent-client.js +333 -25
- package/dist/esm/participant-token.d.ts +5 -5
- package/dist/esm/participant-token.js +12 -11
- package/dist/esm/room-client.d.ts +5 -3
- package/dist/esm/room-client.js +70 -4
- package/dist/node/datasets-client.d.ts +415 -0
- package/dist/{browser/database-client.js → node/datasets-client.js} +480 -234
- package/dist/node/entrypoint.js +6 -12
- package/dist/node/index.d.ts +1 -2
- package/dist/node/index.js +1 -2
- package/dist/node/meshagent-client.d.ts +179 -3
- package/dist/node/meshagent-client.js +333 -25
- package/dist/node/participant-token.d.ts +5 -5
- package/dist/node/participant-token.js +14 -13
- package/dist/node/room-client.d.ts +5 -3
- package/dist/node/room-client.js +70 -4
- package/package.json +3 -2
- package/dist/browser/data-types.d.ts +0 -67
- package/dist/browser/data-types.js +0 -192
- package/dist/browser/database-client.d.ts +0 -281
- package/dist/esm/data-types.d.ts +0 -67
- package/dist/esm/data-types.js +0 -179
- package/dist/esm/database-client.d.ts +0 -281
- package/dist/node/data-types.d.ts +0 -67
- package/dist/node/data-types.js +0 -192
- package/dist/node/database-client.d.ts +0 -281
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RoomClient = exports.RoomProtocolProxy = void 0;
|
|
4
4
|
const completer_1 = require("./completer");
|
|
5
|
-
const
|
|
5
|
+
const datasets_client_1 = require("./datasets-client");
|
|
6
6
|
const developer_client_1 = require("./developer-client");
|
|
7
7
|
const event_emitter_1 = require("./event-emitter");
|
|
8
8
|
const messaging_client_1 = require("./messaging-client");
|
|
@@ -248,7 +248,7 @@ class RoomClient {
|
|
|
248
248
|
this.developer = new developer_client_1.DeveloperClient({ room: this });
|
|
249
249
|
this.messaging = new messaging_client_1.MessagingClient({ room: this });
|
|
250
250
|
this.queues = new queues_client_1.QueuesClient({ room: this });
|
|
251
|
-
this.
|
|
251
|
+
this.datasets = new datasets_client_1.DatasetsClient({ room: this });
|
|
252
252
|
this.agents = new agent_client_1.AgentsClient({ room: this });
|
|
253
253
|
this.secrets = new secrets_client_1.SecretsClient({
|
|
254
254
|
room: this,
|
|
@@ -302,8 +302,74 @@ class RoomClient {
|
|
|
302
302
|
this._eventsController.add(event);
|
|
303
303
|
this._eventEmitter.emit(event.name, event);
|
|
304
304
|
}
|
|
305
|
-
listen() {
|
|
306
|
-
|
|
305
|
+
listen({ abortSignal } = {}) {
|
|
306
|
+
if (abortSignal === undefined || abortSignal === null) {
|
|
307
|
+
return this._eventsController.stream;
|
|
308
|
+
}
|
|
309
|
+
const source = this._eventsController.stream;
|
|
310
|
+
return {
|
|
311
|
+
[Symbol.asyncIterator]() {
|
|
312
|
+
const eventIterator = source[Symbol.asyncIterator]();
|
|
313
|
+
let abortReject = null;
|
|
314
|
+
let cleanedUp = false;
|
|
315
|
+
const abortError = () => {
|
|
316
|
+
if (abortSignal.reason != null) {
|
|
317
|
+
return abortSignal.reason;
|
|
318
|
+
}
|
|
319
|
+
const error = new Error("Aborted");
|
|
320
|
+
error.name = "AbortError";
|
|
321
|
+
return error;
|
|
322
|
+
};
|
|
323
|
+
const cleanup = async () => {
|
|
324
|
+
if (cleanedUp) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
cleanedUp = true;
|
|
328
|
+
abortSignal.removeEventListener("abort", onAbort);
|
|
329
|
+
await eventIterator.return?.();
|
|
330
|
+
};
|
|
331
|
+
const onAbort = () => {
|
|
332
|
+
const reject = abortReject;
|
|
333
|
+
abortReject = null;
|
|
334
|
+
reject?.(abortError());
|
|
335
|
+
void cleanup();
|
|
336
|
+
};
|
|
337
|
+
abortSignal.addEventListener("abort", onAbort, { once: true });
|
|
338
|
+
return {
|
|
339
|
+
async next() {
|
|
340
|
+
if (abortSignal.aborted) {
|
|
341
|
+
await cleanup();
|
|
342
|
+
return Promise.reject(abortError());
|
|
343
|
+
}
|
|
344
|
+
const abortPromise = new Promise((_, reject) => {
|
|
345
|
+
abortReject = reject;
|
|
346
|
+
});
|
|
347
|
+
try {
|
|
348
|
+
const result = await Promise.race([eventIterator.next(), abortPromise]);
|
|
349
|
+
if (result.done) {
|
|
350
|
+
await cleanup();
|
|
351
|
+
}
|
|
352
|
+
return result;
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
await cleanup();
|
|
356
|
+
throw error;
|
|
357
|
+
}
|
|
358
|
+
finally {
|
|
359
|
+
abortReject = null;
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
async return() {
|
|
363
|
+
await cleanup();
|
|
364
|
+
return { done: true, value: undefined };
|
|
365
|
+
},
|
|
366
|
+
async throw(e) {
|
|
367
|
+
await cleanup();
|
|
368
|
+
return Promise.reject(e);
|
|
369
|
+
},
|
|
370
|
+
};
|
|
371
|
+
},
|
|
372
|
+
};
|
|
307
373
|
}
|
|
308
374
|
async waitForClose() {
|
|
309
375
|
await this._roomClosed.fut;
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { Schema, Table } from "apache-arrow";
|
|
2
|
+
import { RoomClient } from "./room-client";
|
|
3
|
+
export type CreateMode = "create" | "overwrite" | "create_if_not_exists";
|
|
4
|
+
export interface TableRef {
|
|
5
|
+
name: string;
|
|
6
|
+
namespace?: string[];
|
|
7
|
+
alias?: string;
|
|
8
|
+
branch?: string;
|
|
9
|
+
version?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface TableVersion {
|
|
12
|
+
version: number;
|
|
13
|
+
timestamp: Date;
|
|
14
|
+
metadata: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface TableIndex {
|
|
17
|
+
name: string;
|
|
18
|
+
columns: string[];
|
|
19
|
+
type: string;
|
|
20
|
+
fields: number[];
|
|
21
|
+
typeUrl: string | null;
|
|
22
|
+
numRowsIndexed: number | null;
|
|
23
|
+
numSegments: number | null;
|
|
24
|
+
totalSizeBytes: number | null;
|
|
25
|
+
details: Record<string, unknown>;
|
|
26
|
+
statistics: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export type DatasetVectorIndexType = "IVF_PQ" | "IVF_HNSW_PQ" | "IVF_HNSW_SQ" | "IVF_RQ";
|
|
29
|
+
export type DatasetScalarIndexType = "BTREE" | "BITMAP" | "LABEL_LIST" | "NGRAM" | "ZONEMAP" | "INVERTED" | "FTS" | "BLOOMFILTER" | "RTREE";
|
|
30
|
+
export type DatasetIndexType = DatasetVectorIndexType | DatasetScalarIndexType;
|
|
31
|
+
export interface DatasetIndexConfig {
|
|
32
|
+
column: string | string[];
|
|
33
|
+
index_type: DatasetIndexType;
|
|
34
|
+
name?: string;
|
|
35
|
+
metric?: string;
|
|
36
|
+
replace?: boolean;
|
|
37
|
+
num_partitions?: number;
|
|
38
|
+
ivf_centroids?: number[][];
|
|
39
|
+
pq_codebook?: number[][];
|
|
40
|
+
num_sub_vectors?: number;
|
|
41
|
+
accelerator?: string;
|
|
42
|
+
index_cache_size?: number;
|
|
43
|
+
shuffle_partition_batches?: number;
|
|
44
|
+
shuffle_partition_concurrency?: number;
|
|
45
|
+
ivf_centroids_file?: string;
|
|
46
|
+
precomputed_partition_dataset?: string;
|
|
47
|
+
filter_nan?: boolean;
|
|
48
|
+
train?: boolean;
|
|
49
|
+
fragment_ids?: number[];
|
|
50
|
+
index_uuid?: string;
|
|
51
|
+
target_partition_size?: number;
|
|
52
|
+
skip_transpose?: boolean;
|
|
53
|
+
num_bits?: number;
|
|
54
|
+
index_file_version?: string;
|
|
55
|
+
max_level?: number;
|
|
56
|
+
m?: number;
|
|
57
|
+
ef_construction?: number;
|
|
58
|
+
with_position?: boolean;
|
|
59
|
+
memory_limit?: number;
|
|
60
|
+
num_workers?: number;
|
|
61
|
+
skip_merge?: boolean;
|
|
62
|
+
base_tokenizer?: string;
|
|
63
|
+
language?: string;
|
|
64
|
+
max_token_length?: number;
|
|
65
|
+
lower_case?: boolean;
|
|
66
|
+
stem?: boolean;
|
|
67
|
+
remove_stop_words?: boolean;
|
|
68
|
+
custom_stop_words?: string[];
|
|
69
|
+
ascii_folding?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface DatasetOptimizeConfig {
|
|
72
|
+
compact_files?: boolean;
|
|
73
|
+
optimize_indices?: boolean;
|
|
74
|
+
cleanup_old_versions?: boolean;
|
|
75
|
+
target_rows_per_fragment?: number;
|
|
76
|
+
max_rows_per_group?: number;
|
|
77
|
+
max_bytes_per_file?: number;
|
|
78
|
+
materialize_deletions?: boolean;
|
|
79
|
+
materialize_deletions_threshold?: number;
|
|
80
|
+
defer_index_remap?: boolean;
|
|
81
|
+
num_threads?: number;
|
|
82
|
+
batch_size?: number;
|
|
83
|
+
compaction_mode?: "reencode" | "try_binary_copy" | "force_binary_copy";
|
|
84
|
+
binary_copy_read_batch_bytes?: number;
|
|
85
|
+
num_indices_to_merge?: number;
|
|
86
|
+
index_names?: string[];
|
|
87
|
+
retrain?: boolean;
|
|
88
|
+
older_than_seconds?: number;
|
|
89
|
+
retain_versions?: number;
|
|
90
|
+
delete_unverified?: boolean;
|
|
91
|
+
error_if_tagged_old_versions?: boolean;
|
|
92
|
+
delete_rate_limit?: number;
|
|
93
|
+
}
|
|
94
|
+
export interface DatasetOptimizeResult {
|
|
95
|
+
compaction: Record<string, unknown> | null;
|
|
96
|
+
optimizedIndices: boolean;
|
|
97
|
+
cleanup: Record<string, unknown> | null;
|
|
98
|
+
}
|
|
99
|
+
export interface DatasetTableStats {
|
|
100
|
+
dataset: Record<string, unknown>;
|
|
101
|
+
data: Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
export interface TableBranch {
|
|
104
|
+
name: string;
|
|
105
|
+
parentBranch: string | null;
|
|
106
|
+
parentVersion: number | null;
|
|
107
|
+
createdAt: Date | null;
|
|
108
|
+
manifestSize: number | null;
|
|
109
|
+
}
|
|
110
|
+
export interface DatasetSqlQuery {
|
|
111
|
+
kind: "query";
|
|
112
|
+
schema: Schema;
|
|
113
|
+
queryId: string;
|
|
114
|
+
}
|
|
115
|
+
export interface DatasetSqlStatement {
|
|
116
|
+
kind: "statement";
|
|
117
|
+
rowsAffected: number;
|
|
118
|
+
}
|
|
119
|
+
export type DatasetSqlExecution = DatasetSqlQuery | DatasetSqlStatement;
|
|
120
|
+
export type DatasetSqlCancelStatus = "cancelled" | "cancelling" | "not_cancellable";
|
|
121
|
+
export interface DatasetSqlCancelResult {
|
|
122
|
+
status: DatasetSqlCancelStatus;
|
|
123
|
+
}
|
|
124
|
+
export declare abstract class DatasetValueEncoder {
|
|
125
|
+
abstract encodeDatasetValue(): unknown;
|
|
126
|
+
}
|
|
127
|
+
export declare class DatasetExpression extends DatasetValueEncoder {
|
|
128
|
+
readonly expression: string;
|
|
129
|
+
constructor(expression: string);
|
|
130
|
+
encodeDatasetValue(): Record<string, string>;
|
|
131
|
+
toString(): string;
|
|
132
|
+
}
|
|
133
|
+
export declare class DatasetDate extends DatasetValueEncoder {
|
|
134
|
+
readonly value: string;
|
|
135
|
+
constructor(value: string);
|
|
136
|
+
encodeDatasetValue(): Record<string, string>;
|
|
137
|
+
toString(): string;
|
|
138
|
+
}
|
|
139
|
+
export type DatasetJsonScalarValue = null | boolean | number | string;
|
|
140
|
+
export type DatasetJsonValue = DatasetJsonScalarValue | DatasetJsonValue[] | {
|
|
141
|
+
[key: string]: DatasetJsonValue;
|
|
142
|
+
};
|
|
143
|
+
export declare class DatasetStruct extends DatasetValueEncoder {
|
|
144
|
+
readonly fields: Record<string, DatasetValue>;
|
|
145
|
+
constructor(fields: Record<string, DatasetValue>);
|
|
146
|
+
toJson(): Record<string, unknown>;
|
|
147
|
+
encodeDatasetValue(): Record<string, Record<string, unknown>>;
|
|
148
|
+
}
|
|
149
|
+
export declare class DatasetJson extends DatasetValueEncoder {
|
|
150
|
+
readonly value: DatasetJsonValue;
|
|
151
|
+
constructor(value: DatasetJsonValue);
|
|
152
|
+
toJson(): DatasetJsonValue;
|
|
153
|
+
encodeDatasetValue(): Record<string, DatasetJsonValue>;
|
|
154
|
+
}
|
|
155
|
+
export type DatasetScalarValue = null | boolean | number | string | Uint8Array | DatasetUuid | Date;
|
|
156
|
+
export type DatasetValue = DatasetScalarValue | DatasetValueEncoder | DatasetValue[];
|
|
157
|
+
export type DatasetRecord = Record<string, DatasetValue>;
|
|
158
|
+
export type DatasetRows = DatasetRecord[];
|
|
159
|
+
export type DatasetRowChunks = AsyncIterable<DatasetRows> | Iterable<DatasetRows>;
|
|
160
|
+
export type DatasetWhere = string | Record<string, DatasetValue>;
|
|
161
|
+
type DatasetRoomInvoker = Pick<RoomClient, "invoke" | "invokeStream">;
|
|
162
|
+
export declare class DatasetUuid {
|
|
163
|
+
readonly value: string;
|
|
164
|
+
constructor(value: string);
|
|
165
|
+
toString(): string;
|
|
166
|
+
}
|
|
167
|
+
type ArrowTableChunks = Iterable<Table> | AsyncIterable<Table>;
|
|
168
|
+
export declare class DatasetsClient {
|
|
169
|
+
private room;
|
|
170
|
+
constructor({ room }: {
|
|
171
|
+
room: DatasetRoomInvoker;
|
|
172
|
+
});
|
|
173
|
+
private _unexpectedResponseError;
|
|
174
|
+
private invoke;
|
|
175
|
+
private invokeContent;
|
|
176
|
+
private invokeStream;
|
|
177
|
+
private drainWriteStream;
|
|
178
|
+
private streamRows;
|
|
179
|
+
private streamArrow;
|
|
180
|
+
listTables({ namespace, branch }?: {
|
|
181
|
+
namespace?: string[];
|
|
182
|
+
branch?: string;
|
|
183
|
+
}): Promise<string[]>;
|
|
184
|
+
private createTable;
|
|
185
|
+
createTableWithSchema({ name, schema, data, mode, namespace, branch, metadata }: {
|
|
186
|
+
name: string;
|
|
187
|
+
schema?: Schema;
|
|
188
|
+
data?: Iterable<Table> | Table;
|
|
189
|
+
mode?: CreateMode;
|
|
190
|
+
namespace?: string[];
|
|
191
|
+
branch?: string;
|
|
192
|
+
metadata?: Record<string, unknown>;
|
|
193
|
+
}): Promise<void>;
|
|
194
|
+
createTableFromData({ name, data, mode, namespace, branch, metadata }: {
|
|
195
|
+
name: string;
|
|
196
|
+
data?: Iterable<Table> | Table;
|
|
197
|
+
mode?: CreateMode;
|
|
198
|
+
namespace?: string[];
|
|
199
|
+
branch?: string;
|
|
200
|
+
metadata?: Record<string, unknown>;
|
|
201
|
+
}): Promise<void>;
|
|
202
|
+
createTableFromDataStream({ name, chunks, schema, mode, namespace, branch, metadata }: {
|
|
203
|
+
name: string;
|
|
204
|
+
chunks: ArrowTableChunks;
|
|
205
|
+
schema?: Schema;
|
|
206
|
+
mode?: CreateMode;
|
|
207
|
+
namespace?: string[];
|
|
208
|
+
branch?: string;
|
|
209
|
+
metadata?: Record<string, unknown>;
|
|
210
|
+
}): Promise<void>;
|
|
211
|
+
createTableFromJsonData({ name, data, mode, namespace, branch, metadata }: {
|
|
212
|
+
name: string;
|
|
213
|
+
data?: DatasetRows;
|
|
214
|
+
mode?: CreateMode;
|
|
215
|
+
namespace?: string[];
|
|
216
|
+
branch?: string;
|
|
217
|
+
metadata?: Record<string, unknown>;
|
|
218
|
+
}): Promise<void>;
|
|
219
|
+
dropTable({ name, ignoreMissing, namespace, branch }: {
|
|
220
|
+
name: string;
|
|
221
|
+
ignoreMissing?: boolean;
|
|
222
|
+
namespace?: string[];
|
|
223
|
+
branch?: string;
|
|
224
|
+
}): Promise<void>;
|
|
225
|
+
dropIndex({ table, name, namespace, branch }: {
|
|
226
|
+
table: string;
|
|
227
|
+
name: string;
|
|
228
|
+
namespace?: string[];
|
|
229
|
+
branch?: string;
|
|
230
|
+
}): Promise<void>;
|
|
231
|
+
addColumns({ table, newColumns, namespace, branch }: {
|
|
232
|
+
table: string;
|
|
233
|
+
newColumns: Record<string, string> | Schema;
|
|
234
|
+
namespace?: string[];
|
|
235
|
+
branch?: string;
|
|
236
|
+
}): Promise<void>;
|
|
237
|
+
dropColumns({ table, columns, namespace, branch }: {
|
|
238
|
+
table: string;
|
|
239
|
+
columns: string[];
|
|
240
|
+
namespace?: string[];
|
|
241
|
+
branch?: string;
|
|
242
|
+
}): Promise<void>;
|
|
243
|
+
insert({ table, records, namespace, branch }: {
|
|
244
|
+
table: string;
|
|
245
|
+
records: Table;
|
|
246
|
+
namespace?: string[];
|
|
247
|
+
branch?: string;
|
|
248
|
+
}): Promise<void>;
|
|
249
|
+
insertStream({ table, chunks, namespace, branch }: {
|
|
250
|
+
table: string;
|
|
251
|
+
chunks: ArrowTableChunks;
|
|
252
|
+
namespace?: string[];
|
|
253
|
+
branch?: string;
|
|
254
|
+
}): Promise<void>;
|
|
255
|
+
update({ table, where, values, namespace, branch }: {
|
|
256
|
+
table: string;
|
|
257
|
+
where: string;
|
|
258
|
+
values: DatasetRecord;
|
|
259
|
+
namespace?: string[];
|
|
260
|
+
branch?: string;
|
|
261
|
+
}): Promise<void>;
|
|
262
|
+
delete({ table, where, namespace, branch }: {
|
|
263
|
+
table: string;
|
|
264
|
+
where: string;
|
|
265
|
+
namespace?: string[];
|
|
266
|
+
branch?: string;
|
|
267
|
+
}): Promise<void>;
|
|
268
|
+
merge({ table, on, records, namespace, branch }: {
|
|
269
|
+
table: string;
|
|
270
|
+
on: string;
|
|
271
|
+
records: Table;
|
|
272
|
+
namespace?: string[];
|
|
273
|
+
branch?: string;
|
|
274
|
+
}): Promise<void>;
|
|
275
|
+
mergeStream({ table, on, chunks, namespace, branch }: {
|
|
276
|
+
table: string;
|
|
277
|
+
on: string;
|
|
278
|
+
chunks: ArrowTableChunks;
|
|
279
|
+
namespace?: string[];
|
|
280
|
+
branch?: string;
|
|
281
|
+
}): Promise<void>;
|
|
282
|
+
sql({ query, tables, params, namespace, branch }: {
|
|
283
|
+
query: string;
|
|
284
|
+
tables?: Array<TableRef | string>;
|
|
285
|
+
params?: Table;
|
|
286
|
+
namespace?: string[];
|
|
287
|
+
branch?: string;
|
|
288
|
+
}): Promise<Table[]>;
|
|
289
|
+
openSqlQuery({ query, tables, params, namespace, branch }: {
|
|
290
|
+
query: string;
|
|
291
|
+
tables?: Array<TableRef | string>;
|
|
292
|
+
params?: Table;
|
|
293
|
+
namespace?: string[];
|
|
294
|
+
branch?: string;
|
|
295
|
+
}): Promise<DatasetSqlQuery>;
|
|
296
|
+
executeSql({ query, tables, params, namespace, branch }: {
|
|
297
|
+
query: string;
|
|
298
|
+
tables?: Array<TableRef | string>;
|
|
299
|
+
params?: Table;
|
|
300
|
+
namespace?: string[];
|
|
301
|
+
branch?: string;
|
|
302
|
+
}): Promise<DatasetSqlExecution>;
|
|
303
|
+
sqlStream({ query, tables, params, namespace, branch }: {
|
|
304
|
+
query: string;
|
|
305
|
+
tables?: Array<TableRef | string>;
|
|
306
|
+
params?: Table;
|
|
307
|
+
namespace?: string[];
|
|
308
|
+
branch?: string;
|
|
309
|
+
}): AsyncIterable<Table>;
|
|
310
|
+
readSqlQuery({ queryId }: {
|
|
311
|
+
queryId: string;
|
|
312
|
+
}): AsyncIterable<Table>;
|
|
313
|
+
closeSqlQuery({ queryId }: {
|
|
314
|
+
queryId: string;
|
|
315
|
+
}): Promise<void>;
|
|
316
|
+
cancelSqlQuery({ queryId }: {
|
|
317
|
+
queryId: string;
|
|
318
|
+
}): Promise<DatasetSqlCancelResult>;
|
|
319
|
+
executeSqlStatement({ query, tables, params, namespace, branch }: {
|
|
320
|
+
query: string;
|
|
321
|
+
tables?: Array<TableRef | string>;
|
|
322
|
+
params?: Table;
|
|
323
|
+
namespace?: string[];
|
|
324
|
+
branch?: string;
|
|
325
|
+
}): Promise<number>;
|
|
326
|
+
search({ table, text, vector, where, offset, limit, select, namespace, branch, version }: {
|
|
327
|
+
table: string;
|
|
328
|
+
text?: string;
|
|
329
|
+
vector?: number[];
|
|
330
|
+
where?: DatasetWhere;
|
|
331
|
+
offset?: number;
|
|
332
|
+
limit?: number;
|
|
333
|
+
select?: string[];
|
|
334
|
+
namespace?: string[];
|
|
335
|
+
branch?: string;
|
|
336
|
+
version?: number;
|
|
337
|
+
}): Promise<Table[]>;
|
|
338
|
+
searchStream({ table, text, vector, where, offset, limit, select, namespace, branch, version }: {
|
|
339
|
+
table: string;
|
|
340
|
+
text?: string;
|
|
341
|
+
vector?: number[];
|
|
342
|
+
where?: DatasetWhere;
|
|
343
|
+
offset?: number;
|
|
344
|
+
limit?: number;
|
|
345
|
+
select?: string[];
|
|
346
|
+
namespace?: string[];
|
|
347
|
+
branch?: string;
|
|
348
|
+
version?: number;
|
|
349
|
+
}): AsyncIterable<Table>;
|
|
350
|
+
count({ table, text, vector, where, namespace, branch, version }: {
|
|
351
|
+
table: string;
|
|
352
|
+
text?: string;
|
|
353
|
+
vector?: number[];
|
|
354
|
+
where?: DatasetWhere;
|
|
355
|
+
namespace?: string[];
|
|
356
|
+
branch?: string;
|
|
357
|
+
version?: number;
|
|
358
|
+
}): Promise<number>;
|
|
359
|
+
inspect({ table, namespace, branch, version }: {
|
|
360
|
+
table: string;
|
|
361
|
+
namespace?: string[];
|
|
362
|
+
branch?: string;
|
|
363
|
+
version?: number;
|
|
364
|
+
}): Promise<Schema>;
|
|
365
|
+
optimize(table: string): Promise<DatasetOptimizeResult>;
|
|
366
|
+
optimize(params: {
|
|
367
|
+
table: string;
|
|
368
|
+
namespace?: string[];
|
|
369
|
+
branch?: string;
|
|
370
|
+
config?: DatasetOptimizeConfig;
|
|
371
|
+
}): Promise<DatasetOptimizeResult>;
|
|
372
|
+
stats({ table, namespace, branch, version, maxRowsPerGroup }: {
|
|
373
|
+
table: string;
|
|
374
|
+
namespace?: string[];
|
|
375
|
+
branch?: string;
|
|
376
|
+
version?: number;
|
|
377
|
+
maxRowsPerGroup?: number;
|
|
378
|
+
}): Promise<DatasetTableStats>;
|
|
379
|
+
restore({ table, version, namespace, branch }: {
|
|
380
|
+
table: string;
|
|
381
|
+
version: number;
|
|
382
|
+
namespace?: string[];
|
|
383
|
+
branch?: string;
|
|
384
|
+
}): Promise<void>;
|
|
385
|
+
listVersions({ table, namespace, branch }: {
|
|
386
|
+
table: string;
|
|
387
|
+
namespace?: string[];
|
|
388
|
+
branch?: string;
|
|
389
|
+
}): Promise<TableVersion[]>;
|
|
390
|
+
createIndex({ table, config, namespace, branch }: {
|
|
391
|
+
table: string;
|
|
392
|
+
config: DatasetIndexConfig;
|
|
393
|
+
namespace?: string[];
|
|
394
|
+
branch?: string;
|
|
395
|
+
}): Promise<void>;
|
|
396
|
+
listIndexes({ table, namespace, branch, version }: {
|
|
397
|
+
table: string;
|
|
398
|
+
namespace?: string[];
|
|
399
|
+
branch?: string;
|
|
400
|
+
version?: number;
|
|
401
|
+
}): Promise<TableIndex[]>;
|
|
402
|
+
listBranches({ namespace }?: {
|
|
403
|
+
namespace?: string[];
|
|
404
|
+
}): Promise<TableBranch[]>;
|
|
405
|
+
createBranch({ branch, fromBranch, namespace }: {
|
|
406
|
+
branch: string;
|
|
407
|
+
fromBranch?: string;
|
|
408
|
+
namespace?: string[];
|
|
409
|
+
}): Promise<void>;
|
|
410
|
+
deleteBranch({ branch, namespace }: {
|
|
411
|
+
branch: string;
|
|
412
|
+
namespace?: string[];
|
|
413
|
+
}): Promise<void>;
|
|
414
|
+
}
|
|
415
|
+
export {};
|