Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export Cache, queryHandler and socketResponse #237

Merged
merged 2 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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