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

No data is being shown when querying #281

Open
idelice opened this issue Oct 27, 2024 · 5 comments
Open

No data is being shown when querying #281

idelice opened this issue Oct 27, 2024 · 5 comments

Comments

@idelice
Copy link

idelice commented Oct 27, 2024

No data is being shown when I query my database using this plugin.

I can confirm that i'm connected, and my tables are shown along with each field and their data types.

I've tested the same query, with the same db connection in pgadmin4 and psql, and I can confirm i'm getting data.

Here's how it looks after I do :w to execute query:

Screenshot 2024-10-27 at 10 41 57
@kristijanhusak
Copy link
Owner

What does it happen when you do this in cmdline while that buffer is opened?

:%DB

Also, some system information would be useful, system, Vim/Neovim, etc.

@idelice
Copy link
Author

idelice commented Nov 20, 2024

What does it happen when you do this in cmdline while that buffer is opened?

:%DB

Also, some system information would be useful, system, Vim/Neovim, etc.

Sorry for the long reply, but executing :%DB inside the buffer actually works and executes the query and I get data in the split buffer below.

Could this be a configuration issue from my side? I'm using LazyVim btw.

@kristijanhusak
Copy link
Owner

Could this be a configuration issue from my side? I'm using LazyVim btw.

Could be. Give me all the setup that you do for vim-dadbod-*

@idelice
Copy link
Author

idelice commented Nov 20, 2024

Could this be a configuration issue from my side? I'm using LazyVim btw.

Could be. Give me all the setup that you do for vim-dadbod-*

https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/lang/sql.lua

@kristijanhusak
Copy link
Owner

Removing this line should make it work:
https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/lang/sql.lua#L90

If you leave it on false, you can execute the selection or whole file with <leader>S (uppercase S).

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

No branches or pull requests

2 participants