Vscode-mssql: Behavior of the 'Execute Current Statement' command

Created on 17 Jul 2017  路  2Comments  路  Source: microsoft/vscode-mssql

  • MSSQL Extension Version: 1.1.0 alpha 3
  • VSCode Version: 1.14.1
  • OS Version: Windows 10 x64 Creators Update RTM (Build 1703)

Since the 'Execute Current Statement' command was newly added (It's awesome, thanks!) I've started using it pretty heavily and it's behavior seems a bit odd (to me only, probably).

According to how the command works right now, I need two keyboard shortcuts to either run the current statement (depends on cursor position, using the new command), what i selected (depends on selection range, using the old command) and executing everything in the editor/file (depends on selection range, or rather, non-selection, using the old command).

What i'd expect to happen is the other way around - The 'Execute Current Statement' would react to both cursor location and selection range (as selection sets/relates to cursor location, somewhat), executing the statement at cursor location if nothing is selected or executing the selected range.

The 'Execute Query' command would execute, well, everything in the current editor/file.

Not sure how much sense that makes for other SQL users, or with the current naming scheme for the two commands.

backlog enhancement

Most helpful comment

As a brand new user, I'd like to give you my experience. I went looking for "Execute Selected". I only saw "Execute Query" and "Execute Current Statement", so I assumed the feature was not available. The specific nature of "Execute Current Statement" made me assume that "Execute Query" would only run the entire file. My suggestion would be to add two commands and rename "Execute Query":

  • Execute Query (Selected or Entire File) (current behaviour)
  • Execute Entire File (for those that want to bind a key that always runs the entire file)
  • Execute Selected (runs nothing without a selection)
  • Execute Current Statement (current behaviour)

All 2 comments

We'll track this as a backlog suggestion for now and see what others think about this. Definitely room to improve usability here, so let's see whether others like this or are happy as-is

As a brand new user, I'd like to give you my experience. I went looking for "Execute Selected". I only saw "Execute Query" and "Execute Current Statement", so I assumed the feature was not available. The specific nature of "Execute Current Statement" made me assume that "Execute Query" would only run the entire file. My suggestion would be to add two commands and rename "Execute Query":

  • Execute Query (Selected or Entire File) (current behaviour)
  • Execute Entire File (for those that want to bind a key that always runs the entire file)
  • Execute Selected (runs nothing without a selection)
  • Execute Current Statement (current behaviour)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

coquagli picture coquagli  路  4Comments

dbreese-keystone picture dbreese-keystone  路  7Comments

kkwillmert picture kkwillmert  路  3Comments

ransagy picture ransagy  路  8Comments

GhostBasenji picture GhostBasenji  路  5Comments