@motherduck/wasm-client 0.7.0 → 0.8.0
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/index.js +1 -1
- package/index_with_arrow.js +8 -8
- package/package.json +1 -1
- package/types/@duckdb/data-types/DuckDBType.d.ts +5 -5
- package/types/@duckdb/data-types/DuckDBTypeId.d.ts +1 -1
- package/types/@duckdb/data-values/DuckDBTimestampTZValue.d.ts +1 -1
- package/types/@duckdb/data-values/DuckDBToStringOptions.d.ts +1 -1
- package/types/@duckdb/data-values/conversion/dateTimeStringConversion.d.ts +6 -3
- package/types/@duckdb/data-values/conversion/getBigNumFromBytes.d.ts +12 -0
- package/types/@duckdb/data-values/index.d.ts +1 -1
- package/types/@motherduck/wasm-extension/LoadMotherDuckWasmExtensionOptions.d.ts +4 -4
- package/types/@motherduck/wasm-extension/fetchMotherDuckExtensionVersion.d.ts +1 -0
- package/types/@motherduck/wasm-extension/fetchMotherDuckUIVersion.d.ts +1 -0
- package/types/@motherduck/wasm-extension/getDuckDBVersion.d.ts +2 -0
- package/types/@motherduck/wasm-extension/index.d.ts +2 -1
- package/types/MDConnectionParams.d.ts +1 -0
package/package.json
CHANGED
|
@@ -293,16 +293,16 @@ export declare class DuckDBAnyType extends BaseDuckDBType<DuckDBTypeId.ANY> {
|
|
|
293
293
|
static create(alias?: string): DuckDBAnyType;
|
|
294
294
|
}
|
|
295
295
|
export declare const ANY: DuckDBAnyType;
|
|
296
|
-
export declare class
|
|
296
|
+
export declare class DuckDBBigNumType extends BaseDuckDBType<DuckDBTypeId.BIGNUM> {
|
|
297
297
|
constructor(alias?: string);
|
|
298
|
-
static readonly instance:
|
|
299
|
-
static create(alias?: string):
|
|
298
|
+
static readonly instance: DuckDBBigNumType;
|
|
299
|
+
static create(alias?: string): DuckDBBigNumType;
|
|
300
300
|
static readonly Max: bigint;
|
|
301
301
|
static readonly Min: bigint;
|
|
302
302
|
get max(): bigint;
|
|
303
303
|
get min(): bigint;
|
|
304
304
|
}
|
|
305
|
-
export declare const
|
|
305
|
+
export declare const BIGNUM: DuckDBBigNumType;
|
|
306
306
|
export declare class DuckDBSQLNullType extends BaseDuckDBType<DuckDBTypeId.SQLNULL> {
|
|
307
307
|
constructor(alias?: string);
|
|
308
308
|
static readonly instance: DuckDBSQLNullType;
|
|
@@ -321,4 +321,4 @@ export declare class DuckDBIntegerLiteralType extends BaseDuckDBType<DuckDBTypeI
|
|
|
321
321
|
static create(alias?: string): DuckDBIntegerLiteralType;
|
|
322
322
|
}
|
|
323
323
|
export declare const INTEGER_LITERAL: DuckDBIntegerLiteralType;
|
|
324
|
-
export type DuckDBType = DuckDBBooleanType | DuckDBTinyIntType | DuckDBSmallIntType | DuckDBIntegerType | DuckDBBigIntType | DuckDBUTinyIntType | DuckDBUSmallIntType | DuckDBUIntegerType | DuckDBUBigIntType | DuckDBFloatType | DuckDBDoubleType | DuckDBTimestampType | DuckDBDateType | DuckDBTimeType | DuckDBIntervalType | DuckDBHugeIntType | DuckDBUHugeIntType | DuckDBVarCharType | DuckDBBlobType | DuckDBDecimalType | DuckDBTimestampSecondsType | DuckDBTimestampMillisecondsType | DuckDBTimestampNanosecondsType | DuckDBEnumType | DuckDBListType | DuckDBStructType | DuckDBMapType | DuckDBArrayType | DuckDBUUIDType | DuckDBUnionType | DuckDBBitType | DuckDBTimeTZType | DuckDBTimestampTZType | DuckDBAnyType |
|
|
324
|
+
export type DuckDBType = DuckDBBooleanType | DuckDBTinyIntType | DuckDBSmallIntType | DuckDBIntegerType | DuckDBBigIntType | DuckDBUTinyIntType | DuckDBUSmallIntType | DuckDBUIntegerType | DuckDBUBigIntType | DuckDBFloatType | DuckDBDoubleType | DuckDBTimestampType | DuckDBDateType | DuckDBTimeType | DuckDBIntervalType | DuckDBHugeIntType | DuckDBUHugeIntType | DuckDBVarCharType | DuckDBBlobType | DuckDBDecimalType | DuckDBTimestampSecondsType | DuckDBTimestampMillisecondsType | DuckDBTimestampNanosecondsType | DuckDBEnumType | DuckDBListType | DuckDBStructType | DuckDBMapType | DuckDBArrayType | DuckDBUUIDType | DuckDBUnionType | DuckDBBitType | DuckDBTimeTZType | DuckDBTimestampTZType | DuckDBAnyType | DuckDBBigNumType | DuckDBSQLNullType | DuckDBStringLiteralType | DuckDBIntegerLiteralType;
|
|
@@ -5,6 +5,6 @@ export declare class DuckDBTimestampTZValue extends SpecialDuckDBValue {
|
|
|
5
5
|
readonly microseconds: bigint;
|
|
6
6
|
constructor(microseconds: bigint);
|
|
7
7
|
toDuckDBString(toStringOptions?: DuckDBToStringOptions): string;
|
|
8
|
-
toSql(): string;
|
|
8
|
+
toSql(toStringOptions?: DuckDBToStringOptions): string;
|
|
9
9
|
toJson(): Json;
|
|
10
10
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare function getDuckDBDateStringFromYearMonthDay(year: number, month: number, dayOfMonth: number): string;
|
|
2
2
|
export declare function getDuckDBDateStringFromDays(days: number): string;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getTimeZoneOffsetString(timeZoneOffsetInMinutes?: number): string | undefined;
|
|
4
|
+
export declare function getFormatterForTimeZone(timeZone: string): Intl.DateTimeFormat;
|
|
5
|
+
export declare function getTimeZoneName(date: Date, timeZone: string): string | undefined;
|
|
6
|
+
export declare function getTimeZoneOffsetInMinutes(millisecondsSinceEpoch: number, timeZone: string): number;
|
|
4
7
|
export declare function getAbsoluteOffsetStringFromParts(hoursPart: number, minutesPart: number, secondsPart: number): string;
|
|
5
8
|
export declare function getOffsetStringFromAbsoluteSeconds(absoluteOffsetInSeconds: number): string;
|
|
6
9
|
export declare function getOffsetStringFromSeconds(offsetInSeconds: number): string;
|
|
@@ -8,8 +11,8 @@ export declare function getDuckDBTimeStringFromParts(hoursPart: bigint, minutesP
|
|
|
8
11
|
export declare function getDuckDBTimeStringFromPositiveMicroseconds(positiveMicroseconds: bigint): string;
|
|
9
12
|
export declare function getDuckDBTimeStringFromMicrosecondsInDay(microsecondsInDay: bigint): string;
|
|
10
13
|
export declare function getDuckDBTimeStringFromMicroseconds(microseconds: bigint): string;
|
|
11
|
-
export declare function getDuckDBTimestampStringFromDaysAndMicroseconds(days: bigint, microsecondsInDay: bigint,
|
|
12
|
-
export declare function getDuckDBTimestampStringFromMicroseconds(microseconds: bigint,
|
|
14
|
+
export declare function getDuckDBTimestampStringFromDaysAndMicroseconds(days: bigint, microsecondsInDay: bigint, timeZonePart?: string): string;
|
|
15
|
+
export declare function getDuckDBTimestampStringFromMicroseconds(microseconds: bigint, timeZone?: string): string;
|
|
13
16
|
export declare function getDuckDBTimestampStringFromSeconds(seconds: bigint): string;
|
|
14
17
|
export declare function getDuckDBTimestampStringFromMilliseconds(milliseconds: bigint): string;
|
|
15
18
|
export declare function getDuckDBTimestampStringFromNanoseconds(nanoseconds: bigint): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the JS bigint value represented by the byte array of a BIGNUM in DuckDB's internal format.
|
|
3
|
+
*
|
|
4
|
+
* DuckDB stores BIGNUMs as an array of bytes consisting of a three-byte header followed by a variable number of bytes
|
|
5
|
+
* (at least one). The header specifies the number of bytes after the header, and whether the number is positive or
|
|
6
|
+
* negative. The bytes after the header specify the absolute value of the number, in big endian format.
|
|
7
|
+
*
|
|
8
|
+
* The sign of the number is determined by the MSB of the header, which is 1 for positive and 0 for negative. Negative
|
|
9
|
+
* numbers also have all bytes of both the header and value inverted. (For negative numbers, the MSB is 0 after this
|
|
10
|
+
* inversion. Put another way: the MSB of the header is always 1, but it's inverted for negative numbers.)
|
|
11
|
+
*/
|
|
12
|
+
export declare function getBigNumFromBytes(bytes: Uint8Array): bigint;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { duckDBValueToSql } from './conversion/duckDBValueToSql.js';
|
|
2
|
-
export {
|
|
2
|
+
export { getBigNumFromBytes } from './conversion/getBigNumFromBytes.js';
|
|
3
3
|
export { jsonFromDuckDBValue } from './conversion/jsonFromDuckDBValue.js';
|
|
4
4
|
export { DuckDBArrayValue } from './DuckDBArrayValue.js';
|
|
5
5
|
export { DuckDBBitValue } from './DuckDBBitValue.js';
|
|
@@ -12,15 +12,15 @@ export interface LoadMotherDuckWasmExtensionOptions {
|
|
|
12
12
|
/**
|
|
13
13
|
* URL prefix of a custom extension repository where the MotherDuck Wasm client extension can be found.
|
|
14
14
|
*
|
|
15
|
-
* Note that this should not contain
|
|
15
|
+
* Note that this should not contain the extension version; that will be appended.
|
|
16
16
|
*
|
|
17
|
-
* Defaults to https://
|
|
17
|
+
* Defaults to https://ext.motherduck.com/.
|
|
18
18
|
*/
|
|
19
19
|
extensionRepositoryUrlPrefix?: URL;
|
|
20
20
|
/**
|
|
21
|
-
* Version of the MotherDuck Wasm client extension, in the form `{
|
|
21
|
+
* Version of the MotherDuck Wasm client extension, typically in the form `{duckdb-version}-{year}-{month}-{seq-num}`.
|
|
22
22
|
*
|
|
23
|
-
* If not given, the latest version will be fetched from `{
|
|
23
|
+
* If not given, the latest version will be fetched from `{apiUrl}/extension_version`.
|
|
24
24
|
*/
|
|
25
25
|
extensionVersion?: string;
|
|
26
26
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fetchMotherDuckExtensionVersion(apiUrl: URL, duckDBVersion: string): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fetchMotherDuckUIVersion(motherDuckUIUrlPrefix: URL): Promise<string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './fetchMotherDuckExtensionVersion.js';
|
|
2
|
+
export * from './fetchMotherDuckUIVersion.js';
|
|
2
3
|
export * from './loadMotherDuckWasmExtension.js';
|
|
3
4
|
export * from './LoadMotherDuckWasmExtensionOptions.js';
|
|
4
5
|
export * from './MotherDuckEvent.js';
|