@uwdata/mosaic-duckdb 0.10.0 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uwdata/mosaic-duckdb",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "A Promise-based DuckDB API and Node.js data server.",
5
5
  "keywords": [
6
6
  "duckdb",
@@ -26,12 +26,12 @@
26
26
  "scripts": {
27
27
  "lint": "eslint src test",
28
28
  "server": "node bin/run-server.js",
29
- "test": "mocha 'test/**/*-test.js'",
29
+ "test": "vitest run",
30
30
  "prepublishOnly": "npm run test && npm run lint"
31
31
  },
32
32
  "dependencies": {
33
33
  "duckdb": "^1.0.0",
34
- "ws": "^8.17.1"
34
+ "ws": "^8.18.0"
35
35
  },
36
- "gitHead": "94fc4f0d4efc622001f6afd6714d1e9dda745be2"
36
+ "gitHead": "861d616f39926a1d2aee83b59dbdd70b0b3caf12"
37
37
  }
package/src/DuckDB.js CHANGED
@@ -114,7 +114,7 @@ export class DuckDBStatement {
114
114
 
115
115
  arrowBuffer(params) {
116
116
  return new Promise((resolve, reject) => {
117
- this.con.arrowIPCAll(...params, (err, result) => {
117
+ this.statement.arrowIPCAll(...params, (err, result) => {
118
118
  if (err) {
119
119
  reject(err);
120
120
  } else {
@@ -103,7 +103,7 @@ export function queryHandler(db, queryCache) {
103
103
 
104
104
  try {
105
105
  const { sql, type = 'json' } = query;
106
- console.log(`> ${type.toUpperCase()}${sql ? ' ' + sql : ''}`);
106
+ console.log(`> ${type.toUpperCase()}${sql ? ` ${sql}` : ''}`);
107
107
 
108
108
  // process query and return result
109
109
  switch (type) {
package/src/load/json.js CHANGED
@@ -3,7 +3,7 @@ import { parameters } from './parameters.js';
3
3
 
4
4
  export function loadJSON(db, tableName, fileName, options = {}) {
5
5
  const { select = ['*'], temp, replace, ...jsonOptions } = options;
6
- const params = parameters({ auto_detect: true, json_format: 'auto', ...jsonOptions });
6
+ const params = parameters({ auto_detect: true, ...jsonOptions });
7
7
  const query = `SELECT ${select.join(', ')} FROM read_json('${fileName}', ${params})`;
8
8
  return createTable(db, tableName, query, { temp, replace });
9
9
  }