@motherduck/wasm-client 0.6.2 → 0.6.4
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 +1 -1
- package/types/DuckDBInstance.d.ts +1 -1
- package/types/MDConnection.d.ts +1 -1
- package/types/MaterializedQueryTask.d.ts +1 -1
- package/types/QueryTypes.d.ts +3 -3
- package/types/StreamingQueryTask.d.ts +1 -1
- package/types/createDuckDbConnection.d.ts +1 -1
- package/types/duckdb-wasm/bindings/bindings_base.d.ts +122 -0
- package/types/duckdb-wasm/bindings/bindings_browser_base.d.ts +19 -0
- package/types/duckdb-wasm/bindings/bindings_browser_coi.d.ts +12 -0
- package/types/duckdb-wasm/bindings/bindings_browser_eh.d.ts +12 -0
- package/types/duckdb-wasm/bindings/bindings_browser_mvp.d.ts +11 -0
- package/types/duckdb-wasm/bindings/bindings_interface.d.ts +41 -0
- package/types/duckdb-wasm/bindings/bindings_node_base.d.ts +23 -0
- package/types/duckdb-wasm/bindings/bindings_node_eh.d.ts +12 -0
- package/types/duckdb-wasm/bindings/bindings_node_mvp.d.ts +12 -0
- package/types/duckdb-wasm/bindings/config.d.ts +62 -0
- package/types/duckdb-wasm/bindings/connection.d.ts +74 -0
- package/types/duckdb-wasm/bindings/duckdb_module.d.ts +12 -0
- package/types/duckdb-wasm/bindings/file_stats.d.ts +36 -0
- package/types/duckdb-wasm/bindings/index.d.ts +11 -0
- package/types/duckdb-wasm/bindings/insert_options.d.ts +38 -0
- package/types/duckdb-wasm/bindings/progress.d.ts +9 -0
- package/types/duckdb-wasm/bindings/runtime.d.ts +83 -0
- package/types/duckdb-wasm/bindings/runtime_browser.d.ts +9 -0
- package/types/duckdb-wasm/bindings/runtime_node.d.ts +8 -0
- package/types/duckdb-wasm/bindings/tokens.d.ts +12 -0
- package/types/duckdb-wasm/bindings/udf_function.d.ts +14 -0
- package/types/duckdb-wasm/bindings/udf_runtime.d.ts +3 -0
- package/types/duckdb-wasm/bindings/web_file.d.ts +12 -0
- package/types/duckdb-wasm/index.d.ts +7 -0
- package/types/duckdb-wasm/index_docs.d.ts +1 -0
- package/types/duckdb-wasm/json_typedef.d.ts +17 -0
- package/types/duckdb-wasm/log.d.ts +54 -0
- package/types/duckdb-wasm/parallel/async_bindings.d.ts +122 -0
- package/types/duckdb-wasm/parallel/async_bindings_interface.d.ts +25 -0
- package/types/duckdb-wasm/parallel/async_connection.d.ts +75 -0
- package/types/duckdb-wasm/parallel/index.d.ts +5 -0
- package/types/duckdb-wasm/parallel/worker_dispatcher.d.ts +22 -0
- package/types/duckdb-wasm/parallel/worker_request.d.ts +99 -0
- package/types/duckdb-wasm/platform.d.ts +39 -0
- package/types/duckdb-wasm/status.d.ts +3 -0
- package/types/duckdb-wasm/targets/duckdb-browser-blocking.d.ts +12 -0
- package/types/duckdb-wasm/targets/duckdb-browser-coi.pthread.worker.d.ts +1 -0
- package/types/duckdb-wasm/targets/duckdb-browser-coi.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-browser-eh.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-browser-mvp.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-node-blocking.d.ts +13 -0
- package/types/duckdb-wasm/targets/duckdb-node-eh.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb-node-mvp.worker.d.ts +2 -0
- package/types/duckdb-wasm/targets/duckdb.d.ts +9 -0
- package/types/duckdb-wasm/utils/binary_dump.d.ts +1 -0
- package/types/duckdb-wasm/utils/index.d.ts +2 -0
- package/types/duckdb-wasm/utils/s3_helper.d.ts +27 -0
- package/types/duckdb-wasm/version.d.ts +5 -0
- package/types/duckdb-wasm/worker.d.ts +1 -0
- package/types/getAsyncDuckDb.d.ts +1 -1
- package/types/getDuckDBBundlesFromDuckDBAssets.d.ts +1 -1
- package/types/index.d.ts +5 -5
- package/types/instantiateDB.d.ts +1 -1
- package/types/motherduck/duckdb-arrow/AsyncDuckDBRecordBatchIterator.d.ts +12 -0
- package/types/motherduck/duckdb-arrow/DuckDBRecordBatch.d.ts +14 -0
- package/types/motherduck/duckdb-arrow/TypedTypeMap.d.ts +2 -0
- package/types/motherduck/duckdb-arrow/duckDBTypeFromArrowType.d.ts +4 -0
- package/types/motherduck/duckdb-arrow/duckDBValueFromArrowData.d.ts +8 -0
- package/types/motherduck/duckdb-arrow/index.d.ts +2 -0
- package/types/motherduck/duckdb-data/AsyncDuckDBDataBatchIterator.d.ts +3 -0
- package/types/motherduck/duckdb-data/DuckDBData.d.ts +56 -0
- package/types/motherduck/duckdb-data/DuckDBDataReader.d.ts +68 -0
- package/types/motherduck/duckdb-data/DuckDBRow.d.ts +4 -0
- 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/motherduck/duckdb-values/DuckDBBlob.d.ts +6 -0
- package/types/motherduck/duckdb-values/DuckDBDate.d.ts +6 -0
- package/types/motherduck/duckdb-values/DuckDBDecimal.d.ts +10 -0
- package/types/motherduck/duckdb-values/DuckDBInterval.d.ts +8 -0
- package/types/motherduck/duckdb-values/DuckDBList.d.ts +7 -0
- package/types/motherduck/duckdb-values/DuckDBMap.d.ts +7 -0
- package/types/motherduck/duckdb-values/DuckDBMapEntry.d.ts +5 -0
- package/types/motherduck/duckdb-values/DuckDBStruct.d.ts +7 -0
- package/types/motherduck/duckdb-values/DuckDBStructEntry.d.ts +5 -0
- package/types/motherduck/duckdb-values/DuckDBTime.d.ts +6 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampMicroseconds.d.ts +8 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampMilliseconds.d.ts +6 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampNanoseconds.d.ts +6 -0
- package/types/motherduck/duckdb-values/DuckDBTimestampSeconds.d.ts +6 -0
- package/types/motherduck/duckdb-values/DuckDBValue.d.ts +2 -0
- package/types/motherduck/duckdb-values/SpecialDuckDBValue.d.ts +4 -0
- package/types/motherduck/duckdb-values/conversion/dateTimeStringConversion.d.ts +12 -0
- package/types/motherduck/duckdb-values/conversion/displayStringForDuckDBValue.d.ts +2 -0
- package/types/motherduck/duckdb-values/conversion/stringFromBlob.d.ts +2 -0
- package/types/motherduck/duckdb-values/conversion/stringFromDecimal.d.ts +18 -0
- 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/readLocalFS.d.ts +1 -1
- package/index.js.map +0 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function getDuckDBDateStringFromYearMonthDay(year: number, month: number, dayOfMonth: number): string;
|
|
2
|
+
export declare function getDuckDBDateStringFromDays(days: number): string;
|
|
3
|
+
export declare function getDuckDBTimeStringFromParts(hoursPart: bigint, minutesPart: bigint, secondsPart: bigint, microsecondsPart: bigint): string;
|
|
4
|
+
export declare function getDuckDBTimeStringFromPositiveMicroseconds(positiveMicroseconds: bigint): string;
|
|
5
|
+
export declare function getDuckDBTimeStringFromMicrosecondsInDay(microsecondsInDay: bigint): string;
|
|
6
|
+
export declare function getDuckDBTimeStringFromMicroseconds(microseconds: bigint): string;
|
|
7
|
+
export declare function getDuckDBTimestampStringFromDaysAndMicroseconds(days: bigint, microsecondsInDay: bigint, timezone?: string | null): string;
|
|
8
|
+
export declare function getDuckDBTimestampStringFromMicroseconds(microseconds: bigint, timezone?: string | null): string;
|
|
9
|
+
export declare function getDuckDBTimestampStringFromSeconds(seconds: bigint, timezone?: string | null): string;
|
|
10
|
+
export declare function getDuckDBTimestampStringFromMilliseconds(milliseconds: bigint, timezone?: string | null): string;
|
|
11
|
+
export declare function getDuckDBTimestampStringFromNanoseconds(nanoseconds: bigint, timezone?: string | null): string;
|
|
12
|
+
export declare function getDuckDBIntervalString(months: number, days: number, microseconds: bigint): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decimal string formatting.
|
|
3
|
+
*
|
|
4
|
+
* Supports a subset of the functionality of `BigInt.prototype.toLocaleString` for locale-specific formatting.
|
|
5
|
+
*/
|
|
6
|
+
export interface DuckDBDecimalFormatOptions {
|
|
7
|
+
useGrouping?: boolean;
|
|
8
|
+
minimumFractionDigits?: number;
|
|
9
|
+
maximumFractionDigits?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface LocaleOptions {
|
|
12
|
+
locales?: string | string[];
|
|
13
|
+
options?: DuckDBDecimalFormatOptions;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Convert a scaled decimal value to a string, possibly using locale-specific formatting.
|
|
17
|
+
*/
|
|
18
|
+
export declare function stringFromDecimal(scaledValue: bigint, scale: number, localeOptions?: LocaleOptions): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { DuckDBArray } from './DuckDBArray.js';
|
|
2
|
+
export { DuckDBBlob } from './DuckDBBlob.js';
|
|
3
|
+
export { DuckDBDate } from './DuckDBDate.js';
|
|
4
|
+
export { DuckDBDecimal } from './DuckDBDecimal.js';
|
|
5
|
+
export { DuckDBInterval } from './DuckDBInterval.js';
|
|
6
|
+
export { DuckDBList } from './DuckDBList.js';
|
|
7
|
+
export { DuckDBMap } from './DuckDBMap.js';
|
|
8
|
+
export { DuckDBMapEntry } from './DuckDBMapEntry.js';
|
|
9
|
+
export { DuckDBStruct } from './DuckDBStruct.js';
|
|
10
|
+
export { DuckDBStructEntry } from './DuckDBStructEntry.js';
|
|
11
|
+
export { DuckDBTime } from './DuckDBTime.js';
|
|
12
|
+
export { DuckDBTimestampMicroseconds } from './DuckDBTimestampMicroseconds.js';
|
|
13
|
+
export { DuckDBTimestampMilliseconds } from './DuckDBTimestampMilliseconds.js';
|
|
14
|
+
export { DuckDBTimestampNanoseconds } from './DuckDBTimestampNanoseconds.js';
|
|
15
|
+
export { DuckDBTimestampSeconds } from './DuckDBTimestampSeconds.js';
|
|
16
|
+
export { DuckDBValue } from './DuckDBValue.js';
|
|
17
|
+
export { SpecialDuckDBValue } from './SpecialDuckDBValue.js';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AsyncDuckDB } from '../../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;
|
package/types/readLocalFS.d.ts
CHANGED