@malloydata/db-duckdb 0.0.127-dev240307031210 → 0.0.127-dev240309202055
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/dist/duckdb.spec.js
CHANGED
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
const duckdb_common_1 = require("./duckdb_common");
|
|
26
26
|
const duckdb_connection_1 = require("./duckdb_connection");
|
|
27
|
+
const envDatabases = (process.env['MALLOY_DATABASES'] ||
|
|
28
|
+
process.env['MALLOY_DATABASE'] ||
|
|
29
|
+
'duckdb').split(',');
|
|
30
|
+
let describe = globalThis.describe;
|
|
31
|
+
if (!envDatabases.includes('duckdb')) {
|
|
32
|
+
describe = describe.skip;
|
|
33
|
+
}
|
|
27
34
|
/*
|
|
28
35
|
* !IMPORTANT
|
|
29
36
|
*
|
|
@@ -54,33 +61,33 @@ describe('DuckDBConnection', () => {
|
|
|
54
61
|
});
|
|
55
62
|
it('caches table schema', async () => {
|
|
56
63
|
await connection.fetchSchemaForTables({ 'test1': 'table1' }, {});
|
|
57
|
-
expect(runRawSQL).
|
|
64
|
+
expect(runRawSQL).toHaveBeenCalledTimes(1);
|
|
58
65
|
await new Promise(resolve => setTimeout(resolve));
|
|
59
66
|
await connection.fetchSchemaForTables({ 'test1': 'table1' }, {});
|
|
60
|
-
expect(runRawSQL).
|
|
67
|
+
expect(runRawSQL).toHaveBeenCalledTimes(1);
|
|
61
68
|
});
|
|
62
69
|
it('refreshes table schema', async () => {
|
|
63
70
|
await connection.fetchSchemaForTables({ 'test2': 'table2' }, {});
|
|
64
|
-
expect(runRawSQL).
|
|
71
|
+
expect(runRawSQL).toHaveBeenCalledTimes(1);
|
|
65
72
|
await new Promise(resolve => setTimeout(resolve));
|
|
66
73
|
await connection.fetchSchemaForTables({ 'test2': 'table2' }, { refreshTimestamp: Date.now() + 10 });
|
|
67
|
-
expect(runRawSQL).
|
|
74
|
+
expect(runRawSQL).toHaveBeenCalledTimes(2);
|
|
68
75
|
});
|
|
69
76
|
it('caches sql schema', async () => {
|
|
70
77
|
await connection.fetchSchemaForSQLBlock(SQL_BLOCK_1, {});
|
|
71
|
-
expect(runRawSQL).
|
|
78
|
+
expect(runRawSQL).toHaveBeenCalledTimes(1);
|
|
72
79
|
await new Promise(resolve => setTimeout(resolve));
|
|
73
80
|
await connection.fetchSchemaForSQLBlock(SQL_BLOCK_1, {});
|
|
74
|
-
expect(runRawSQL).
|
|
81
|
+
expect(runRawSQL).toHaveBeenCalledTimes(1);
|
|
75
82
|
});
|
|
76
83
|
it('refreshes sql schema', async () => {
|
|
77
84
|
await connection.fetchSchemaForSQLBlock(SQL_BLOCK_2, {});
|
|
78
|
-
expect(runRawSQL).
|
|
85
|
+
expect(runRawSQL).toHaveBeenCalledTimes(1);
|
|
79
86
|
await new Promise(resolve => setTimeout(resolve));
|
|
80
87
|
await connection.fetchSchemaForSQLBlock(SQL_BLOCK_2, {
|
|
81
88
|
refreshTimestamp: Date.now() + 10,
|
|
82
89
|
});
|
|
83
|
-
expect(runRawSQL).
|
|
90
|
+
expect(runRawSQL).toHaveBeenCalledTimes(2);
|
|
84
91
|
});
|
|
85
92
|
});
|
|
86
93
|
describe('multiple connections', () => {
|
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
const duckdb_common_1 = require("./duckdb_common");
|
|
26
26
|
const duckdb_wasm_connection_node_1 = require("./duckdb_wasm_connection_node");
|
|
27
|
+
const envDatabases = (process.env['MALLOY_DATABASES'] ||
|
|
28
|
+
process.env['MALLOY_DATABASE'] ||
|
|
29
|
+
'duckdb_wasm').split(',');
|
|
30
|
+
let describe = globalThis.describe;
|
|
31
|
+
if (!envDatabases.includes('duckdb_wasm')) {
|
|
32
|
+
describe = describe.skip;
|
|
33
|
+
}
|
|
27
34
|
describe('DuckDBWasmConnection', () => {
|
|
28
35
|
let connection;
|
|
29
36
|
let findTables;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-duckdb",
|
|
3
|
-
"version": "0.0.127-
|
|
3
|
+
"version": "0.0.127-dev240309202055",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@malloydata/duckdb-wasm": "0.0.6",
|
|
44
|
-
"@malloydata/malloy": "^0.0.127-
|
|
44
|
+
"@malloydata/malloy": "^0.0.127-dev240309202055",
|
|
45
45
|
"apache-arrow": "^13.0.0",
|
|
46
46
|
"duckdb": "0.9.2",
|
|
47
47
|
"web-worker": "^1.2.0"
|