Add a test button to check SQL queries

Created on 2 March 2022, over 2 years ago
Updated 13 September 2023, 10 months ago

Problem/Motivation

When an SQL query contains mistakes, the current only way to find out is to open an external entity using xntt_db. It's even dangerous if one wants to check the update/save queries since they may mess up the data!

Proposed resolution

Add a "test" button after each SQL query field to test SQL queries using SQL transactions. Add some logic to report errors, warnings or database changes before a transaction rollback.

Remaining tasks

Implement the thing.

User interface changes

The buttons should use AJAX and just display the results in a text block below the SQL query of the plugin config page.

✨ Feature request
Status

Closed: won't fix

Version

1.0

Component

User interface

Created by

πŸ‡«πŸ‡·France guignonv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·France guignonv

    This requires a lot of work and a major user interface change. Since I want to be able to use this module as a basis for other schema-specific extensions, it would impact their interface as well. So the idea is quite simple: we keep the current interface as ("rough" as) it is and let other extensions manage advanced user interfaces with query checks on top of this module. Those extensions would inherit this one and on the backend, they would just generate the queries for the user and provide them to this parent module for treatment.

Production build 0.69.0 2024