Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7
Native NodeJS bindings for chDB, an in-process SQL OLAP Engine powered by ClickHouse
License
NotificationsYou must be signed in to change notification settings
chdb-io/chdb-node
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
chDB nodejs bindings.
npm i chdb
const{ query, Session}=require("chdb");varret;// Test standalone queryret=query("SELECT version(), 'Hello chDB', chdb()","CSV");console.log("Standalone Query Result:",ret);// Test session query// Create a new session instanceconstsession=newSession("./chdb-node-tmp");ret=session.query("SELECT 123","CSV")console.log("Session Query Result:",ret);ret=session.query("CREATE DATABASE IF NOT EXISTS testdb;"+"CREATE TABLE IF NOT EXISTS testdb.testtable (id UInt32) ENGINE = MergeTree() ORDER BY id;");session.query("USE testdb; INSERT INTO testtable VALUES (1), (2), (3);")ret=session.query("SELECT * FROM testtable;")console.log("Session Query Result:",ret);// If an error occurs, it will be throwntry{session.query("SELECT * FROM non_existent_table;","CSV");}catch(e){console.log("Error:",e.message);}// Clean up the sessionsession.cleanup();
npm run libchdbnpm installnpm runtestAbout
Native NodeJS bindings for chDB, an in-process SQL OLAP Engine powered by ClickHouse
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.