tpope / vim-dadbod

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

Add MotherDuck adapter #191

Open Doekeb opened 2 weeks ago

Doekeb commented 2 weeks ago

Add an adapter, based on the existing DuckDB adapter, for MotherDuck (cloud-hosted serverless DuckDB).

This also improves the output format of the existing DuckDB adapter to use duckbox instead of columns.

For example: Before: image

After: image

Note in particular the presence of data types in column headers.

TODO:

Doekeb commented 2 weeks ago

@tpope I was mostly able to figure out the interface, but I'm not completely sure on what canonicalize is supposed to do or what it's used for. Right now I have it set up to return the URL unchanged. MotherDuck CLI assumes a token is stored as an environment variable so the connection URL is extremely simple.

Aside from the documentation TODO, I'm interested to hear if you think anything else is missing!