Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support windows #5

Merged
merged 2 commits into from
May 11, 2020
Merged

Support windows #5

merged 2 commits into from
May 11, 2020

Conversation

tamago324
Copy link
Contributor

Hi @kristijanhusak
Thank you for the great plugin ✨

It now works on Windows.

I've tested all three on Ubuntu and Windows.

  • PostgreSQL
  • MySQL
  • SQL Server

However, the connection from Neovim on Windows to PostgreSQL could not be made because of these issue. Maybe it's just my environment.

I have only checked omnifunc, should I also check coc.nvim and deoplete.nvim?
If I have to check, I will check.

Thank you!

@kristijanhusak
Copy link
Owner

@tamago324 I left one comment on code. Please review it so we can wra0 up this support.

@tamago324
Copy link
Contributor Author

Thank you for your comment.
I'm sorry. Where is the comment on the code? I don't know where that comment is located.

@@ -163,7 +163,8 @@ function! s:generate_query(db, query_key, ...) abort
if a:0 > 0
let Query = Query(a:1)
endif
return printf('%s %s', base_query, Query)
" for PostgreSQL
return printf('%s %s', substitute(base_query, '"', '', 'g'), Query)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this has to be done? Isn't dadbod taking care of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A string like the following was returned

psql -w --dbname "postgresql://postgres:[email protected]:5432/shop"

However, it was confirmed that it works normally even if you don't replace it with substitute().
Therefore, it is removed.

@kristijanhusak kristijanhusak merged commit 6533052 into kristijanhusak:master May 11, 2020
@kristijanhusak
Copy link
Owner

Thanks!

@tamago324
Copy link
Contributor Author

Thank you so much for merging!

@tamago324 tamago324 deleted the support-windows branch May 11, 2020 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants