@FunctionalInterface public interface DatabasePopulator
ResourceDatabasePopulator
,
ConnectionFactoryInitializer
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Void> |
populate(io.r2dbc.spi.Connection connection)
Populate, initialize, or clean up the database using the
provided R2DBC
Connection . |
default reactor.core.publisher.Mono<Void> |
populate(io.r2dbc.spi.ConnectionFactory connectionFactory)
Execute the given
DatabasePopulator against the given ConnectionFactory . |
reactor.core.publisher.Mono<Void> populate(io.r2dbc.spi.Connection connection)
Connection
.connection
- the R2DBC connection to use to populate the db;
already configured and ready to use, must not be null
Mono
that initiates script execution and is
notified upon completionScriptException
- in case of any errorsdefault reactor.core.publisher.Mono<Void> populate(io.r2dbc.spi.ConnectionFactory connectionFactory)
DatabasePopulator
against the given ConnectionFactory
.connectionFactory
- the ConnectionFactory
to execute againstMono
that initiates populate(Connection)
and is notified upon completionScriptException
- in case of any errors