mtxr / SublimeText-SQLTools

SQLTools for Sublime Text 3
https://code.mteixeira.dev/SublimeText-SQLTools/
GNU General Public License v3.0
177 stars 40 forks source link

No longer executes line with cursor #181

Closed emilymeissen closed 6 years ago

emilymeissen commented 6 years ago

Previously when running a query (ctrl+e ctrl+e), SQLTools would execute the selected text (if any text was selected) or the line the cursor was on. As of the new version (changed between when I used it on Friday and today), it will no longer execute the line the cursor is on and instead appears to be executing the entire file.

tkopets commented 6 years ago

Yes, indeed, the default has changed since v0.9.8 release, as most of the new coming users didn't expect SQLTools to execute just a single line when nothing is selected (most of other RDBMS tools execute either the whole file or the current statement and almost none of them execute the current line). Also, not that long ago this behavior (exec whole file if nothing selected) has been set as default for SQLTools for VSCode as well (https://github.com/mtxr/vscode-sqltools/issues/27).

You can revert to old behavior by using the SQLTools setting "expand_to": "line".

Not related: Since you are using Vertica and there is no test Vertica instance to test during dev - I would appreciate your feedback regarding SQLTools functionality on Vertica (all works as expected?).

emilymeissen commented 6 years ago

Awesome, thanks!

I don't use the saved queries features, but everything else works great! When the selected text is just a schema+table name, would it be possible to make the "Show table records" (ctrl+e ctrl+s) and "View table schemas" (ctrl+e ctrl+d) use that table?

tkopets commented 6 years ago

Since your main problem is resolved I'm closing this issue.

Your proposal sounds like nice to have feature! If you want to track progress on your proposed feature feel free to add it as a separate github issue.