chdb-io / chdb

chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
https://clickhouse.com/chdb
Apache License 2.0
2.17k stars 75 forks source link

Any example to use chdb directly as lib in c/c++ code #153

Closed qianzhen0 closed 11 months ago

qianzhen0 commented 11 months ago

Make sure to check documentation https://clickhouse.com/docs/en/ first. If the question is concise and probably has a short answer, asking it in community Slack is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse

If you still prefer GitHub issues, remove all this text and ask your question here.

Hi community~ wanna to use chdb directly as lib in my codebase(c/c++). Is there any examples and guides for integration and api usage?

by the way, it seems the slack & discord invitation is expired.

auxten commented 11 months ago

You can check the query_stable and free_result function. I wiil try to maintain It As a stable ABI. It will be in the _chdb_xxxxx_python.so. You can get It from the Python whl pkg for now. I will maintain a libchdb.so in the chdb main repo later.

auxten commented 11 months ago

Which discord link are you using. I rechecked all the Discord link in README. It's all permanent link. You can just click https://discord.com/invite/D2Daa2fM5K

qianzhen0 commented 11 months ago

thanks for the reply! @auxten looking forward to the libchdb.so

Successfully join the discord by re-login my account :)

lmangani commented 11 months ago

This work can be moved into the main repo later, but is fully functional: https://github.com/metrico/libchdb