Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Bug: List and Open Saved Queries executes the query if not connected to a database prior #125

Closed
2 of 7 tasks
Coteh opened this issue Aug 10, 2017 · 2 comments
Closed
2 of 7 tasks
Assignees
Labels

Comments

@Coteh
Copy link
Contributor

Coteh commented Aug 10, 2017

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

Found this weird oddity with how the List and Open Saved Queries command works. If I'm not connected to a database (ex. I just opened up Sublime Text) and I run the command, and after selecting my database in the dropdown, it will actually execute the query instead of open a new tab containing the query. However, all subsequent queries I open with List and Open Saved Queries will open the query in a new tab properly without executing it. I presume this is because I'm already logged in and thus doesn't do that extra measure anymore which may contain a call to execute query instead of open it. I can self-assign to this issue and look into it further if you guys like. :)

Steps to Reproduce (For bugfixes)

  1. (Close and re-)Open Sublime Text
  2. Select "ST: List and Open Saved Queries" or press Ctrl-E, Ctrl-O if using default keybinds
  3. Select database connection
  4. Select saved query from dropdown

Expected behavior: Query is opened in a new tab

Actual behavior: Query is executed

Versions

  • Version: v0.9.4
  • OS: Windows 10 x64
  • RDBMS: PostgreSQL
@Coteh Coteh changed the title List and Open Saved Queries Executes the query if not connected to a database prior List and Open Saved Queries executes the query if not connected to a database prior Aug 10, 2017
@tkopets tkopets changed the title List and Open Saved Queries executes the query if not connected to a database prior Bug: List and Open Saved Queries executes the query if not connected to a database prior Aug 21, 2017
@tkopets tkopets added the bug label Aug 21, 2017
@tkopets
Copy link
Collaborator

tkopets commented Aug 21, 2017

Indeed this is a bug, I've just reproduced it - thanks for spotting it.
The fix should be relatively simple, so I'll fix it right away.

@tkopets tkopets self-assigned this Aug 21, 2017
tkopets added a commit that referenced this issue Aug 21, 2017
@tkopets
Copy link
Collaborator

tkopets commented Aug 21, 2017

Since we actually don't need the connection at all if we are just opening the saved query contents the proposal is not to show list of Connections at all.
(will be implemented as part of this bug fix)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants