PgMqDbAdapterR2dbc

class PgMqDbAdapterR2dbc(connectionFactory: PostgresqlConnectionFactory, pool: ConnectionPool) : PgMqDbAdapter(source)

Implementation of the PgMqDbAdapter interface using R2DBC for asynchronous interaction with a PostgreSQL database.

This class provides an abstraction layer to handle database operations such as executing SQL statements, fetching results, managing transactions, and listening to PostgreSQL notifications on specified channels.

Parameters

pool

The connection pool used for acquiring database connections.

connectionFactory

The factory for creating individual PostgreSQL connections.

Constructors

Link copied to clipboard
constructor(connectionFactory: PostgresqlConnectionFactory, pool: ConnectionPool)

Properties

Link copied to clipboard
open override val encoders: ValueEncoderRegistry

Functions

Link copied to clipboard
open suspend override fun begin(): Result<Transaction>
Link copied to clipboard
open suspend fun execute(statement: Statement): Result<Long>
open suspend override fun execute(sql: String): Result<Long>
Link copied to clipboard
open suspend fun fetchAll(statement: Statement): 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>>
open suspend override fun fetchAll(sql: String): Result<ResultSet>
Link copied to clipboard
open suspend override 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>