Dynamic Table for GUI Query Builder

I know you can't dynamically set your table when it comes to the query builer. I know this because it has to do with the way PDO, the underlying SQL driver, works under the hood - it doesn't accept these dynamic values...

However, you are Retool, after all, so I am sure you can make it work. How? Well, in the UI variant of the query builder, you can filter against the given list of existing resources (i.e. tables/views, whatnot) and then based on that allow or disallow a certain value.

I realize this may give the user the impression anything goes, so it's important to communicate that the dynamic value can be added, but only when it is actually a valid table. Otherwise it will get rejected.

I think this could allow for some DRY'ing up of your UIs, which I've found to be the most tedious and energy-consuming task.

:wave: Thanks for taking this into consideration!

retool

1 Like

By the way, this feedback also applies to any columns that are used for editing data, which should be able to be set dynamically. Why, you may ask?

Well, suppose you have a delete query, which simply deletes a row from your database. If you want to use a DRY approach, you want to make this as dynamic as possible, meaning you would only need so set table and primary_key somewhere in your workspace.

Hi @emozio Thanks for the feedback! We'll reach out here if our team ships this feature

1 Like