Update the pagination logic for queries done from the SQL editor #151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!