Disconnect
Closes and disconnects from a SQLite database connection.
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 connection to disconnect.
How It Works
The Disconnect node closes and removes a SQLite database connection from the connection pool. 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
- Closes the database connection
- Removes the connection from the SQLite connection pool
- Releases the mutex lock
Requirements
- A valid connection identifier from a previously established SQLite connection
- The connection must still be active
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 is already closed
Usage Notes
- The Connection Id should match the one returned by the Connect node
- Always disconnect connections when they are no longer needed to free up resources
- This node should be used at the end of database operations
- Ensure all transactions are committed or rolled back before disconnecting