Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Execute SQL statement at cursor location #934

Merged
merged 7 commits into from
Jul 14, 2017
Merged

Execute SQL statement at cursor location #934

merged 7 commits into from
Jul 14, 2017

Conversation

kburtram
Copy link
Member

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 65.301% when pulling 6391f29 on feature/execStmt into 0007730 on master.

Copy link
Contributor

@benrr101 benrr101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I think this looks pretty decent. Take a look at my question/comment for the onRunQuery method, but otherwise, I think this is fine.

@@ -307,6 +316,15 @@ export default class MainController implements vscode.Disposable {

Telemetry.sendTelemetryEvent('RunQuery');

if (execStatment) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain on how this is supposed to work. Isn't the contract to send a line and column number? If so, how does the start/end position play into this?
I think it might be a bit cleaner to factor out the prompting/retry logic and have two onRunQuery methods, one for a single statement, one for a selection/entire doc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benrr101 I've refactored that code that to make it more clear what's going on. When there is no selection range the editor selection property gives the cursor position, otherwise we use the start position in the selection as the cursor position.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.1%) to 61.063% when pulling ea08bf6 on feature/execStmt into 0007730 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 65.204% when pulling c95cffd on feature/execStmt into 0007730 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 64.944% when pulling a4dd5a2 on feature/execStmt into 0007730 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 64.935% when pulling 2395b75 on feature/execStmt into 0007730 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 64.974% when pulling a025144 on feature/execStmt into 0007730 on master.

@kburtram kburtram merged commit 8acbb7f into master Jul 14, 2017
@kburtram kburtram deleted the feature/execStmt branch July 14, 2017 05:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants