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

Export CSV re-executes a query even if it is changed to DELETE #344

Open
mstuczko opened this issue Jan 12, 2025 · 0 comments
Open

Export CSV re-executes a query even if it is changed to DELETE #344

mstuczko opened this issue Jan 12, 2025 · 0 comments

Comments

@mstuczko
Copy link

Problem/Motivation

Export CSV (or Export JSON) should only export what is displayed, and shouldn't execute the SQL command from the textbox.
Current behavior allows export functionality to delete records. (with an error)

Expected behavior

I click on Export CSV button, and displayed results are exported, regardless if I changed the query.
(see proposed changes for other options)

Actual behavior

Export executes the SQL command, even if it is DELETE.

Steps to reproduce

Enter a SELECT command into SQL textbox.
Run the query.
Change the query text to DELETE (or any other query), don't execute it.
Click on Export CSV (or Export JSON).
Result: Despite that user sees records from old SQL query, records got deleted instead of exported.

Proposed changes

Export should use the last executed SQL command only what is showing in records, ignoring what is in the textbox.
Or at least: if SQL is changed in the textbox, export should be disabled.
Or (additionally): allow executing export only when a SELECT command is/was issued.
Applies to any export type.

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

No branches or pull requests

1 participant