chdb-io / chdb-node

Native NodeJS bindings for chDB, an in-process SQL OLAP Engine powered by ClickHouse
https://chdb.io
Apache License 2.0
31 stars 3 forks source link

Question: Similar to DuckDB Node JS API #22

Open ceckoslab opened 1 day ago

ceckoslab commented 1 day ago

Hello @auxten

I am talking with a few enthusiasts and we are considering to add a few things that will improve the developers' experience on CHDB.

We could work on a proof of concept but first we would like to know if you would be interested to have similar to DuckDB Node JS API - ref: https://duckdb.org/docs/api/nodejs/overview

Something like this that would make it easier when building queries:

db.all('SELECT ?::INTEGER AS fortytwo, ?::VARCHAR AS hello', 42, 'Hello, World', function(err, res) {
  if (err) {
    console.warn(err);
    return;
  }
  console.log(res[0].fortytwo)
  console.log(res[0].hello)
});
auxten commented 23 hours ago

Nice, you are right. This style is more Node JS style. I will try to sort it out how to do that. But frankly speaking, I'm not a JS expert. If you would like to help on this and I could do the C/C++ part ;)

ceckoslab commented 18 hours ago

Among the enthusiasts we have someone who knows C/C++, Node JS and TypeScript. We are thinking to work on a very minor proof of concept and to share it as a draft pull request.

It will take a while but we will keep you posted.