Does Wappler support it? If not, I think you should consider adding it as it is very useful when creating transactions that depend on other tables.
Hi.
The nature of individual query is dependent on the DB to ensure atomicity. But if you are talking about atomicity on server action level, where all insert/update/delete steps are atomic, Wappler does not support that at the moment. There have been some recent discussions around adding support for TRANSACTIONS in Server Actions, which should solve this problem.
Choosing Postgres as the database backend seems to solve all the atomicity concerns I’ve run into. Here’s some info from Postgres on how transactions work within the Postgres server daemon: https://www.postgresql.org/docs/current/tutorial-transactions.html
PostgreSQL actually treats every SQL statement as being executed within a transaction. If you do not issue a
BEGIN command, then each individual statement has an implicit
BEGIN and (if successful)
COMMIT wrapped around it. A group of statements surrounded by
BEGIN and
COMMIT is sometimes called a *transaction block* .
If you need atomicity and rollback capability when your transaction needs to change more than one table, maybe you can try writing a stored procedure and invoke it using Wappler’s Custom Query step in the Database group.
Alex