tpope / vim-dadbod

dadbod.vim: Modern database interface for Vim
https://www.vim.org/scripts/script.php?script_id=5665
3.75k stars 132 forks source link

Add DuckDB adapter #153

Closed touchmarine closed 7 months ago

touchmarine commented 11 months ago

This PR adds an adapter for DuckDB—the SQLite for analytics.

Implementation

I copied and tweaked the sqlite adapter as the duckdb cli accepts the same arguments the adapter uses.

The db#adapter#duckdb#test_file function checks for the magic bytes (DUCK) in the storage header as described in DuckDB Storage.

Fixes

The second commit fixes incorrect readfile() calls across the repo.

kbwhodat commented 7 months ago

Any update on merging this PR? It works great from what I can tell.