Skip to content

Commit

Permalink
feat: export Cache, queryHandler and socketResponse (#237)
Browse files Browse the repository at this point in the history
* export queryHandler and socketResponse

* export Cache, queryHandler and socketResponse
  • Loading branch information
mingfang authored Dec 28, 2023
1 parent b9ae759 commit be2162f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/duckdb/src/data-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 };

Expand Down
3 changes: 2 additions & 1 deletion packages/duckdb/src/index.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit be2162f

Please sign in to comment.