Skip to main content

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:

  1. Validates the provided Connection Id input
  2. Acquires a mutex lock to ensure thread safety
  3. Looks up the connection in the SQLite connection pool
  4. Throws an error if the connection is not found
  5. Generates a unique transaction identifier (GUID)
  6. Begins a new transaction on the database connection
  7. Stores the transaction in the SQLite transaction store with the GUID as key
  8. Releases the mutex lock
  9. 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