kristijanhusak / vim-dadbod-ui

Simple UI for https://github.com/tpope/vim-dadbod
MIT License
1.54k stars 94 forks source link

bind parameter delimiter config #228

Closed greg-nagy closed 7 months ago

greg-nagy commented 8 months ago

I am using node-pg which support parametrized queries like this SELECT * FROM location WHERE name = $1 and then passing in an array for the parameters as a 2nd argument for the query function.

If I could change the delimiter from : to $ it would mean that I can freely move sql queries between my code and dadbod ui.

I couldn't find anything related to this after quickly glancing through the docs. Is it something that's possible? If not I am happy to try and make the change.

kristijanhusak commented 7 months ago

This is now added. You can switch to that format like this:

let g:db_ui_bind_param_pattern = '\$\d\+'
greg-nagy commented 7 months ago

thanks a lot

this is such an amazing quality of life change for me :)