Interface DatabasePopulator
- All Known Implementing Classes:
CompositeDatabasePopulator, ResourceDatabasePopulator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy used to populate, initialize, or clean up a database.
- Since:
- 5.3
- Author:
- Mark Paluch, Keith Donald, Sam Brannen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void> populate(Connection connection) Populate, initialize, or clean up the database using the provided R2DBCConnection.default reactor.core.publisher.Mono<Void> populate(ConnectionFactory connectionFactory) Execute the givenDatabasePopulatoragainst the givenConnectionFactory.
-
Method Details
-
populate
Populate, initialize, or clean up the database using the provided R2DBCConnection.- Parameters:
connection- the R2DBC connection to use to populate the db; already configured and ready to use, must not benull- Returns:
Monothat initiates script execution and is notified upon completion- Throws:
ScriptException- in case of any errors
-
populate
Execute the givenDatabasePopulatoragainst the givenConnectionFactory.- Parameters:
connectionFactory- theConnectionFactoryto execute against- Returns:
Monothat initiatespopulate(Connection)and is notified upon completion- Throws:
ScriptException- in case of any errors
-