- java.lang.Object
-
- io.helidon.dbclient.DbClient.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DbClient.Builder
addService(DbClientService clientService)
Add a client service.DbClient.Builder
addService(Supplier<? extends DbClientService> clientServiceSupplier)
Add a client service.DbClient.Builder
addServiceProvider(DbClientServiceProvider provider)
Add an interceptor provider.DbClient
build()
Build provider specific database handler.DbClient.Builder
config(Config config)
Use database connection configuration from configuration file.DbClient.Builder
mapperManager(MapperManager manager)
Mapper manager for generic mapping, such as mapping of parameters to expected types.DbClient.Builder
mapperProvider(DbMapperProvider provider)
Database schema mappers provider.DbClient.Builder
statements(DbStatements statements)
Statements to use either from configuration or manually configured.
-
-
-
Method Detail
-
build
public DbClient build()
Build provider specific database handler.
-
addServiceProvider
public DbClient.Builder addServiceProvider(DbClientServiceProvider provider)
Add an interceptor provider. The provider is only used when configuration is used (config(io.helidon.config.Config)
.- Parameters:
provider
- provider to add to the list of loaded providers- Returns:
- updated builder instance
-
addService
public DbClient.Builder addService(DbClientService clientService)
Add a client service.- Parameters:
clientService
- clientService to apply- Returns:
- updated builder instance
-
addService
public DbClient.Builder addService(Supplier<? extends DbClientService> clientServiceSupplier)
Add a client service.- Parameters:
clientServiceSupplier
- supplier of client service- Returns:
- updated builder instance
-
config
public DbClient.Builder config(Config config)
Use database connection configuration from configuration file.- Parameters:
config
-Config
instance with database connection attributes- Returns:
- database provider builder
-
statements
public DbClient.Builder statements(DbStatements statements)
Statements to use either from configuration or manually configured.- Parameters:
statements
- Statements to use- Returns:
- updated builder instance
-
mapperProvider
public DbClient.Builder mapperProvider(DbMapperProvider provider)
Database schema mappers provider. Mappers associated with types in this provider will override existing types associations loaded asDbMapperProvider
Java services.- Parameters:
provider
- database schema mappers provider to use- Returns:
- updated builder instance
-
mapperManager
public DbClient.Builder mapperManager(MapperManager manager)
Mapper manager for generic mapping, such as mapping of parameters to expected types.- Parameters:
manager
- mapper manager- Returns:
- updated builder instance
-
-