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

Update the pagination logic for queries done from the SQL editor #151

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

svanharmelen
Copy link
Contributor

They previously didn't take the row with column names into account and I noticed there are actually 3 slightly different methods that calculate the pagination info, while I previously just updated/fixed one of them

The second commit changes the way how the SQL editor behaves a little as I continuously found myself doing the wrong thing here because the behavior was different depending on the result. If there were results the focus would switch to the table, if not it would stay with the editor.

While I understand that in some flows that makes sense as you might want to update your query and try again, but in a lot of other flows you might want to return to the tree or open another DB or...

So I thought it would easier for peoples' muscle memory to learn one consistent flow instead of having to think in between if there was output and if I should do different. For me the flow Ctrl-E -> write or update query -> Ctrl-R is really easy, consistent and never gives unexpected behavior.

But all that being said, let me know if you want me to drop the last commit. Thanks!

drivers/driver.go Show resolved Hide resolved
drivers/mysql.go Outdated Show resolved Hide resolved
drivers/mssqql.go Outdated Show resolved Hide resolved
@jorgerojas26 jorgerojas26 merged commit 6feb35c into jorgerojas26:main Jan 7, 2025
2 checks passed
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.

3 participants