Build disabled, github's vms are too small to build duckdb amalgation build
[![Test](https://github.com/mmzeeman/educkdb/actions/workflows/test.yml/badge.svg)](https://github.com/mmzeeman/educkdb/actions/workflows/test.yml)
DuckDB NIF for Erlang.
DuckDB (https://duckdb.org/) is an in-process SQL OLAP database management system. This library makes it possible to use DuckDB in Erlang, Elixir or other languages supported by the beam.
Connect to a database
{ok, Db} = educkdb:open("database.db"),
{ok, Conn} = educkdb:connect(Db)
...
Create a table by reading a CSV or parquet files.
{ok, _} = educkdb:query(Conn, "CREATE TABLE ontime AS SELECT * FROM 'test.csv'"),
{ok, ParquetData} = educkdb:query(Conn, "SELECT * FROM 'test.parquet'"),
...
Note: This is a work in progress. At the moment it is possible to open, connect, query and return integer and varchar results. The nif function returning the query result will become a yielding nif. This is important for large query results.
Note: (dirty scheduler)
Note, creates a nif thread with a command queue, all calls which uses the connection as parameter will be send to the thread via the queue.
Note: via command thread.
Explicitly disconnect the connection. This also explicitly finalizes the thread. It is not required to call this. The garbage collector will disconnection automatically.
Note: (dirty scheduler)
Explicitly close the db. It is not required to call this. The garbage collector will disconnection automatically.
Note: dirty scheduler
Run a query, return the result.
Note: dirty scheduler
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: direct c
Note: dirty thread