π¦ FULL SET: Vrana/adminer/issues/ - Uncensored 2025
Enable SQL format export in SQL Command editor#1092
Enable SQL format export in SQL Command editor#1092srjheam wants to merge 2 commits intovrana:masterfrom
Conversation
|
Also, I created a .devcontainer in another branch to help environment setup and development for everyone; please see the sample branch https://github.com/srjheam/adminer/tree/srjheam/save-query-w-devcontainer . |
|
In order to test this PR:
|
--------- Co-authored-by: Jheam Storch Ross <58143641+srjheam@users.noreply.github.com>
|
I've included some changes from @rlaiola . If the commit messages do not follow the project convention, please do not hesitate to squash merge this PR, or contact me in order to restructure the git tree. Also, as I discussed with @rlaiola on srjheam#2 (comment) , my devcontainers branch is just a sample and I would be more than happy to contribute with adminer in another PR with devcontainer environment setup. |
|
@srjheam well done! I think that another PR with just the dev container has the potential to streamline the development process. Cheers. |
|
I'm not interested in this feature as I see it confusing. I would expect the SQL export to give me SQL commands to recreate the data in another database, not just save the current commands to a file (which could be done be a simple copy/paste). You can create a separate pull-request for |
Hi @vrana, avoid the "copy & paste to save the query in a file" is exactly the goal of this PR. Let me give you some context: in my database courses students use Adminer to run their queries and then save/export the queries (NOT the inserts) to send for correction. Important to say that queries are independent of the instance of the database. If not mistaken, the main goal of the "SQL command" page is to run queries (and why not saving them for use later on?). If one wants to export the database there is already an specific link for that (Export on the left side). Cheers |
Ok! Expect me doing so in the next few days. The .devcontainer is agnostic to any databases and SQLite was just part of the sample I wanted to easily spin up for @rlaiola . I'll create a new PR and make sure to support MySQL/PostgreSQL. |
In order to avoid the copy/paste/echo/touch flow to export the query, do you think it would be useful for the project to move this proposed feature from the export button to a new actual button in the interface with "Save query" label? |
@srjheam perhaps, moving this feature under the 'History' link (below the textarea input and sideways to the 'Edit' link) could be an interesting alternative. This way I guess it becomes "less" confusing ('Edit' means edit the statement in the textarea, and 'Save' would indicate that the past statement that would actually be saved). |
@srjheam an alternative is to refer to a docker-compose file in the devcontainer (an Adminer container and a MySQL one). Here is an example that could help. https://github.com/rtmonteiro/boca-playwright/tree/main/.devcontainer |
|
@vrana what do you think of the save feature as in the image? |



Personally I think it would be productive to integrate adminer and local sql scripts execution.
This may appear out of nowhere, but I am available to fulfill any request in order to it be approved.
Thanks!!