@motherduck/wasm-client 0.6.1 → 0.6.3
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 +38 -22
- package/index.js +1 -1
- package/index_with_arrow.js +11 -11
- package/package.json +2 -2
- package/types/DuckDBInstance.d.ts +3 -0
- package/types/{api.d.ts → MDConnection.d.ts} +6 -4
- package/types/MDConnectionParams.d.ts +11 -0
- package/types/QueryTypes.d.ts +17 -5
- package/types/TaskSequencer.d.ts +1 -0
- package/types/createDuckDbConnection.d.ts +3 -0
- package/types/fetchDuckDBAssets.d.ts +17 -0
- package/types/fetchVersion.d.ts +1 -0
- package/types/genConnectionId.d.ts +1 -0
- package/types/getAsyncDuckDb.d.ts +3 -0
- package/types/getDuckDBBundlesFromDuckDBAssets.d.ts +2 -0
- package/types/getVersionSuffix.d.ts +1 -0
- package/types/index.d.ts +10 -10
- package/types/instantiateDB.d.ts +2 -0
- package/types/{arrow → motherduck/duckdb-arrow}/AsyncDuckDBRecordBatchIterator.d.ts +2 -3
- package/types/{arrow → motherduck/duckdb-arrow}/DuckDBRecordBatch.d.ts +3 -3
- package/types/{arrow → motherduck/duckdb-arrow}/duckDBTypeFromArrowType.d.ts +1 -1
- package/types/{arrow → motherduck/duckdb-arrow}/duckDBValueFromArrowData.d.ts +2 -2
- package/types/motherduck/duckdb-arrow/index.d.ts +2 -0
- package/types/{duckdb → motherduck/duckdb-data}/AsyncDuckDBDataBatchIterator.d.ts +1 -1
- package/types/{duckdb → motherduck/duckdb-data}/DuckDBData.d.ts +2 -2
- package/types/{duckdb → motherduck/duckdb-data}/DuckDBDataReader.d.ts +3 -3
- package/types/{duckdb → motherduck/duckdb-data}/DuckDBRow.d.ts +1 -1
- package/types/motherduck/duckdb-data/MemoryDuckDBData.d.ts +16 -0
- package/types/motherduck/duckdb-data/index.d.ts +5 -0
- package/types/motherduck/duckdb-types/DuckDBType.d.ts +124 -0
- package/types/motherduck/duckdb-types/DuckDBTypes.d.ts +43 -0
- package/types/motherduck/duckdb-types/index.d.ts +3 -0
- package/types/motherduck/duckdb-types/parseLogicalTypeString.d.ts +2 -0
- package/types/motherduck/duckdb-values/DuckDBArray.d.ts +7 -0
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBBlob.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBDate.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBDecimal.d.ts +2 -2
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBInterval.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBList.d.ts +2 -2
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBMap.d.ts +2 -2
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBMapEntry.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBStruct.d.ts +2 -2
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBStructEntry.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBTime.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBTimestampMicroseconds.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBTimestampMilliseconds.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBTimestampNanoseconds.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBTimestampSeconds.d.ts +1 -1
- package/types/{duckdb/values → motherduck/duckdb-values}/DuckDBValue.d.ts +1 -1
- package/types/{duckdb → motherduck/duckdb-values}/conversion/displayStringForDuckDBValue.d.ts +1 -1
- package/types/motherduck/duckdb-values/index.d.ts +17 -0
- package/types/motherduck/wasm-extension/LoadMotherDuckWasmExtensionOptions.d.ts +38 -0
- package/types/motherduck/wasm-extension/MDEvent.d.ts +1 -0
- package/types/motherduck/wasm-extension/MotherDuckEvent.d.ts +11 -0
- package/types/motherduck/wasm-extension/MotherDuckLogLevel.d.ts +7 -0
- package/types/motherduck/wasm-extension/doesBrowserSupportWorkerInWorker.d.ts +1 -0
- package/types/motherduck/wasm-extension/fetchVersion.d.ts +1 -0
- package/types/motherduck/wasm-extension/getExtensionRepository.d.ts +1 -0
- package/types/motherduck/wasm-extension/index.d.ts +4 -0
- package/types/motherduck/wasm-extension/loadMotherDuckWasmExtension.d.ts +2 -0
- package/types/motherduck/wasm-extension/motherDuckEventFromMessageEvent.d.ts +2 -0
- package/types/motherduck/wasm-extension/pathConcat.d.ts +1 -0
- package/types/motherduck/wasm-extension/untilWorkerReady.d.ts +2 -0
- package/types/{duckdb/files.d.ts → readLocalFS.d.ts} +1 -5
- package/types/recursivelyPrefix.d.ts +1 -0
- package/types/registerFiles.d.ts +5 -0
- package/types/transformQueryError.d.ts +2 -0
- package/types/urlPathConcat.d.ts +1 -0
- package/types/createDeferred.d.ts +0 -6
- package/types/duckdb/values/index.d.ts +0 -16
- package/types/duckdb/worker_factory.d.ts +0 -15
- /package/types/{arrow → motherduck/duckdb-arrow}/TypedTypeMap.d.ts +0 -0
- /package/types/{duckdb/values → motherduck/duckdb-values}/SpecialDuckDBValue.d.ts +0 -0
- /package/types/{duckdb → motherduck/duckdb-values}/conversion/dateTimeStringConversion.d.ts +0 -0
- /package/types/{duckdb → motherduck/duckdb-values}/conversion/stringFromBlob.d.ts +0 -0
- /package/types/{duckdb → motherduck/duckdb-values}/conversion/stringFromDecimal.d.ts +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AsyncDuckDB } from '@duckdb/duckdb-wasm';
|
|
2
|
+
import { MotherDuckLogLevel } from './MotherDuckLogLevel.js';
|
|
3
|
+
export interface LoadMotherDuckWasmExtensionOptions {
|
|
4
|
+
/**
|
|
5
|
+
* DuckDB instance.
|
|
6
|
+
*/
|
|
7
|
+
instance: AsyncDuckDB;
|
|
8
|
+
/**
|
|
9
|
+
* MotherDuck authentication token.
|
|
10
|
+
*/
|
|
11
|
+
token: string;
|
|
12
|
+
/**
|
|
13
|
+
* URL prefix of a custom extension repository where the MotherDuck Wasm client extension can be found.
|
|
14
|
+
*
|
|
15
|
+
* Note that this should not contain either the extension version or the `/duckdb-wasm` suffix.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to https://app.motherduck.com.
|
|
18
|
+
*/
|
|
19
|
+
extensionRepositoryUrlPrefix?: URL;
|
|
20
|
+
/**
|
|
21
|
+
* Version of the MotherDuck Wasm client extension, in the form `{branch}@{SHA}`.
|
|
22
|
+
*
|
|
23
|
+
* If not given, the latest version will be fetched from `{extensionRepositoryUrlPrefix}/version`.
|
|
24
|
+
*/
|
|
25
|
+
extensionVersion?: string;
|
|
26
|
+
/**
|
|
27
|
+
* MotherDuck API URL.
|
|
28
|
+
*
|
|
29
|
+
* Defaults to https://api.motherduck.com.
|
|
30
|
+
*/
|
|
31
|
+
apiUrl?: URL;
|
|
32
|
+
/**
|
|
33
|
+
* MotherDuck log level.
|
|
34
|
+
*
|
|
35
|
+
* Defaults to MotherDuckLogLevel.INFO.
|
|
36
|
+
*/
|
|
37
|
+
logLevel?: MotherDuckLogLevel;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MD_EVENT = "MD_EVENT";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum MotherDuckEventType {
|
|
2
|
+
CATALOG_CHANGE_EVENT = "CatalogChangeEvent"
|
|
3
|
+
}
|
|
4
|
+
export declare class MotherDuckEventBase<T> extends CustomEvent<T> {
|
|
5
|
+
constructor(type: MotherDuckEventType, detail: T);
|
|
6
|
+
}
|
|
7
|
+
export type MotherDuckCatalogChangeEventDetail = unknown;
|
|
8
|
+
export declare class MotherDuckCatalogChangeEvent extends MotherDuckEventBase<MotherDuckCatalogChangeEventDetail> {
|
|
9
|
+
constructor(detail: MotherDuckCatalogChangeEventDetail);
|
|
10
|
+
}
|
|
11
|
+
export type MotherDuckEvent = MotherDuckCatalogChangeEvent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function doesBrowserSupportWorkerInWorker(): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fetchVersion(extensionRepositoryUrlPrefix: URL): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getExtensionRepository(extensionRepositoryUrlPrefix: URL, extensionVersion: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function pathConcat(prefix: string, suffix: string): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { WebFile } from '@duckdb/duckdb-wasm';
|
|
2
|
-
import { MDConnectionParams } from './
|
|
3
|
-
/**
|
|
4
|
-
* Register the files within DuckDB WASM
|
|
5
|
-
*/
|
|
6
|
-
export declare function registerFiles(params: MDConnectionParams, files: FileList): Promise<void>;
|
|
2
|
+
import { MDConnectionParams } from './MDConnectionParams';
|
|
7
3
|
/**
|
|
8
4
|
* Read local data files from wasm db
|
|
9
5
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function recursivelyPrefix(prefix: string, json: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function urlPathConcat(url: string, path: string): string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { DuckDBBlob } from './DuckDBBlob';
|
|
2
|
-
export { DuckDBDate } from './DuckDBDate';
|
|
3
|
-
export { DuckDBDecimal } from './DuckDBDecimal';
|
|
4
|
-
export { DuckDBInterval } from './DuckDBInterval';
|
|
5
|
-
export { DuckDBList } from './DuckDBList';
|
|
6
|
-
export { DuckDBMap } from './DuckDBMap';
|
|
7
|
-
export { DuckDBMapEntry } from './DuckDBMapEntry';
|
|
8
|
-
export { DuckDBStruct } from './DuckDBStruct';
|
|
9
|
-
export { DuckDBStructEntry } from './DuckDBStructEntry';
|
|
10
|
-
export { DuckDBTime } from './DuckDBTime';
|
|
11
|
-
export { DuckDBTimestampMicroseconds } from './DuckDBTimestampMicroseconds';
|
|
12
|
-
export { DuckDBTimestampMilliseconds } from './DuckDBTimestampMilliseconds';
|
|
13
|
-
export { DuckDBTimestampNanoseconds } from './DuckDBTimestampNanoseconds';
|
|
14
|
-
export { DuckDBTimestampSeconds } from './DuckDBTimestampSeconds';
|
|
15
|
-
export { DuckDBValue } from './DuckDBValue';
|
|
16
|
-
export { SpecialDuckDBValue } from './SpecialDuckDBValue';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AsyncDuckDB, AsyncDuckDBConnection } from '@duckdb/duckdb-wasm';
|
|
2
|
-
import { LogSink } from '../LogSink';
|
|
3
|
-
export interface MDConnectionParams {
|
|
4
|
-
mdToken: string;
|
|
5
|
-
mdServerURL?: string;
|
|
6
|
-
duckDBAssetsURLPrefix?: string;
|
|
7
|
-
useDuckDBWasmCOI?: boolean;
|
|
8
|
-
logSink?: LogSink;
|
|
9
|
-
skipWelcomePack?: boolean;
|
|
10
|
-
version?: string;
|
|
11
|
-
enableDebugLogging?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const CATALOG_CHANGE_EVENT = "CatalogChangeEvent";
|
|
14
|
-
export declare function createDuckDbConnection(params: MDConnectionParams): Promise<AsyncDuckDBConnection>;
|
|
15
|
-
export declare function getAsyncDuckDb(params: MDConnectionParams): Promise<AsyncDuckDB>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|