Package com.invirgance.convirgance.jdbc.callback
package com.invirgance.convirgance.jdbc.callback
This package implements the callback pattern to ensure proper lifecycle management of database connections. It handles resource acquisition, operation execution, and automatic resource release, even when exceptions occur. The connection uses try-with-resources constructs to guarantee connections are properly closed.
Example usage:
// Create a transaction with a query operation TransactionOperation transaction = new TransactionOperation( new QueryOperation(new Query("truncate table " + tableName))); // Execute using a StoredConnection that manages lifecycle // The connection is provided through the StoredConnection's data source storedConnection.execute(connection -> { transaction.execute(connection); });
-
InterfacesClassDescriptionA callback interface for executing database operations.Provides a connection callback specifically for database metadata.