From 6f979c1dbaa100b24e0195f84ebd9f25ed0243d3 Mon Sep 17 00:00:00 2001 From: Ming Fang Date: Sun, 24 Dec 2023 17:18:30 -0500 Subject: [PATCH 1/2] export queryHandler and socketResponse --- packages/duckdb/src/data-server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/duckdb/src/data-server.js b/packages/duckdb/src/data-server.js index 6d0c9e7e..2f2e81ac 100644 --- a/packages/duckdb/src/data-server.js +++ b/packages/duckdb/src/data-server.js @@ -68,7 +68,7 @@ function createSocketServer(server, handleQuery) { }); } -function queryHandler(db, queryCache) { +export function queryHandler(db, queryCache) { // retrieve query result async function retrieve(query, get) { @@ -166,7 +166,7 @@ function httpResponse(res) { } } -function socketResponse(ws) { +export function socketResponse(ws) { const STRING = { binary: false, fin: true }; const BINARY = { binary: true, fin: true }; From bd08db3e23cf477bc832316ff0508889f780fc1f Mon Sep 17 00:00:00 2001 From: Ming Fang Date: Sun, 24 Dec 2023 17:22:06 -0500 Subject: [PATCH 2/2] export Cache, queryHandler and socketResponse --- packages/duckdb/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/duckdb/src/index.js b/packages/duckdb/src/index.js index 887026f6..dbc3da7c 100644 --- a/packages/duckdb/src/index.js +++ b/packages/duckdb/src/index.js @@ -1,5 +1,6 @@ export { DuckDB } from './DuckDB.js'; -export { dataServer } from './data-server.js'; +export { Cache } from './Cache.js'; +export { dataServer, queryHandler, socketResponse } from './data-server.js'; export { loadArrow } from './load/arrow.js'; export { loadCSV } from './load/csv.js'; export { loadJSON } from './load/json.js';