marcboeker / go-duckdb

go-duckdb provides a database/sql driver for the DuckDB database engine.
MIT License
623 stars 97 forks source link

running without CGO_ENABLED=1 #165

Closed lev112 closed 6 months ago

lev112 commented 6 months ago

while it's very convenient to have the duckdb running in process, requiring CGO_ENABLED=1 makes it difficult to use many cases

I was wondering if there is a way to still use duckdb in go, but without forcing CGO_ENABLED=1

for example, running duckdb in a separate process, and communicate with it using odbc or adbc

is that something that was ever considered?

marcboeker commented 6 months ago

Hi @lev112 unfortunately not at the moment. This would require DuckDB to run in a standalone process and has a way to interfere with via an API. This is currently not the case. You can build your own standalone DB wrapper around DuckDB which exposes an ODBC interface. But I think this is overkill and would be against the idea behind DuckDB to be an in-process DB.