Commit Transaction
Commits a PostgreSQL transaction using the provided transaction ID.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Transaction Id - The unique identifier of the transaction to commit.
Options
- None
Output
- None
How It Works
The Commit Transaction node commits a PostgreSQL transaction using the provided transaction ID. When executed, the node:
- Validates the provided transaction ID
- Retrieves the transaction object from the internal transactions dictionary
- Commits the transaction to the database
- Removes the transaction from the internal transactions dictionary
Requirements
- A valid PostgreSQL connection must be established
- A transaction must have been started using the Start Transaction node
- The transaction ID must be valid and correspond to an active transaction
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Transaction Id
- Transaction Id not found in the transactions dictionary
Usage Notes
- Transactions should be committed after all related database operations are completed
- After committing a transaction, the transaction ID becomes invalid and cannot be used again
- If a transaction is not committed, changes may not be persisted to the database