@motherduck/wasm-client 0.6.5 → 0.7.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.
Files changed (144) hide show
  1. package/index.js +1 -1
  2. package/index_with_arrow.js +8 -8
  3. package/package.json +1 -1
  4. package/types/@duckdb/data-reader/ColumnFilteredDuckDBData.d.ts +13 -0
  5. package/types/{motherduck/duckdb-data → @duckdb/data-reader}/DuckDBData.d.ts +2 -2
  6. package/types/{motherduck/duckdb-data → @duckdb/data-reader}/DuckDBDataReader.d.ts +2 -2
  7. package/types/{motherduck/duckdb-data → @duckdb/data-reader}/DuckDBRow.d.ts +1 -1
  8. package/types/{motherduck/duckdb-data → @duckdb/data-reader}/MemoryDuckDBData.d.ts +2 -2
  9. package/types/{motherduck/duckdb-data → @duckdb/data-reader}/index.d.ts +1 -0
  10. package/types/@duckdb/data-types/DuckDBType.d.ts +324 -0
  11. package/types/@duckdb/data-types/DuckDBTypeId.d.ts +41 -0
  12. package/types/@duckdb/data-types/extensionTypes.d.ts +12 -0
  13. package/types/@duckdb/data-types/index.d.ts +4 -0
  14. package/types/@duckdb/data-types/sql.d.ts +2 -0
  15. package/types/{motherduck/duckdb-values/DuckDBList.d.ts → @duckdb/data-values/DuckDBArrayValue.d.ts} +4 -2
  16. package/types/@duckdb/data-values/DuckDBBitValue.d.ts +19 -0
  17. package/types/{motherduck/duckdb-values/DuckDBBlob.d.ts → @duckdb/data-values/DuckDBBlobValue.d.ts} +4 -2
  18. package/types/{motherduck/duckdb-values/DuckDBDate.d.ts → @duckdb/data-values/DuckDBDateValue.d.ts} +4 -2
  19. package/types/{motherduck/duckdb-values/DuckDBDecimal.d.ts → @duckdb/data-values/DuckDBDecimalValue.d.ts} +4 -2
  20. package/types/{motherduck/duckdb-values/DuckDBInterval.d.ts → @duckdb/data-values/DuckDBIntervalValue.d.ts} +4 -2
  21. package/types/{motherduck/duckdb-values/DuckDBArray.d.ts → @duckdb/data-values/DuckDBListValue.d.ts} +4 -2
  22. package/types/{motherduck/duckdb-values/DuckDBMap.d.ts → @duckdb/data-values/DuckDBMapValue.d.ts} +4 -2
  23. package/types/{motherduck/duckdb-values/DuckDBStruct.d.ts → @duckdb/data-values/DuckDBStructValue.d.ts} +4 -2
  24. package/types/@duckdb/data-values/DuckDBTimeTZValue.d.ts +14 -0
  25. package/types/{motherduck/duckdb-values/DuckDBTime.d.ts → @duckdb/data-values/DuckDBTimeValue.d.ts} +4 -2
  26. package/types/@duckdb/data-values/DuckDBTimestampMicrosecondsValue.d.ts +10 -0
  27. package/types/{motherduck/duckdb-values/DuckDBTimestampMilliseconds.d.ts → @duckdb/data-values/DuckDBTimestampMillisecondsValue.d.ts} +4 -2
  28. package/types/{motherduck/duckdb-values/DuckDBTimestampNanoseconds.d.ts → @duckdb/data-values/DuckDBTimestampNanosecondsValue.d.ts} +4 -2
  29. package/types/{motherduck/duckdb-values/DuckDBTimestampSeconds.d.ts → @duckdb/data-values/DuckDBTimestampSecondsValue.d.ts} +4 -2
  30. package/types/@duckdb/data-values/DuckDBTimestampTZValue.d.ts +10 -0
  31. package/types/@duckdb/data-values/DuckDBToStringOptions.d.ts +3 -0
  32. package/types/@duckdb/data-values/DuckDBUUIDValue.d.ts +17 -0
  33. package/types/{motherduck/duckdb-values → @duckdb/data-values}/DuckDBValue.d.ts +0 -1
  34. package/types/@duckdb/data-values/Json.d.ts +3 -0
  35. package/types/@duckdb/data-values/SpecialDuckDBValue.d.ts +8 -0
  36. package/types/{motherduck/duckdb-values → @duckdb/data-values}/conversion/dateTimeStringConversion.d.ts +9 -5
  37. package/types/@duckdb/data-values/conversion/duckDBValueToSql.d.ts +3 -0
  38. package/types/@duckdb/data-values/conversion/getVarIntFromBytes.d.ts +12 -0
  39. package/types/@duckdb/data-values/conversion/jsonFromDuckDBValue.d.ts +3 -0
  40. package/types/@duckdb/data-values/index.d.ts +26 -0
  41. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_base.d.ts +11 -3
  42. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_interface.d.ts +8 -3
  43. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/config.d.ts +25 -1
  44. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/connection.d.ts +1 -1
  45. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/duckdb_module.d.ts +2 -0
  46. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/runtime.d.ts +18 -1
  47. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/runtime_browser.d.ts +4 -0
  48. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/log.d.ts +7 -0
  49. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/parallel/async_bindings.d.ts +18 -3
  50. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/parallel/async_bindings_interface.d.ts +4 -2
  51. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/parallel/async_connection.d.ts +3 -3
  52. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/parallel/worker_request.d.ts +8 -6
  53. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/platform.d.ts +4 -4
  54. package/types/@duckdb/duckdb-wasm/status.d.ts +7 -0
  55. package/types/@duckdb/duckdb-wasm/utils/opfs_util.d.ts +4 -0
  56. package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/utils/s3_helper.d.ts +1 -1
  57. package/types/{motherduck → @motherduck}/duckdb-arrow/AsyncDuckDBRecordBatchIterator.d.ts +1 -1
  58. package/types/{motherduck → @motherduck}/duckdb-arrow/DuckDBRecordBatch.d.ts +3 -3
  59. package/types/{motherduck → @motherduck}/duckdb-arrow/duckDBTypeFromArrowType.d.ts +1 -1
  60. package/types/{motherduck → @motherduck}/duckdb-arrow/duckDBValueFromArrowData.d.ts +1 -1
  61. package/types/@motherduck/duckdb-arrow/index.d.ts +5 -0
  62. package/types/@motherduck/task-sequencer/ConsoleLike.d.ts +1 -0
  63. package/types/@motherduck/task-sequencer/TaskSequencer.d.ts +59 -0
  64. package/types/@motherduck/task-sequencer/index.d.ts +2 -0
  65. package/types/{motherduck → @motherduck}/wasm-extension/LoadMotherDuckWasmExtensionOptions.d.ts +7 -1
  66. package/types/{motherduck → @motherduck}/wasm-extension/untilWorkerReady.d.ts +1 -1
  67. package/types/DuckDBInstance.d.ts +1 -1
  68. package/types/MDConnection.d.ts +1 -1
  69. package/types/MDConnectionParams.d.ts +3 -1
  70. package/types/MaterializedQueryTask.d.ts +2 -2
  71. package/types/QueryTypes.d.ts +3 -3
  72. package/types/StreamingQueryTask.d.ts +2 -2
  73. package/types/createDuckDbConnection.d.ts +1 -1
  74. package/types/fetchDuckDBBundlesFromDuckDBAssets.d.ts +1 -1
  75. package/types/getAsyncDuckDb.d.ts +1 -1
  76. package/types/index.d.ts +4 -4
  77. package/types/instantiateDB.d.ts +1 -1
  78. package/types/isDuckDBBundles.d.ts +1 -1
  79. package/types/prefixDuckDBBundles.d.ts +1 -1
  80. package/types/readLocalFS.d.ts +2 -2
  81. package/types/duckdb-wasm/status.d.ts +0 -3
  82. package/types/motherduck/duckdb-arrow/index.d.ts +0 -2
  83. package/types/motherduck/duckdb-types/DuckDBType.d.ts +0 -130
  84. package/types/motherduck/duckdb-types/DuckDBTypes.d.ts +0 -45
  85. package/types/motherduck/duckdb-types/duckDBTypeToString.d.ts +0 -2
  86. package/types/motherduck/duckdb-types/index.d.ts +0 -4
  87. package/types/motherduck/duckdb-values/DuckDBTimestampMicroseconds.d.ts +0 -9
  88. package/types/motherduck/duckdb-values/DuckDBUUID.d.ts +0 -7
  89. package/types/motherduck/duckdb-values/SpecialDuckDBValue.d.ts +0 -5
  90. package/types/motherduck/duckdb-values/index.d.ts +0 -18
  91. /package/types/{motherduck/duckdb-data → @duckdb/data-reader}/AsyncDuckDBDataBatchIterator.d.ts +0 -0
  92. /package/types/{motherduck/duckdb-types → @duckdb/data-types}/parseLogicalTypeString.d.ts +0 -0
  93. /package/types/{motherduck/duckdb-values → @duckdb/data-values}/DuckDBMapEntry.d.ts +0 -0
  94. /package/types/{motherduck/duckdb-values → @duckdb/data-values}/DuckDBStructEntry.d.ts +0 -0
  95. /package/types/{motherduck/duckdb-values → @duckdb/data-values}/conversion/displayStringForDuckDBValue.d.ts +0 -0
  96. /package/types/{motherduck/duckdb-values → @duckdb/data-values}/conversion/hexFromBlob.d.ts +0 -0
  97. /package/types/{motherduck/duckdb-values → @duckdb/data-values}/conversion/stringFromBlob.d.ts +0 -0
  98. /package/types/{motherduck/duckdb-values → @duckdb/data-values}/conversion/stringFromDecimal.d.ts +0 -0
  99. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_browser_base.d.ts +0 -0
  100. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_browser_coi.d.ts +0 -0
  101. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_browser_eh.d.ts +0 -0
  102. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_browser_mvp.d.ts +0 -0
  103. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_node_base.d.ts +0 -0
  104. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_node_eh.d.ts +0 -0
  105. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/bindings_node_mvp.d.ts +0 -0
  106. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/file_stats.d.ts +0 -0
  107. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/index.d.ts +0 -0
  108. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/insert_options.d.ts +0 -0
  109. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/progress.d.ts +0 -0
  110. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/runtime_node.d.ts +0 -0
  111. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/tokens.d.ts +0 -0
  112. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/udf_function.d.ts +0 -0
  113. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/udf_runtime.d.ts +0 -0
  114. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/bindings/web_file.d.ts +0 -0
  115. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/index.d.ts +0 -0
  116. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/index_docs.d.ts +0 -0
  117. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/json_typedef.d.ts +0 -0
  118. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/parallel/index.d.ts +0 -0
  119. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/parallel/worker_dispatcher.d.ts +0 -0
  120. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-browser-blocking.d.ts +0 -0
  121. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-browser-coi.pthread.worker.d.ts +0 -0
  122. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-browser-coi.worker.d.ts +0 -0
  123. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-browser-eh.worker.d.ts +0 -0
  124. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-browser-mvp.worker.d.ts +0 -0
  125. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-node-blocking.d.ts +0 -0
  126. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-node-eh.worker.d.ts +0 -0
  127. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb-node-mvp.worker.d.ts +0 -0
  128. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/targets/duckdb.d.ts +0 -0
  129. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/utils/binary_dump.d.ts +0 -0
  130. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/utils/index.d.ts +0 -0
  131. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/version.d.ts +0 -0
  132. /package/types/{duckdb-wasm → @duckdb/duckdb-wasm}/worker.d.ts +0 -0
  133. /package/types/{motherduck → @motherduck}/duckdb-arrow/TypedTypeMap.d.ts +0 -0
  134. /package/types/{motherduck → @motherduck}/wasm-extension/MDEvent.d.ts +0 -0
  135. /package/types/{motherduck → @motherduck}/wasm-extension/MotherDuckEvent.d.ts +0 -0
  136. /package/types/{motherduck → @motherduck}/wasm-extension/MotherDuckLogLevel.d.ts +0 -0
  137. /package/types/{motherduck → @motherduck}/wasm-extension/doesBrowserSupportWorkerInWorker.d.ts +0 -0
  138. /package/types/{motherduck → @motherduck}/wasm-extension/fetchMotherDuckWasmExtensionVersion.d.ts +0 -0
  139. /package/types/{motherduck → @motherduck}/wasm-extension/fetchVersion.d.ts +0 -0
  140. /package/types/{motherduck → @motherduck}/wasm-extension/getExtensionRepository.d.ts +0 -0
  141. /package/types/{motherduck → @motherduck}/wasm-extension/index.d.ts +0 -0
  142. /package/types/{motherduck → @motherduck}/wasm-extension/loadMotherDuckWasmExtension.d.ts +0 -0
  143. /package/types/{motherduck → @motherduck}/wasm-extension/motherDuckEventFromMessageEvent.d.ts +0 -0
  144. /package/types/{motherduck → @motherduck}/wasm-extension/pathConcat.d.ts +0 -0
@@ -1,6 +1,6 @@
1
- import { DuckDBData } from '../../motherduck/duckdb-data';
2
- import { DuckDBType } from '../../motherduck/duckdb-types';
3
- import { DuckDBValue } from '../../motherduck/duckdb-values';
1
+ import { DuckDBData } from '../../@duckdb/data-reader';
2
+ import { DuckDBType } from '../../@duckdb/data-types';
3
+ import { DuckDBValue } from '../../@duckdb/data-values';
4
4
  import { RecordBatch } from 'apache-arrow';
5
5
  import { TypedTypeMap } from './TypedTypeMap.js';
6
6
  export declare class DuckDBRecordBatch extends DuckDBData {
@@ -1,4 +1,4 @@
1
- import { DuckDBType } from '../../motherduck/duckdb-types';
1
+ import { DuckDBType } from '../../@duckdb/data-types';
2
2
  import { DataType, Type } from 'apache-arrow';
3
3
  import { TypedTypeMap } from './TypedTypeMap.js';
4
4
  export declare function duckDBTypeFromArrowType(type: DataType<Type, TypedTypeMap>, metadata?: Map<string, string>): DuckDBType;
@@ -1,4 +1,4 @@
1
- import { DuckDBValue } from '../../motherduck/duckdb-values';
1
+ import { DuckDBValue } from '../../@duckdb/data-values';
2
2
  import { Data, DataType, Type } from 'apache-arrow';
3
3
  import { TypedTypeMap } from './TypedTypeMap.js';
4
4
  type ArrowDataType = DataType<Type, TypedTypeMap>;
@@ -0,0 +1,5 @@
1
+ export * from './AsyncDuckDBRecordBatchIterator.js';
2
+ export * from './DuckDBRecordBatch.js';
3
+ export * from './duckDBTypeFromArrowType.js';
4
+ export * from './duckDBValueFromArrowData.js';
5
+ export * from './TypedTypeMap.js';
@@ -0,0 +1 @@
1
+ export type ConsoleLike = Pick<Console, 'debug' | 'error' | 'info' | 'log' | 'warn'>;
@@ -0,0 +1,59 @@
1
+ import 'core-js/actual/promise/with-resolvers.js';
2
+ import { ConsoleLike } from './ConsoleLike.js';
3
+ /**
4
+ * Represents a task that can be sequenced by TaskSequencer.
5
+ *
6
+ * Implemented by users of TaskSequencer.
7
+ */
8
+ export interface Task<T> {
9
+ /**
10
+ * Run the task and return a promise for the results.
11
+ */
12
+ run: () => Promise<T>;
13
+ /**
14
+ * Attempt to cancel a running task, and return a boolean promise indicating whether the attempt was successful.
15
+ */
16
+ cancel: () => Promise<boolean>;
17
+ }
18
+ /**
19
+ * Sequences user-defined Tasks, ensuring only one is running at a given time.
20
+ * Supports cancellation.
21
+ */
22
+ export declare class TaskSequencer<T> {
23
+ private nextTaskId;
24
+ private queuedTaskIds;
25
+ private queuedTasksById;
26
+ private processingQueue;
27
+ private logger?;
28
+ constructor(logger?: ConsoleLike);
29
+ /**
30
+ * Returns the number of enqueued tasks that have not yet completed.
31
+ */
32
+ incompleteTaskCount(): number;
33
+ /**
34
+ * Append a task to the queue, and return its unique id.
35
+ *
36
+ * The id can be used to get the result (using `taskResult`) or cancel (using `cancelTask`).
37
+ */
38
+ enqueueTask(task: Task<T>): string;
39
+ /**
40
+ * Attempt to cancel a previously enqueued task.
41
+ * Returns a boolean promise indicating whether the attempt succeeded.
42
+ *
43
+ * In addition to the `taskId` to cancel, takes an optional `errorMessage` to supply to the rejected task promise, if
44
+ * a pending task is cancelled. If a running task is cancelled, then the task implementation controls the error
45
+ * message in the rejected task promise.
46
+ */
47
+ cancelTask(taskId: string, errorMessage?: string): Promise<boolean>;
48
+ /**
49
+ * Returns a promise for the result of previously-enqueued task.
50
+ */
51
+ taskResult(taskId: string): Promise<T>;
52
+ private logDebug;
53
+ private logWarn;
54
+ private createTaskId;
55
+ private addQueuedTask;
56
+ private scheduleProcessQueueIfNeeded;
57
+ private processQueue;
58
+ private processFirstQueuedTask;
59
+ }
@@ -0,0 +1,2 @@
1
+ export * from './ConsoleLike.js';
2
+ export * from './TaskSequencer.js';
@@ -1,4 +1,4 @@
1
- import { AsyncDuckDB } from '../../duckdb-wasm';
1
+ import { AsyncDuckDB } from '../../@duckdb/duckdb-wasm';
2
2
  import { MotherDuckLogLevel } from './MotherDuckLogLevel.js';
3
3
  export interface LoadMotherDuckWasmExtensionOptions {
4
4
  /**
@@ -35,6 +35,12 @@ export interface LoadMotherDuckWasmExtensionOptions {
35
35
  * Defaults to MotherDuckLogLevel.INFO.
36
36
  */
37
37
  logLevel?: MotherDuckLogLevel;
38
+ /**
39
+ * Set to 'single' to limit to a single attached MotherDuck database.
40
+ *
41
+ * Default: 'workspace' (attaches all available MotherDuck databases)
42
+ */
43
+ attachMode?: 'single' | 'workspace';
38
44
  /**
39
45
  * Skip the "welcome pack", the first message exchange between the MotherDuck client and server.
40
46
  */
@@ -1,2 +1,2 @@
1
- import { AsyncDuckDBConnection } from '../../duckdb-wasm';
1
+ import { AsyncDuckDBConnection } from '../../@duckdb/duckdb-wasm';
2
2
  export declare function untilWorkerReady(connection: AsyncDuckDBConnection): Promise<void>;
@@ -1,3 +1,3 @@
1
- import { AsyncDuckDB } from './duckdb-wasm';
1
+ import { AsyncDuckDB } from '././@duckdb/duckdb-wasm';
2
2
  export declare function getDuckDBInstance(): Promise<AsyncDuckDB> | AsyncDuckDB | null;
3
3
  export declare function setDuckDBInstance(instance: Promise<AsyncDuckDB> | AsyncDuckDB): void;
@@ -1,4 +1,4 @@
1
- import { AsyncPreparedStatement, ScriptTokens, TokenType } from './duckdb-wasm';
1
+ import { AsyncPreparedStatement, ScriptTokens, TokenType } from '././@duckdb/duckdb-wasm';
2
2
  import { MDConnectionParams } from './MDConnectionParams';
3
3
  import { MaterializedQueryResult, SafePrepareResult, SafeQueryResult, StreamingQueryResult } from './QueryTypes';
4
4
  export { AsyncPreparedStatement, ScriptTokens, TokenType };
@@ -1,4 +1,4 @@
1
- import { ConsoleLike } from './motherduck/task-sequencer';
1
+ import { ConsoleLike } from '././@motherduck/task-sequencer';
2
2
  export { ConsoleLike };
3
3
  export interface MDConnectionParams {
4
4
  mdToken: string;
@@ -9,4 +9,6 @@ export interface MDConnectionParams {
9
9
  version?: string;
10
10
  enableDebugLogging?: boolean;
11
11
  customUserAgent?: string;
12
+ attachMode?: 'single' | 'workspace';
13
+ skipWelcomePack?: boolean;
12
14
  }
@@ -1,5 +1,5 @@
1
- import { AsyncDuckDBConnection } from './duckdb-wasm';
2
- import { Task } from './motherduck/task-sequencer';
1
+ import { AsyncDuckDBConnection } from '././@duckdb/duckdb-wasm';
2
+ import { Task } from '././@motherduck/task-sequencer';
3
3
  import { MaterializedQueryResult } from './QueryTypes';
4
4
  export declare class MaterializedQueryTask implements Task<MaterializedQueryResult> {
5
5
  private connection;
@@ -1,6 +1,6 @@
1
- import { AsyncPreparedStatement } from './duckdb-wasm';
2
- import { TypedTypeMap } from './motherduck/duckdb-arrow';
3
- import { AsyncDuckDBDataBatchIterator, DuckDBData, DuckDBDataReader } from './motherduck/duckdb-data';
1
+ import { AsyncPreparedStatement } from '././@duckdb/duckdb-wasm';
2
+ import { TypedTypeMap } from '././@motherduck/duckdb-arrow';
3
+ import { AsyncDuckDBDataBatchIterator, DuckDBData, DuckDBDataReader } from '././@duckdb/data-reader';
4
4
  import { AsyncRecordBatchStreamReader, DataType } from 'apache-arrow';
5
5
  export { AsyncPreparedStatement };
6
6
  export { TypedTypeMap };
@@ -1,5 +1,5 @@
1
- import { AsyncDuckDBConnection } from './duckdb-wasm';
2
- import { Task } from './motherduck/task-sequencer';
1
+ import { AsyncDuckDBConnection } from '././@duckdb/duckdb-wasm';
2
+ import { Task } from '././@motherduck/task-sequencer';
3
3
  import { StreamingQueryResult } from './QueryTypes';
4
4
  export declare class StreamingQueryTask implements Task<StreamingQueryResult> {
5
5
  private connection;
@@ -1,3 +1,3 @@
1
- import { AsyncDuckDBConnection } from './duckdb-wasm';
1
+ import { AsyncDuckDBConnection } from '././@duckdb/duckdb-wasm';
2
2
  import { MDConnectionParams } from './MDConnectionParams';
3
3
  export declare function createDuckDbConnection(params: MDConnectionParams): Promise<AsyncDuckDBConnection>;
@@ -1,2 +1,2 @@
1
- import { DuckDBBundles } from './duckdb-wasm';
1
+ import { DuckDBBundles } from '././@duckdb/duckdb-wasm';
2
2
  export declare function fetchDuckDBBundlesFromDuckDBAssets(duckDBAssetsURLPrefix: string, version: string | undefined, includeCOI: boolean | undefined): Promise<DuckDBBundles>;
@@ -1,4 +1,4 @@
1
- import { AsyncDuckDB } from './duckdb-wasm';
1
+ import { AsyncDuckDB } from '././@duckdb/duckdb-wasm';
2
2
  import { MDConnectionParams } from './MDConnectionParams';
3
3
  export { AsyncDuckDB };
4
4
  export declare function getAsyncDuckDb(params: MDConnectionParams): Promise<AsyncDuckDB>;
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from './motherduck/duckdb-data';
2
- export * from './motherduck/duckdb-types';
3
- export * from './motherduck/duckdb-values';
4
- export { MotherDuckCatalogChangeEvent, MotherDuckCatalogChangeEventDetail, MotherDuckEvent, MotherDuckEventBase, MotherDuckEventType } from './motherduck/wasm-extension';
1
+ export * from '././@duckdb/data-reader';
2
+ export * from '././@duckdb/data-types';
3
+ export * from '././@duckdb/data-values';
4
+ export { MotherDuckCatalogChangeEvent, MotherDuckCatalogChangeEventDetail, MotherDuckEvent, MotherDuckEventBase, MotherDuckEventType } from '././@motherduck/wasm-extension';
5
5
  export * from './getAsyncDuckDb';
6
6
  export * from './MDConnection';
7
7
  export * from './MDConnectionParams';
@@ -1,3 +1,3 @@
1
- import { AsyncDuckDB } from './duckdb-wasm';
1
+ import { AsyncDuckDB } from '././@duckdb/duckdb-wasm';
2
2
  import { MDConnectionParams } from './MDConnectionParams';
3
3
  export declare function instantiateDB(params: MDConnectionParams): Promise<AsyncDuckDB>;
@@ -1,2 +1,2 @@
1
- import { DuckDBBundles } from './duckdb-wasm';
1
+ import { DuckDBBundles } from '././@duckdb/duckdb-wasm';
2
2
  export declare function isDuckDBBundles(input: unknown): input is DuckDBBundles;
@@ -1,2 +1,2 @@
1
- import { DuckDBBundles } from './duckdb-wasm';
1
+ import { DuckDBBundles } from '././@duckdb/duckdb-wasm';
2
2
  export declare function prefixDuckDBBundles(prefix: string, bundles: DuckDBBundles, includeCOI: boolean | undefined): DuckDBBundles;
@@ -1,6 +1,6 @@
1
- import { WebFile } from './duckdb-wasm';
1
+ import { DuckDBDataProtocol, WebFile } from '././@duckdb/duckdb-wasm';
2
2
  import { MDConnectionParams } from './MDConnectionParams';
3
- export { WebFile };
3
+ export { DuckDBDataProtocol, WebFile };
4
4
  /**
5
5
  * Read local data files from wasm db
6
6
  *
@@ -1,3 +0,0 @@
1
- export declare enum StatusCode {
2
- SUCCESS = 0
3
- }
@@ -1,2 +0,0 @@
1
- export * from './AsyncDuckDBRecordBatchIterator.js';
2
- export * from './TypedTypeMap.js';
@@ -1,130 +0,0 @@
1
- export type StructEntry = {
2
- readonly key: string;
3
- readonly valueType: DuckDBType;
4
- };
5
- export type UnionAlternative = {
6
- readonly tag: string;
7
- readonly valueType: DuckDBType;
8
- };
9
- export type ArrayDuckDBType = {
10
- readonly name: 'ARRAY';
11
- readonly valueType: DuckDBType;
12
- readonly length: number;
13
- };
14
- export type BigIntDuckDBType = {
15
- readonly name: 'BIGINT';
16
- };
17
- export type BitDuckDBType = {
18
- readonly name: 'BIT';
19
- };
20
- export type BooleanDuckDBType = {
21
- readonly name: 'BOOLEAN';
22
- };
23
- export type BlobDuckDBType = {
24
- readonly name: 'BLOB';
25
- };
26
- export type DateDuckDBType = {
27
- readonly name: 'DATE';
28
- };
29
- export type DoubleDuckDBType = {
30
- readonly name: 'DOUBLE';
31
- };
32
- export type DecimalDuckDBType = {
33
- readonly name: 'DECIMAL';
34
- readonly width?: number;
35
- readonly scale?: number;
36
- };
37
- export type EnumDuckDBType = {
38
- readonly name: 'ENUM';
39
- };
40
- export type HugeIntDuckDBType = {
41
- readonly name: 'HUGEINT';
42
- };
43
- export type IntegerDuckDBType = {
44
- readonly name: 'INTEGER';
45
- };
46
- export type IntervalDuckDBType = {
47
- readonly name: 'INTERVAL';
48
- };
49
- export type JSONDuckDBType = {
50
- readonly name: 'JSON';
51
- };
52
- export type ListDuckDBType = {
53
- readonly name: 'LIST';
54
- readonly valueType: DuckDBType;
55
- };
56
- export type MapDuckDBType = {
57
- readonly name: 'MAP';
58
- readonly keyType: DuckDBType;
59
- readonly valueType: DuckDBType;
60
- };
61
- export type RealDuckDBType = {
62
- readonly name: 'REAL';
63
- };
64
- export type SmallIntDuckDBType = {
65
- readonly name: 'SMALLINT';
66
- };
67
- export type SQLNullDuckDBType = {
68
- readonly name: 'SQLNULL';
69
- };
70
- export type StructDuckDBType = {
71
- readonly name: 'STRUCT';
72
- readonly entries: readonly StructEntry[];
73
- };
74
- export type TimeDuckDBType = {
75
- readonly name: 'TIME';
76
- };
77
- export type TimeWithTimeZoneDuckDBType = {
78
- readonly name: 'TIME_TZ';
79
- };
80
- export type TimestampDuckDBType = {
81
- readonly name: 'TIMESTAMP';
82
- };
83
- export type TimestampSecondsDuckDBType = {
84
- readonly name: 'TIMESTAMP_S';
85
- };
86
- export type TimestampMillisecondsDuckDBType = {
87
- readonly name: 'TIMESTAMP_MS';
88
- };
89
- export type TimestampNanosecondsDuckDBType = {
90
- readonly name: 'TIMESTAMP_NS';
91
- };
92
- export type TimestampWithTimeZoneDuckDBType = {
93
- readonly name: 'TIMESTAMP_TZ';
94
- };
95
- export type TinyIntDuckDBType = {
96
- readonly name: 'TINYINT';
97
- };
98
- export type UBigIntDuckDBType = {
99
- readonly name: 'UBIGINT';
100
- };
101
- export type UHugeIntDuckDBType = {
102
- readonly name: 'UHUGEINT';
103
- };
104
- export type UIntegerDuckDBType = {
105
- readonly name: 'UINTEGER';
106
- };
107
- export type USmallIntDuckDBType = {
108
- readonly name: 'USMALLINT';
109
- };
110
- export type UTinyIntDuckDBType = {
111
- readonly name: 'UTINYINT';
112
- };
113
- export type UUIDDuckDBType = {
114
- readonly name: 'UUID';
115
- };
116
- export type UnionDuckDBType = {
117
- readonly name: 'UNION';
118
- readonly alternatives: readonly UnionAlternative[];
119
- };
120
- export type VarCharDuckDBType = {
121
- readonly name: 'VARCHAR';
122
- readonly length?: number;
123
- };
124
- export type GeometryDuckDBType = {
125
- readonly name: 'GEOMETRY';
126
- };
127
- export type WKBBlobDuckDBType = {
128
- readonly name: 'WKB_BLOB';
129
- };
130
- export type DuckDBType = ArrayDuckDBType | BigIntDuckDBType | BitDuckDBType | BooleanDuckDBType | BlobDuckDBType | DateDuckDBType | DoubleDuckDBType | DecimalDuckDBType | EnumDuckDBType | HugeIntDuckDBType | IntegerDuckDBType | IntervalDuckDBType | JSONDuckDBType | ListDuckDBType | MapDuckDBType | RealDuckDBType | SmallIntDuckDBType | SQLNullDuckDBType | StructDuckDBType | TimeDuckDBType | TimeWithTimeZoneDuckDBType | TimestampDuckDBType | TimestampSecondsDuckDBType | TimestampMillisecondsDuckDBType | TimestampNanosecondsDuckDBType | TimestampWithTimeZoneDuckDBType | TinyIntDuckDBType | UBigIntDuckDBType | UHugeIntDuckDBType | UIntegerDuckDBType | USmallIntDuckDBType | UTinyIntDuckDBType | UUIDDuckDBType | UnionDuckDBType | VarCharDuckDBType | GeometryDuckDBType | WKBBlobDuckDBType;
@@ -1,45 +0,0 @@
1
- import { ArrayDuckDBType, BigIntDuckDBType, BitDuckDBType, BlobDuckDBType, BooleanDuckDBType, DateDuckDBType, DecimalDuckDBType, DoubleDuckDBType, DuckDBType, EnumDuckDBType, GeometryDuckDBType, HugeIntDuckDBType, IntegerDuckDBType, IntervalDuckDBType, JSONDuckDBType, ListDuckDBType, MapDuckDBType, RealDuckDBType, SQLNullDuckDBType, SmallIntDuckDBType, StructDuckDBType, StructEntry, TimeDuckDBType, TimeWithTimeZoneDuckDBType, TimestampDuckDBType, TimestampMillisecondsDuckDBType, TimestampNanosecondsDuckDBType, TimestampSecondsDuckDBType, TimestampWithTimeZoneDuckDBType, TinyIntDuckDBType, UBigIntDuckDBType, UHugeIntDuckDBType, UIntegerDuckDBType, USmallIntDuckDBType, UTinyIntDuckDBType, UUIDDuckDBType, UnionAlternative, UnionDuckDBType, VarCharDuckDBType, WKBBlobDuckDBType } from './DuckDBType.js';
2
- export declare class DuckDBTypes {
3
- private constructor();
4
- static ARRAY(valueType: DuckDBType, length: number): ArrayDuckDBType;
5
- static BIGINT: BigIntDuckDBType;
6
- static BIT: BitDuckDBType;
7
- static BOOLEAN: BooleanDuckDBType;
8
- static BLOB: BlobDuckDBType;
9
- static DATE: DateDuckDBType;
10
- static DOUBLE: DoubleDuckDBType;
11
- private static default_DECIMAL;
12
- static DECIMAL(width?: number, scale?: number): DecimalDuckDBType;
13
- static ENUM: EnumDuckDBType;
14
- static GEOMETRY: GeometryDuckDBType;
15
- static HUGEINT: HugeIntDuckDBType;
16
- static INTEGER: IntegerDuckDBType;
17
- static INTERVAL: IntervalDuckDBType;
18
- static JSON: JSONDuckDBType;
19
- static LIST(valueType: DuckDBType): ListDuckDBType;
20
- static MAP(keyType: DuckDBType, valueType: DuckDBType): MapDuckDBType;
21
- static REAL: RealDuckDBType;
22
- static SMALLINT: SmallIntDuckDBType;
23
- static SQLNULL: SQLNullDuckDBType;
24
- static STRUCT(entries: readonly StructEntry[]): StructDuckDBType;
25
- static STRUCT_entry(key: string, valueType: DuckDBType): StructEntry;
26
- static TIME: TimeDuckDBType;
27
- static TIME_TZ: TimeWithTimeZoneDuckDBType;
28
- static TIMESTAMP: TimestampDuckDBType;
29
- static TIMESTAMP_S: TimestampSecondsDuckDBType;
30
- static TIMESTAMP_MS: TimestampMillisecondsDuckDBType;
31
- static TIMESTAMP_NS: TimestampNanosecondsDuckDBType;
32
- static TIMESTAMP_TZ: TimestampWithTimeZoneDuckDBType;
33
- static TINYINT: TinyIntDuckDBType;
34
- static UBIGINT: UBigIntDuckDBType;
35
- static UHUGEINT: UHugeIntDuckDBType;
36
- static UINTEGER: UIntegerDuckDBType;
37
- static USMALLINT: USmallIntDuckDBType;
38
- static UTINYINT: UTinyIntDuckDBType;
39
- static UUID: UUIDDuckDBType;
40
- static UNION(alternatives: readonly UnionAlternative[]): UnionDuckDBType;
41
- static UNION_alternative(tag: string, valueType: DuckDBType): UnionAlternative;
42
- static VARCHAR: VarCharDuckDBType;
43
- static VARCHAR_withLength(length: number): VarCharDuckDBType;
44
- static WKB_BLOB: WKBBlobDuckDBType;
45
- }
@@ -1,2 +0,0 @@
1
- import { DuckDBType } from './DuckDBType.js';
2
- export declare function duckDBTypeToString(type: DuckDBType): string;
@@ -1,4 +0,0 @@
1
- export * from './DuckDBType.js';
2
- export { DuckDBTypes } from './DuckDBTypes.js';
3
- export { duckDBTypeToString } from './duckDBTypeToString.js';
4
- export { parseLogicalTypeString } from './parseLogicalTypeString.js';
@@ -1,9 +0,0 @@
1
- import { SpecialDuckDBValue } from './SpecialDuckDBValue.js';
2
- export declare class DuckDBTimestampMicroseconds extends SpecialDuckDBValue {
3
- readonly microseconds: bigint;
4
- readonly timezone: string | null | undefined;
5
- constructor(microseconds: bigint, timezone?: string | null);
6
- toDuckDBString(): string;
7
- toJS(): string;
8
- }
9
- export type DuckDBTimestamp = DuckDBTimestampMicroseconds;
@@ -1,7 +0,0 @@
1
- import { SpecialDuckDBValue } from './SpecialDuckDBValue.js';
2
- export declare class DuckDBUUID extends SpecialDuckDBValue {
3
- readonly bytes: Uint8Array;
4
- constructor(bytes: Uint8Array);
5
- toDuckDBString(): string;
6
- toJS(): string;
7
- }
@@ -1,5 +0,0 @@
1
- export declare abstract class SpecialDuckDBValue {
2
- abstract toDuckDBString(): string;
3
- toString(): string;
4
- abstract toJS(): any;
5
- }
@@ -1,18 +0,0 @@
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 { DuckDBUUID } from './DuckDBUUID.js';
18
- export { SpecialDuckDBValue } from './SpecialDuckDBValue.js';