Would love to see the ability to run multiple bulk update queries in a single database transaction. If I have a javascript query such as the following:
const tableUpdates = yourTable.recordUpdates;
query1.trigger({additionalScope: {tableUpdates}});
query2.trigger({additionalScope: {tableUpdates}});
If query1 and query2 were both bulk updates on tables within the same database, then it would be nice to have a way for the updates to run in a single transaction.
Related community posts:
Let me take stab at this, if I am incorrect or inaccurate, hopefully the Retool Gurus can correct me.
I am assuming this is because:
Each query opens and closes a connection to the database and transactions cannot be held open across connections.
The nature of parameterized queries does not allow multiple queries at a time. No reason to have transactions if you are only running single query.
So I think the limitations is with SQL itself when in a distributed environment (which is whereβ¦
Hi everyone,
At our company, we frequently use Retool to create projects for our clients. With Retool continuously introducing new features, its capabilities now extend far beyond just building a basic admin tool. We are now building complete digital platforms with some more complex use cases.
In these complex scenarios, we sometimes need to execute 7 or 8 queries in a row (on the same data source). This poses a risk of data inconsistency if something goes wrong. A solution is setting up a bacβ¦
Hi,
I was wondering whether it's possible to batch multiple PostgreSQL queries into one transaction so that if one of my queries fails, the entire batch of queries will fail?
I checked Batching queries in to one transaction - #4 by alex-w , but this doesn't seem to be what I'm looking for unfortunately.
1 Like
Paulo
February 21, 2024, 2:27am
2
Hi @nick.durcholz , I added your +1 to the feature requests. I'll tag you on the original topic so you get updates from us when this feature is added to Retool.