PgMqDbAdapter

Adapter interface for interacting with PostgreSQL's message queue feature.

This interface provides methods for listening to database notifications and for executing SQL queries using prepared statements. It conforms to the QueryExecutor interface for executing statements and retrieving results, and the QueryExecutor.Transactional interface for managing transactions.

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract suspend fun begin(): Result<Transaction>
Link copied to clipboard
open suspend fun execute(statement: Statement): Result<Long>
abstract suspend fun execute(sql: String): Result<Long>
Link copied to clipboard
open suspend fun fetchAll(statement: Statement): Result<ResultSet>
abstract suspend fun fetchAll(sql: String): Result<ResultSet>
open suspend fun <T> fetchAll(statement: Statement, rowMapper: RowMapper<T>): Result<List<T>>
open suspend fun <T> fetchAll(sql: String, rowMapper: RowMapper<T>): Result<List<T>>
Link copied to clipboard
abstract suspend fun listen(channel: String, f: suspend (Notification) -> Unit)
Link copied to clipboard
open suspend fun <T> transaction(f: suspend Transaction.() -> T): T
Link copied to clipboard
open suspend fun <T> transactionCatching(f: suspend Transaction.() -> T): Result<T>