Simplify SQL query generation

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

Problem/Motivation

It is often if not always hard to write SQL queries to select, update, create or delete records in the database, especially when multiple tables are involved with different levels of relationships. Furthermore, using SQL queries may restrict the use of this module to a very small community of advanced user with deep knowledge in SQL. It should be possible to simplify the thing a little with some automated SQL query generation tool.

Proposed resolution

It could be as advanced as Drupal "Views" or any common "query builder" system but such systems (often) don't take into account the "save into database" part. It could also be quite simple with just some javascript that would ask the user for a database table and use some AJAX calls to get SQL queries for select, insert, update and delete. Then, the user would be able to modify and adjust those queries. The same way, it should be possible to add linked tables.

Remaining tasks

Think a new user interface.

User interface changes

Something new to generate SQL queries.

✨ 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