DataAccess
Main entry point to the data access layer, providing a unified API for interacting with PostgreSQL.
This facade orchestrates different interaction patterns:
Direct Queries: Execution of single SELECT, INSERT, UPDATE, or DELETE operations in auto-commit mode.
Managed Transactions: Atomic execution of complex logic blocks where multiple operations must succeed or fail together.
Declarative Transaction Plans: Execution of pre-built sequences of operations (TransactionPlan) that can handle step dependencies.
Pub/Sub Messaging: Native integration with PostgreSQL LISTEN/NOTIFY mechanism for real-time updates.
Implementation is typically thread-safe and manages an underlying connection pool (e.g., HikariCP). Call close or use the interface within a use block to ensure proper resource cleanup.
Functions
Creates a new PgChannelListener backed by a dedicated database connection.
Starts building a DELETE query.
Executes a pre-configured TransactionPlan as a single, atomic transaction.
Starts building an INSERT query.
Enables execution of a raw SQL query.
Starts building a SELECT query.
Executes a block of code within a managed transaction scope.
Starts building an UPDATE query.