Live data from Hacker News

databow: a Rust CLI to query any database with an ADBC driver

columnar.tech

21–28 of 28 posts

Re: databow: a Rust CLI to query any database with an ADBC driver

#22

My biggest pain point with using different cli to connect to different databases is that they all do things like listing tables differently. Another nice feature one would want from such a program is of course auto complete.

I find this to put my psql in a better place as a daily driver. Adding this to ~/.inputrc [1] will allow you to limit search on your entered text. Eg.

select (up arrow)

will loop through your psql history for commands that started with e.g., . The challenging part is in wide tables and or table with large data. Less is awkward usually so using pspg made it less awkward.

I tried also to with help of ai, to write a plugin for sublime that fits my flow. It worked well but I think I'm more used to psql.

[1]

~/.inputrc

$if psql "\e[A": history-search-backward "\e[B": history-search-forward $endif

edit: formatting

Re: databow: a Rust CLI to query any database with an ADBC driver

#23
post #2

Sorry, just trying to understand. Why would I use this over duckdb. duckdb already has plugins for a lot of databases. Is the syntax the advantage?

I think the advantage is simplicity. Why connect first to duckdb and attach the db when you can query it directly with ADBC which is guaranteed to be fast

[flagged]

Re: databow: a Rust CLI to query any database with an ADBC driver

#24
post #2

Sorry, just trying to understand. Why would I use this over duckdb. duckdb already has plugins for a lot of databases. Is the syntax the advantage?

It's more of a common database cli/shell which uses a well defined, and fast, ADBC protocol. You are basically freed from DuckDB's internal handling/runtime of query for various databases. Not to mention, this has vastly more supported databases. With databow, the query still runs on the target database (unline duckdb), but you get one consistent CLI across different databases: connection profiles, output formats, hi…

FWIW duckdb's optimizer does actually push some of the query down into the target database such as selects and where clauses, which you definitely want in many cases.

Re: databow: a Rust CLI to query any database with an ADBC driver

#26
post #18

Earlier quoted context omitted.

I think the advantage is simplicity. Why connect first to duckdb and attach the db when you can query it directly with ADBC which is guaranteed to be fast

You don’t need to connect to duckdb, it’s just a process that you spawn.

You spawn in memory instance of duckdb and connect to it.

Re: databow: a Rust CLI to query any database with an ADBC driver

#27
post #2

Sorry, just trying to understand. Why would I use this over duckdb. duckdb already has plugins for a lot of databases. Is the syntax the advantage?

duckdb relies on filter pushdowns that makes the reason harder to spot, but you don’t use sqlite to connect to database via JDBC protocol, are you?
Post reply on HN