@laminardb/node 0.30.0-alpha.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/LICENSE +201 -0
- package/README.md +122 -0
- package/dist/arrow.d.ts +13 -0
- package/dist/arrow.js +31 -0
- package/dist/errors.d.ts +53 -0
- package/dist/errors.js +114 -0
- package/dist/index.d.ts +407 -0
- package/dist/index.js +420 -0
- package/index.js +713 -0
- package/package.json +77 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public API of `@laminardb/node` (plan 00 D8).
|
|
3
|
+
*
|
|
4
|
+
* This module is the documented surface; the generated napi binding
|
|
5
|
+
* (`index.js` at the package root) is an internal seam. Everything here
|
|
6
|
+
* wraps the native calls so failures surface as the typed
|
|
7
|
+
* {@link LaminarError} hierarchy.
|
|
8
|
+
*/
|
|
9
|
+
export { LaminarError, LaminarConnectionError, LaminarSchemaError, LaminarIngestionError, LaminarQueryError, LaminarSubscriptionError, LaminarInternalError, toLaminarError, } from './errors.js';
|
|
10
|
+
export { tableFrom } from './arrow.js';
|
|
11
|
+
/** One column of a result schema; `dataType` is informational. */
|
|
12
|
+
export interface FieldInfo {
|
|
13
|
+
name: string;
|
|
14
|
+
dataType: string;
|
|
15
|
+
nullable: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Checkpointing options; an empty object enables manual checkpoints only. */
|
|
18
|
+
export interface CheckpointConfig {
|
|
19
|
+
/** Interval in milliseconds; omitted = manual `checkpoint()` only. */
|
|
20
|
+
intervalMs?: number;
|
|
21
|
+
/** One attempt deadline in milliseconds; omitted = core default (120 s). */
|
|
22
|
+
timeoutMs?: number;
|
|
23
|
+
/** Checkpoint directory; omitted = storage directory, then `./data`. */
|
|
24
|
+
dataDir?: string;
|
|
25
|
+
maxNodeDataBytes?: number;
|
|
26
|
+
}
|
|
27
|
+
/** Connection options for {@link LaminarDB.open}. */
|
|
28
|
+
export interface OpenConfig {
|
|
29
|
+
/** Local durability directory; wins over the positional path argument. */
|
|
30
|
+
storageDir?: string;
|
|
31
|
+
checkpoint?: CheckpointConfig;
|
|
32
|
+
/** Default source buffer size in rows. */
|
|
33
|
+
bufferSize?: number;
|
|
34
|
+
/** Emit windowed aggregates incrementally before window close. */
|
|
35
|
+
incrementalEmit?: boolean;
|
|
36
|
+
/** Object-store URL for cloud checkpoints (e.g. `s3://bucket/prefix`). */
|
|
37
|
+
objectStoreUrl?: string;
|
|
38
|
+
objectStoreOptions?: Record<string, string>;
|
|
39
|
+
}
|
|
40
|
+
/** Row object: column name to value. `null` marks null slots. */
|
|
41
|
+
export type Row = Record<string, unknown>;
|
|
42
|
+
/** A fully collected query result. Obtain via `Connection.query()` or
|
|
43
|
+
* `ExecuteOutcome.result`. */
|
|
44
|
+
export interface QueryResult {
|
|
45
|
+
/** Schema fields in declaration order. */
|
|
46
|
+
schema(): FieldInfo[];
|
|
47
|
+
numRows(): number;
|
|
48
|
+
numBatches(): number;
|
|
49
|
+
/** Batch `index` (0-based); throws `LaminarQueryError` (400) if out of range. */
|
|
50
|
+
batch(index: number): ArrowBatch;
|
|
51
|
+
/** The whole result as one Arrow IPC stream `Buffer`. */
|
|
52
|
+
toIPC(): Buffer;
|
|
53
|
+
/** All rows as objects; see the conversion notes in the README. */
|
|
54
|
+
toArray(): Row[];
|
|
55
|
+
}
|
|
56
|
+
/** One Arrow RecordBatch of query output. */
|
|
57
|
+
export interface ArrowBatch {
|
|
58
|
+
numRows(): number;
|
|
59
|
+
numColumns(): number;
|
|
60
|
+
schema(): FieldInfo[];
|
|
61
|
+
toIPC(): Buffer;
|
|
62
|
+
toArray(): Row[];
|
|
63
|
+
}
|
|
64
|
+
/** One executed statement's outcome; `kind` discriminates the payload. */
|
|
65
|
+
export interface ExecuteOutcome {
|
|
66
|
+
readonly kind: 'ddl' | 'rows-affected' | 'query' | 'metadata';
|
|
67
|
+
readonly statementType?: string;
|
|
68
|
+
readonly objectName?: string;
|
|
69
|
+
readonly rowsAffected?: number;
|
|
70
|
+
readonly queryId?: number;
|
|
71
|
+
/** The collected result for `query`/`metadata` kinds; `undefined` otherwise. */
|
|
72
|
+
readonly result?: QueryResult;
|
|
73
|
+
}
|
|
74
|
+
/** One frame from a subscription: `data` carries a batch, `barrier` marks
|
|
75
|
+
* checkpoint progress. */
|
|
76
|
+
export interface SubscriptionFrame {
|
|
77
|
+
readonly kind: 'data' | 'barrier';
|
|
78
|
+
readonly batch?: ArrowBatch;
|
|
79
|
+
/** Portal-local sequence (neither durable nor cluster-global). */
|
|
80
|
+
readonly sequence: number;
|
|
81
|
+
readonly epoch?: number;
|
|
82
|
+
readonly checkpointId?: number;
|
|
83
|
+
readonly throughSequence?: number;
|
|
84
|
+
}
|
|
85
|
+
/** Options for the subscription styles. */
|
|
86
|
+
export interface SubscribeOptions {
|
|
87
|
+
/** Optional SQL row filter applied server-side. */
|
|
88
|
+
filter?: string;
|
|
89
|
+
/** Replay entries after this committed checkpoint epoch (rejects when
|
|
90
|
+
* unretained). */
|
|
91
|
+
fromEpoch?: number;
|
|
92
|
+
}
|
|
93
|
+
/** Push-style handlers for `subscribeWith`. */
|
|
94
|
+
export interface PushHandlers {
|
|
95
|
+
/** May be sync or async: the facade normalizes every delivery to an
|
|
96
|
+
* awaited promise, so slow handlers backpressure the stream. Rejections
|
|
97
|
+
* surface once via `onError` and stop delivery. */
|
|
98
|
+
onData: (frame: SubscriptionFrame) => void | Promise<void>;
|
|
99
|
+
onError?: (error: {
|
|
100
|
+
code: number;
|
|
101
|
+
message: string;
|
|
102
|
+
}) => void;
|
|
103
|
+
onClose?: () => void;
|
|
104
|
+
}
|
|
105
|
+
/** Aggregate pipeline counters. */
|
|
106
|
+
export interface PipelineMetricsInfo {
|
|
107
|
+
totalEventsIngested: number;
|
|
108
|
+
totalEventsEmitted: number;
|
|
109
|
+
totalEventsDropped: number;
|
|
110
|
+
totalCycles: number;
|
|
111
|
+
totalBatches: number;
|
|
112
|
+
uptimeMs: number;
|
|
113
|
+
state: string;
|
|
114
|
+
sourceCount: number;
|
|
115
|
+
streamCount: number;
|
|
116
|
+
sinkCount: number;
|
|
117
|
+
pipelineWatermark: number;
|
|
118
|
+
mvUpdates: number;
|
|
119
|
+
mvBytesStored: number;
|
|
120
|
+
}
|
|
121
|
+
/** Counters for one source. */
|
|
122
|
+
export interface SourceMetricsInfo {
|
|
123
|
+
name: string;
|
|
124
|
+
totalEvents: number;
|
|
125
|
+
pending: number;
|
|
126
|
+
capacity: number;
|
|
127
|
+
isBackpressured: boolean;
|
|
128
|
+
watermark: number;
|
|
129
|
+
utilization: number;
|
|
130
|
+
}
|
|
131
|
+
/** Counters for one stream. */
|
|
132
|
+
export interface StreamMetricsInfo {
|
|
133
|
+
name: string;
|
|
134
|
+
totalEvents: number;
|
|
135
|
+
sql?: string;
|
|
136
|
+
}
|
|
137
|
+
/** One manual checkpoint's outcome. */
|
|
138
|
+
export interface CheckpointOutcome {
|
|
139
|
+
readonly success: boolean;
|
|
140
|
+
readonly checkpointId: number;
|
|
141
|
+
readonly epoch: number;
|
|
142
|
+
readonly durationMs: number;
|
|
143
|
+
readonly error?: string;
|
|
144
|
+
}
|
|
145
|
+
/** One registered source. */
|
|
146
|
+
export interface SourceInfo {
|
|
147
|
+
name: string;
|
|
148
|
+
schema: FieldInfo[];
|
|
149
|
+
watermarkColumn?: string;
|
|
150
|
+
}
|
|
151
|
+
interface NativeFieldInfo {
|
|
152
|
+
name: string;
|
|
153
|
+
dataType: string;
|
|
154
|
+
nullable: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface NativeArrowBatch {
|
|
157
|
+
numRows(): number;
|
|
158
|
+
numColumns(): number;
|
|
159
|
+
schema(): NativeFieldInfo[];
|
|
160
|
+
toIPC(): Buffer;
|
|
161
|
+
toArray(): Record<string, unknown>[];
|
|
162
|
+
}
|
|
163
|
+
interface NativeQueryResult {
|
|
164
|
+
schema(): NativeFieldInfo[];
|
|
165
|
+
numRows(): number;
|
|
166
|
+
numBatches(): number;
|
|
167
|
+
batch(index: number): NativeArrowBatch;
|
|
168
|
+
toIPC(): Buffer;
|
|
169
|
+
toArray(): Record<string, unknown>[];
|
|
170
|
+
}
|
|
171
|
+
interface NativeExecuteOutcome {
|
|
172
|
+
readonly kind: string;
|
|
173
|
+
readonly statementType?: string;
|
|
174
|
+
readonly objectName?: string;
|
|
175
|
+
readonly rowsAffected?: number;
|
|
176
|
+
readonly queryId?: number;
|
|
177
|
+
readonly result?: NativeQueryResult;
|
|
178
|
+
}
|
|
179
|
+
interface NativeSubscriptionFrame {
|
|
180
|
+
readonly kind: 'data' | 'barrier' | string;
|
|
181
|
+
readonly batch?: NativeArrowBatch;
|
|
182
|
+
readonly sequence: number;
|
|
183
|
+
readonly epoch?: number;
|
|
184
|
+
readonly checkpointId?: number;
|
|
185
|
+
readonly throughSequence?: number;
|
|
186
|
+
}
|
|
187
|
+
interface NativeSubscription {
|
|
188
|
+
schema(): NativeFieldInfo[];
|
|
189
|
+
nextFrame(): Promise<NativeSubscriptionFrame | null>;
|
|
190
|
+
isActive(): boolean;
|
|
191
|
+
cancel(): void;
|
|
192
|
+
}
|
|
193
|
+
interface NativePushSubscription {
|
|
194
|
+
isActive(): boolean;
|
|
195
|
+
close(): Promise<void>;
|
|
196
|
+
}
|
|
197
|
+
interface NativeQueryStream {
|
|
198
|
+
schema(): NativeFieldInfo[];
|
|
199
|
+
queryId(): number;
|
|
200
|
+
nextBatch(): Promise<NativeArrowBatch | null>;
|
|
201
|
+
cancel(): void;
|
|
202
|
+
}
|
|
203
|
+
interface NativeConnection {
|
|
204
|
+
subscribe(name: string, filter: string | null, fromEpoch: number | null): Promise<NativeSubscription>;
|
|
205
|
+
subscribeWith(name: string, filter: string | null, fromEpoch: number | null, onData: (frame: SubscriptionFrame) => void | Promise<void>, onError: (error: {
|
|
206
|
+
code: number;
|
|
207
|
+
message: string;
|
|
208
|
+
}) => void, onClose: () => void): NativePushSubscription;
|
|
209
|
+
streamQuery(sql: string): Promise<NativeQueryStream>;
|
|
210
|
+
cancelQuery(queryId: number): Promise<void>;
|
|
211
|
+
metrics(): Promise<Omit<PipelineMetricsInfo, never>>;
|
|
212
|
+
sourceMetrics(name: string): Promise<SourceMetricsInfo>;
|
|
213
|
+
allSourceMetrics(): Promise<SourceMetricsInfo[]>;
|
|
214
|
+
streamMetrics(name: string): Promise<StreamMetricsInfo>;
|
|
215
|
+
allStreamMetrics(): Promise<StreamMetricsInfo[]>;
|
|
216
|
+
pipelineState(): Promise<string>;
|
|
217
|
+
pipelineWatermark(): Promise<number>;
|
|
218
|
+
totalEventsProcessed(): Promise<number>;
|
|
219
|
+
execute(sql: string): Promise<NativeExecuteOutcome>;
|
|
220
|
+
query(sql: string): Promise<NativeQueryResult>;
|
|
221
|
+
insert(source: string, rows: Record<string, unknown>[]): number;
|
|
222
|
+
insertArrow(source: string, bytes: Buffer): number;
|
|
223
|
+
writer(source: string): NativeWriter;
|
|
224
|
+
start(): Promise<void>;
|
|
225
|
+
checkpoint(): Promise<{
|
|
226
|
+
success: boolean;
|
|
227
|
+
checkpointId: number;
|
|
228
|
+
epoch: number;
|
|
229
|
+
durationMs: number;
|
|
230
|
+
error?: string;
|
|
231
|
+
}>;
|
|
232
|
+
isCheckpointEnabled(): boolean;
|
|
233
|
+
listSources(): Promise<string[]>;
|
|
234
|
+
listStreams(): Promise<string[]>;
|
|
235
|
+
listSinks(): Promise<string[]>;
|
|
236
|
+
sourceInfos(): Promise<{
|
|
237
|
+
name: string;
|
|
238
|
+
schema: NativeFieldInfo[];
|
|
239
|
+
watermarkColumn?: string;
|
|
240
|
+
}[]>;
|
|
241
|
+
schema(name: string): Promise<NativeFieldInfo[]>;
|
|
242
|
+
isClosed(): boolean;
|
|
243
|
+
close(): Promise<void>;
|
|
244
|
+
}
|
|
245
|
+
interface NativeWriter {
|
|
246
|
+
name(): string;
|
|
247
|
+
schema(): NativeFieldInfo[];
|
|
248
|
+
writeRows(rows: Record<string, unknown>[]): number;
|
|
249
|
+
writeArrow(bytes: Buffer): number;
|
|
250
|
+
watermark(timestamp: number): void;
|
|
251
|
+
currentWatermark(): number;
|
|
252
|
+
pending(): number;
|
|
253
|
+
capacity(): number;
|
|
254
|
+
isBackpressured(): boolean;
|
|
255
|
+
close(): void;
|
|
256
|
+
}
|
|
257
|
+
/** Streaming writer for one source; single-owner. */
|
|
258
|
+
export declare class Writer {
|
|
259
|
+
#private;
|
|
260
|
+
/** @internal */
|
|
261
|
+
constructor(native: NativeWriter);
|
|
262
|
+
name(): string;
|
|
263
|
+
schema(): FieldInfo[];
|
|
264
|
+
/** Push one batch built from row objects; returns rows written. `Date`
|
|
265
|
+
* values are converted to epoch milliseconds automatically. */
|
|
266
|
+
writeRows(rows: Row[]): number;
|
|
267
|
+
/** Push every batch from an Arrow IPC stream `Buffer`. */
|
|
268
|
+
writeArrow(bytes: Buffer): number;
|
|
269
|
+
/** Advance the event-time watermark (milliseconds since epoch). */
|
|
270
|
+
watermark(timestamp: number): void;
|
|
271
|
+
currentWatermark(): number;
|
|
272
|
+
/** Rows buffered in the source, not yet consumed by the pipeline. */
|
|
273
|
+
pending(): number;
|
|
274
|
+
capacity(): number;
|
|
275
|
+
/** True when the source buffer is more than 80% full — slow down. */
|
|
276
|
+
isBackpressured(): boolean;
|
|
277
|
+
/** Idempotent; writes after close throw `LaminarIngestionError` (301). */
|
|
278
|
+
close(): void;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* An open LaminarDB connection. Safe to share across async contexts;
|
|
282
|
+
* `close()` is idempotent, and use after close throws
|
|
283
|
+
* `LaminarConnectionError` (101) rather than crashing.
|
|
284
|
+
*
|
|
285
|
+
* DDL that changes topology (`CREATE SOURCE`/`STREAM`/`SINK`) must run
|
|
286
|
+
* before `start()`; the engine rejects topology changes on a running
|
|
287
|
+
* pipeline.
|
|
288
|
+
*/
|
|
289
|
+
export declare class Connection {
|
|
290
|
+
#private;
|
|
291
|
+
/** @internal */
|
|
292
|
+
constructor(native: NativeConnection);
|
|
293
|
+
/**
|
|
294
|
+
* Execute one SQL statement. `SELECT` returns `kind: 'query'` with the
|
|
295
|
+
* fully collected `result`; SHOW/DESCRIBE return `kind: 'metadata'`.
|
|
296
|
+
*/
|
|
297
|
+
execute(sql: string): Promise<ExecuteOutcome>;
|
|
298
|
+
/** Execute a query and return its collected result; non-query SQL throws
|
|
299
|
+
* `LaminarQueryError` (400). */
|
|
300
|
+
query(sql: string): Promise<QueryResult>;
|
|
301
|
+
/** Ingest row objects into a source; returns rows pushed. `Date` values
|
|
302
|
+
* are converted to epoch milliseconds automatically. */
|
|
303
|
+
insert(source: string, rows: Row[]): number;
|
|
304
|
+
/** Ingest an Arrow IPC stream `Buffer` into a source; returns rows pushed. */
|
|
305
|
+
insertArrow(source: string, bytes: Buffer): number;
|
|
306
|
+
/** Open a streaming writer for a source (throws 200 if unknown). */
|
|
307
|
+
writer(source: string): Writer;
|
|
308
|
+
/** Start the streaming pipeline (idempotent). */
|
|
309
|
+
start(): Promise<void>;
|
|
310
|
+
/**
|
|
311
|
+
* Trigger a manual checkpoint. Requires checkpointing in the open config
|
|
312
|
+
* and at least one stream or sink in the topology (the core wires the
|
|
313
|
+
* coordinator only for real pipelines).
|
|
314
|
+
*/
|
|
315
|
+
checkpoint(): Promise<CheckpointOutcome>;
|
|
316
|
+
isCheckpointEnabled(): boolean;
|
|
317
|
+
listSources(): Promise<string[]>;
|
|
318
|
+
listStreams(): Promise<string[]>;
|
|
319
|
+
listSinks(): Promise<string[]>;
|
|
320
|
+
sourceInfos(): Promise<SourceInfo[]>;
|
|
321
|
+
/** Schema of a source; unknown names throw `LaminarSchemaError` (200). */
|
|
322
|
+
schema(name: string): Promise<FieldInfo[]>;
|
|
323
|
+
/** Subscribe to a stream or materialized view (pull style). The returned
|
|
324
|
+
* subscription is async-iterable; terminal failures throw
|
|
325
|
+
* `LaminarSubscriptionError` (502 lag / 500 otherwise) and end iteration. */
|
|
326
|
+
subscribe(name: string, options?: SubscribeOptions): Promise<Subscription>;
|
|
327
|
+
/** Subscribe push style: `onData` per frame (awaited per delivery —
|
|
328
|
+
* backpressure, not queueing). Errors and open failures surface via
|
|
329
|
+
* `onError`, always followed by `onClose`. */
|
|
330
|
+
subscribeWith(name: string, handlers: PushHandlers, options?: SubscribeOptions): PushSubscription;
|
|
331
|
+
/** Execute a query and stream its batches on demand; non-query SQL throws
|
|
332
|
+
* `LaminarQueryError` (400). The stream is async-iterable. */
|
|
333
|
+
streamQuery(sql: string): Promise<QueryStream>;
|
|
334
|
+
/** Cancel a query by the id reported by `streamQuery().queryId`. */
|
|
335
|
+
cancelQuery(queryId: number): Promise<void>;
|
|
336
|
+
/** Aggregate pipeline counters. */
|
|
337
|
+
metrics(): Promise<PipelineMetricsInfo>;
|
|
338
|
+
/** Counters for one source; unknown names throw (200). */
|
|
339
|
+
sourceMetrics(name: string): Promise<SourceMetricsInfo>;
|
|
340
|
+
/** Counters for every source. */
|
|
341
|
+
allSourceMetrics(): Promise<SourceMetricsInfo[]>;
|
|
342
|
+
/** Counters for one stream; unknown names throw (200). */
|
|
343
|
+
streamMetrics(name: string): Promise<StreamMetricsInfo>;
|
|
344
|
+
/** Counters for every stream. */
|
|
345
|
+
allStreamMetrics(): Promise<StreamMetricsInfo[]>;
|
|
346
|
+
/** Engine lifecycle state name (e.g. `Running`). */
|
|
347
|
+
pipelineState(): Promise<string>;
|
|
348
|
+
/** Minimum event-time watermark across sources (epoch milliseconds). */
|
|
349
|
+
pipelineWatermark(): Promise<number>;
|
|
350
|
+
/** Total events the pipeline has processed. */
|
|
351
|
+
totalEventsProcessed(): Promise<number>;
|
|
352
|
+
isClosed(): boolean;
|
|
353
|
+
/** Graceful shutdown; idempotent and safe under concurrent calls. */
|
|
354
|
+
close(): Promise<void>;
|
|
355
|
+
}
|
|
356
|
+
/** A pull-based framed subscription; async-iterable:
|
|
357
|
+
* `for await (const frame of conn.subscribe('rollup'))`. */
|
|
358
|
+
export declare class Subscription {
|
|
359
|
+
#private;
|
|
360
|
+
/** @internal */
|
|
361
|
+
constructor(native: NativeSubscription);
|
|
362
|
+
schema(): FieldInfo[];
|
|
363
|
+
/** Next frame, or `null` at end-of-stream / after `cancel()`. */
|
|
364
|
+
nextFrame(): Promise<SubscriptionFrame | null>;
|
|
365
|
+
isActive(): boolean;
|
|
366
|
+
/** Idempotent; a pending `nextFrame` resolves `null`. */
|
|
367
|
+
cancel(): void;
|
|
368
|
+
[Symbol.asyncIterator](): AsyncIterator<SubscriptionFrame>;
|
|
369
|
+
}
|
|
370
|
+
/** A push-based subscription handle; `close()` stops delivery and resolves
|
|
371
|
+
* after the reader has stopped (no callbacks fire afterwards). */
|
|
372
|
+
export declare class PushSubscription {
|
|
373
|
+
#private;
|
|
374
|
+
/** @internal */
|
|
375
|
+
constructor(native: NativePushSubscription);
|
|
376
|
+
isActive(): boolean;
|
|
377
|
+
/** Stop delivery and wait for the reader. Idempotent. */
|
|
378
|
+
close(): Promise<void>;
|
|
379
|
+
}
|
|
380
|
+
/** A streaming query result; async-iterable over `ArrowBatch`es:
|
|
381
|
+
* `for await (const batch of conn.streamQuery(sql))`. */
|
|
382
|
+
export declare class QueryStream {
|
|
383
|
+
#private;
|
|
384
|
+
/** @internal */
|
|
385
|
+
constructor(native: NativeQueryStream);
|
|
386
|
+
schema(): FieldInfo[];
|
|
387
|
+
/** Query id, usable with `Connection.cancelQuery`. */
|
|
388
|
+
queryId(): number;
|
|
389
|
+
/** Next batch, or `null` at end-of-stream / after `cancel()`. */
|
|
390
|
+
nextBatch(): Promise<ArrowBatch | null>;
|
|
391
|
+
/** Idempotent; a pending `nextBatch` resolves `null`. */
|
|
392
|
+
cancel(): void;
|
|
393
|
+
[Symbol.asyncIterator](): AsyncIterator<ArrowBatch>;
|
|
394
|
+
}
|
|
395
|
+
/** Entry point. */
|
|
396
|
+
export declare class LaminarDB {
|
|
397
|
+
private constructor();
|
|
398
|
+
/**
|
|
399
|
+
* Open an embedded database. `open()` and `open(':memory:')` are
|
|
400
|
+
* in-memory; `open(path)` sets the storage directory (local-durable
|
|
401
|
+
* embedded mode when `checkpoint` is configured); `config.storageDir`
|
|
402
|
+
* wins over the positional path.
|
|
403
|
+
*/
|
|
404
|
+
static open(path?: string, config?: OpenConfig): Promise<Connection>;
|
|
405
|
+
/** Binding and pinned-core version, e.g. `0.30.0-alpha.1 (core v0.30.0)`. */
|
|
406
|
+
static version(): string;
|
|
407
|
+
}
|