@malloydata/db-duckdb 0.0.336 → 0.0.337

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 (2) hide show
  1. package/dist/index.js +47 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -25,4 +25,51 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.DuckDBConnection = void 0;
26
26
  var duckdb_connection_1 = require("./duckdb_connection");
27
27
  Object.defineProperty(exports, "DuckDBConnection", { enumerable: true, get: function () { return duckdb_connection_1.DuckDBConnection; } });
28
+ const malloy_1 = require("@malloydata/malloy");
29
+ const duckdb_connection_2 = require("./duckdb_connection");
30
+ (0, malloy_1.registerConnectionType)('duckdb', {
31
+ factory: (config) => {
32
+ const options = { ...config };
33
+ // Map user-friendly "path" to the constructor's "databasePath"
34
+ if ('path' in options && !('databasePath' in options)) {
35
+ options['databasePath'] = options['path'];
36
+ delete options['path'];
37
+ }
38
+ return new duckdb_connection_2.DuckDBConnection(options);
39
+ },
40
+ properties: [
41
+ {
42
+ name: 'databasePath',
43
+ displayName: 'Database Path',
44
+ type: 'file',
45
+ optional: true,
46
+ default: ':memory:',
47
+ fileFilters: { DuckDB: ['db', 'duckdb', 'ddb'] },
48
+ },
49
+ {
50
+ name: 'workingDirectory',
51
+ displayName: 'Working Directory',
52
+ type: 'string',
53
+ optional: true,
54
+ },
55
+ {
56
+ name: 'motherDuckToken',
57
+ displayName: 'MotherDuck Token',
58
+ type: 'password',
59
+ optional: true,
60
+ },
61
+ {
62
+ name: 'additionalExtensions',
63
+ displayName: 'Additional Extensions',
64
+ type: 'string',
65
+ optional: true,
66
+ },
67
+ {
68
+ name: 'readOnly',
69
+ displayName: 'Read Only',
70
+ type: 'boolean',
71
+ optional: true,
72
+ },
73
+ ],
74
+ });
28
75
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/db-duckdb",
3
- "version": "0.0.336",
3
+ "version": "0.0.337",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  "dependencies": {
47
47
  "@duckdb/duckdb-wasm": "1.33.1-dev13.0",
48
48
  "@duckdb/node-api": "1.4.3-r.1",
49
- "@malloydata/malloy": "0.0.336",
49
+ "@malloydata/malloy": "0.0.337",
50
50
  "@motherduck/wasm-client": "^0.6.6",
51
51
  "apache-arrow": "^17.0.0",
52
52
  "web-worker": "^1.3.0"