Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Allow specific query execution #866

Open
ccrvlh opened this issue Sep 19, 2024 · 4 comments
Open

Allow specific query execution #866

ccrvlh opened this issue Sep 19, 2024 · 4 comments
Assignees
Labels
enhancement 🚀 New feature or request

Comments

@ccrvlh
Copy link

ccrvlh commented Sep 19, 2024

Currently, the query tab only allows execution of all queries (eg. separated by ;) within the same window.
IMHO Postico has a very nice way of handling this - the query tab allows for multiple statements, and you are within a statement (cursor somewhere within a specific statement), the statement is slightly highlighted and you can just run that specific statement. As a user, most of the times I have multiple queries and usually just want to run one of them, and I do using the shortcut for execution (CMD + Enter on macOS).

Currently, I'd have to have multiple query tabs which forces the user to (1) have a single statement per tab and (2) manage several tabs with simple queries each.

The feature request is two fold:

  1. Allow for "statement-aware" query execution
  2. Allow for "statement-aware" execution shortcut

Would be happy to contribute to this.

Thanks!

@Fabio286
Copy link
Member

Hi @ccrvlh ,

by now to achieve this in Antares you have to select the desired query and press run (or F5).
image

@ccrvlh
Copy link
Author

ccrvlh commented Sep 19, 2024

@Fabio286 thanks for sharing, I did notice this behavior.

The main difference is that this requires the user to select the range, rather than the system understanding the statement context based on the cursor position - Postico has a slight highlight on the statement which helps to understand the context.

As for the shortcut, it can be edited, so not really relevant.

@bart-schaefer
Copy link

Possibly related, #832 includes the request

Execute query with right click context menu in query editor

@Fabio286
Copy link
Member

It has also been requested by other people in the past if I remember correctly.
It seems trivial but with the editor library used (Ace Editor) it is not so easy to get the line the cursor is on.
I will still try to look at it again.

@Fabio286 Fabio286 added the enhancement 🚀 New feature or request label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🚀 New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants