kndndrj / nvim-dbee

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

Helper SQL should select the selected database #15

Closed artfulrobot closed 1 year ago

artfulrobot commented 1 year ago

If you are in the 'drawer' and browsing the structure and hit Enter on a table, it brings up a list of 'helpers'

Choosing a helper fails if the database name does not match the database name from the connection config. It is valid not to specify a db name in the config, but that then means you can't use any of the databases because of this issue.

I think two improvements would be:

  1. the helper - which is executed in the context of having selected a database from the drawer - should know to work on the database selected in the drawer.
  2. where a db is pre-selected in the config, it should be easier to get to it. It is still useful to show all dbs reachable with the connection, but some way to show the one pre-selected in config would be helpful. On a host with 100 databases, it would be nice not to have to search for something that's specified in config. Perhaps the selected one could simply be sorted to the top of the list?

Thanks!

kndndrj commented 1 year ago

I'm aware of this issue and am working on it.

a bit of background:

TL;DR I plan on suporting multiple dbs and addressing helper problem, but it will probably take some time :)

kndndrj commented 1 year ago

done in #35