Open alondahari opened 1 year ago
Being able to run some arbitrary command like https://stackoverflow.com/a/1968446/4265939 before connecting would be really useful.
I recently added an ability to run a function for a connection. You should be able to do anything in the function and just return the connection string. You can see the example here https://github.com/kristijanhusak/vim-dadbod-ui#via-gdbs-global-variable
Hmm.. I was hoping to be able to do it from https://github.com/kristijanhusak/vim-dadbod-ui?tab=readme-ov-file#via-dbuiaddconnection-command but this should work for what I needed. Thank you!
@neilsimp1 how would you suggest it works from the connection? Assuming that i have to store it as a string, what would you put inside of it?
I see your point, it would not work well as part of a Connection String. It would have to some other property stored alongside the connection string. Some other property that could hold arbitrary commands to execute. I would certainly understand if you viewed this as out of scope, though.
For background, I am transitioning from MySql Workbench to this. Workbench allowed storing Connection profiles as a DB connection over an SSH tunnel. That's where I was coming from mentally and how I ended up finding this Issue.
I was wondering if we could add support for custom callbacks that could run on certain events, hooks style. My desire is to load up the connection string from my password manager and create a tunnel when I try to connect to the db. What do you think?