@motherduck/wasm-client 0.4.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motherduck/wasm-client",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Client library for MotherDuck-enabled DuckDB powered by WebAssembly (WASM)",
5
5
  "browser": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -6,9 +6,8 @@ export declare class MaterializedQueryTask implements Task<MaterializedQueryResu
6
6
  private deferredConnection;
7
7
  private query;
8
8
  private args?;
9
- private creationTime;
10
9
  constructor(connection: Promise<AsyncDuckDBConnection>, query: string, args?: any[]);
11
- run(initialQueuePosition?: number): Promise<MaterializedQueryResult>;
10
+ run(): Promise<MaterializedQueryResult>;
12
11
  cancel(): Promise<boolean>;
13
12
  private getConnection;
14
13
  private sendQuery;
@@ -5,9 +5,8 @@ import { DuckDBData } from './duckdb/DuckDBData';
5
5
  import { DuckDBDataReader } from './duckdb/DuckDBDataReader';
6
6
  export interface MaterializedQueryResult {
7
7
  type: 'materialized';
8
- initialQueuePosition?: number;
9
- queueTime?: [number, number];
10
- executionTime: [number, number];
8
+ startTimeMs: number;
9
+ endTimeMs: number;
11
10
  /**
12
11
  * Full result set.
13
12
  *
@@ -7,11 +7,8 @@ import { LogSink } from './LogSink';
7
7
  export interface Task<T> {
8
8
  /**
9
9
  * Run the task and return a promise for the results.
10
- *
11
- * The argument `initialQueuePosition` indicates the initial index of this task on the queue when it was first enqueued.
12
- * This can be useful for determining whether a task was pending for a significant amount of time.
13
10
  */
14
- run: (initialQueuePosition?: number) => Promise<T>;
11
+ run: () => Promise<T>;
15
12
  /**
16
13
  * Attempt to cancel a running task, and return a boolean promise indicating whether the attempt was successful.
17
14
  */
@@ -28,6 +25,7 @@ export declare class TaskSequencer<T> {
28
25
  private processingQueue;
29
26
  private logSink?;
30
27
  constructor(logSink?: LogSink);
28
+ incompleteTaskCount(): number;
31
29
  /**
32
30
  * Append a task to the queue, and return its unique id.
33
31
  *
package/types/api.d.ts CHANGED
@@ -15,6 +15,7 @@ export declare class MDConnection {
15
15
  isInitialized(): Promise<boolean>;
16
16
  static getById(id: string): MDConnection | undefined;
17
17
  tokenize(text: string): Promise<ScriptTokens>;
18
+ incompleteQueryCount(): number;
18
19
  enqueueQuery(query: string, args?: any[]): string;
19
20
  safeEvaluateQuery(query: string): Promise<SafeQueryResult<MaterializedQueryResult>>;
20
21
  safeEvaluatePreparedStatement(query: string, ...args: any[]): Promise<SafeQueryResult<MaterializedQueryResult>>;
@@ -8,6 +8,7 @@ export interface MDConnectionParams {
8
8
  logSink?: LogSink;
9
9
  skipWelcomePack?: boolean;
10
10
  version?: string;
11
+ enableDebugLogging?: boolean;
11
12
  }
12
13
  export declare function createDuckDbConnection(params: MDConnectionParams): Promise<AsyncDuckDBConnection>;
13
14
  export declare function getAsyncDuckDb(params: MDConnectionParams): Promise<AsyncDuckDB>;
@@ -1 +0,0 @@
1
- export declare function createHRTime(startMicroSec: number, endMicroSec: number): [number, number];
@@ -1 +0,0 @@
1
- export declare const nowMicroSec: any;