kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
755 stars 51 forks source link

[QUESTION] How to query MySQL table instead of the whole server? #115

Open Lakshamana opened 4 months ago

Lakshamana commented 4 months ago

Hello,

First, I'd like to praise this plugin which is really useful and is helping a lot in my workflow. Really loving it, nice plugin and you've been doing an awesome work!

I noticed that creating a connection for mysql doesn't allow selecting a single database, like Postgres. Instead, it will open the server itself and it may be causing cmp-dbee to lose database table completion, since it tends to prefix tables with the database name. So with this plugin I'm able to have completion only on Postgres tables. I didn't test cross-database completion for JOINs in Postgres.

I used vim-dadbod-completion for a while, and it wouldn't work for joining tables in different databases (tested in an MySQL server environment), JOINs would only get completion if they're running on tables in the same database you switched to. For nvim-dbee, since I couldn't even select a database directly but rather the server, even a simple select statement on a table would be a cross-database query, since we're starting for the server and not the database.

May be this is more of a cmp-dbee issue than nvim-dbee itself. Thoughts?