Start Transaction
Starts a new SQLite database transaction.
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
- Connection Id - The identifier of the database connection to use for the transaction.
Output
- Transaction Id - The identifier for the newly started transaction.
How It Works
The Start Transaction node begins a new SQLite database transaction. When executed, the node:
- Validates the provided Connection Id input
- Acquires a mutex lock to ensure thread safety
- Looks up the connection in the SQLite connection pool
- Throws an error if the connection is not found
- Generates a unique transaction identifier (GUID)
- Begins a new transaction on the database connection
- Stores the transaction in the SQLite transaction store with the GUID as key
- Releases the mutex lock
- Returns the transaction identifier as output
Requirements
- A valid database connection identifier from the Connect node
- The connection must be active and open
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Connection Id
- Connection with the specified Id not found
- Database connection issues
Usage Notes
- The Transaction Id should be used with other transaction-related nodes (Commit, etc.)
- Always ensure transactions are properly committed or rolled back to maintain database integrity
- This node should be used in conjunction with Commit Transaction and other SQLite nodes
- Transactions are useful for grouping multiple database operations that should be executed as a single unit of work
- If a transaction is not committed, changes will be automatically rolled back when the connection is closed