tpope / vim-dadbod

dadbod.vim: Modern database interface for Vim
https://www.vim.org/scripts/script.php?script_id=5665
3.74k stars 131 forks source link

Add Snowflake support with standardized URL parsing #174

Closed ctdunc closed 1 month ago

ctdunc commented 6 months ago

Wasn't sure how to update #65 with my own changes, so opened a new PR here. Please let me know if any changes required!

daasity-nathan commented 4 months ago

When I use this, it seems like any query I write hangs out for a few (7-10) seconds, before starting the "Execute query" loading screen (initiating the connection via snowsql?). On the other hand, using DB to connect to BigQuery seems to start the "Execute query" screen much faster (0-2 seconds).

Is there some way you are using to step around this that I'm not seeing @ctdunc?

ctdunc commented 4 months ago

When I use this, it seems like any query I write hangs out for a few (7-10) seconds, before starting the "Execute query" loading screen (initiating the connection via snowsql?). On the other hand, using DB to connect to BigQuery seems to start the "Execute query" screen much faster (0-2 seconds).

Is there some way you are using to step around this that I'm not seeing @ctdunc?

I see a similar time for connection (not quite as long, does it take u this long to connect via the CLI normally?). My initial thought is that this is probably a limitation of the snowsql tool.

@daasity-nathan one day later update: I'm not seeing 7-10 seconds. Maybe more like one second, even with using a really annoying VPN. Can you test this by connecting with the CLI tool directly?

ctdunc commented 3 months ago

@tpope is there anything else blocking this PR? I think I've addressed your comments, happy to make any more suggested changes.

Ill hopefully have time to dedicate to looking at snowflakes new CLI tools for that one SSO caching issue, but i think as-is we have 95% of use cases covered, and it doesnt seem like this functionality is included with any of the other databases.

Thanks again for your time and patience!

vanducng commented 3 months ago

@ctdunc It works fairly great for me. Just curious if there is additional config to display all the databases?

CleanShot 2024-08-11 at 23 46 07@2x

ctdunc commented 3 months ago

@ctdunc It works fairly great for me. Just curious if there is additional config to display all the databases?

CleanShot 2024-08-11 at 23 46 07@2x

Looks like you are using DBUI, which is a different project. https://github.com/kristijanhusak/vim-dadbod-ui

I have spent maybe 20 mins on getting this working in DBUI & have a rough version working, but needs cleanup. probably need approval here first before submitting a pr there as this is a dependency.

vanducng commented 3 months ago

@ctdunc It works fairly great for me. Just curious if there is additional config to display all the databases? CleanShot 2024-08-11 at 23 46 07@2x

Looks like you are using DBUI, which is a different project. https://github.com/kristijanhusak/vim-dadbod-ui

I have spent maybe 20 mins on getting this working in DBUI & have a rough version working, but needs cleanup. probably need approval here first before submitting a pr there as this is a dependency.

Awesome, Can you share your fork on vim-dadbod-ui ? Im very eager to try it out for my VSCode Snowflake extension replacement.

ctdunc commented 3 months ago

@ctdunc It works fairly great for me. Just curious if there is additional config to display all the databases? CleanShot 2024-08-11 at 23 46 07@2x

Looks like you are using DBUI, which is a different project. https://github.com/kristijanhusak/vim-dadbod-ui

I have spent maybe 20 mins on getting this working in DBUI & have a rough version working, but needs cleanup. probably need approval here first before submitting a pr there as this is a dependency.

Awesome, Can you share your fork on vim-dadbod-ui ? Im very eager to try it out for my VSCode Snowflake extension replacement.

Sure. github.com/ctdunc/vim-dadbod-ui-snowflake

Still really rudimentary, no autocomplete support etc. Going on vacation shortly but happy to try out any features once back in internet land

vanducng commented 3 months ago

@ctdunc It works fairly great for me. Just curious if there is additional config to display all the databases? CleanShot 2024-08-11 at 23 46 07@2x

Looks like you are using DBUI, which is a different project. https://github.com/kristijanhusak/vim-dadbod-ui I have spent maybe 20 mins on getting this working in DBUI & have a rough version working, but needs cleanup. probably need approval here first before submitting a pr there as this is a dependency.

Awesome, Can you share your fork on vim-dadbod-ui ? Im very eager to try it out for my VSCode Snowflake extension replacement.

Sure. github.com/ctdunc/vim-dadbod-ui-snowflake

Still really rudimentary, no autocomplete support etc. Going on vacation shortly but happy to try out any features once back in internet land

It is a great start, I start trying out now, thank you for putting effort on it.

For this PR, could we make it main if no additional updates required @tpope ?

Slanman3755 commented 2 months ago

+1 on getting this moving

tpope commented 1 month ago

I did a pass of cleanup. Please sanity check that everything's still working as intended. Once you confirm, I'll squash and merge.

vanducng commented 1 month ago

hey @ctdunc, just one more step. Im excited to switch to main branch now.

ctdunc commented 1 month ago

LGTM--connecting works and can execute queries! Thank you!