- java.lang.Object
-
- io.helidon.dbclient.DbClient.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DbClient.BuilderaddInterceptor(DbInterceptor interceptor)Add a global interceptor.DbClient.BuilderaddInterceptor(DbInterceptor interceptor, DbStatementType... dbStatementTypes)Add an interceptor to specific statement types.DbClient.BuilderaddInterceptor(DbInterceptor interceptor, String... statementNames)Add an interceptor to specific named statements.DbClient.BuilderaddInterceptorProvider(DbInterceptorProvider provider)Add an interceptor provider.DbClientbuild()Build provider specific database handler.DbClient.Builderconfig(Config config)Use database connection configuration from configuration file.DbClient.BuildermapperManager(MapperManager manager)Mapper manager for generic mapping, such as mapping of parameters to expected types.DbClient.BuildermapperProvider(DbMapperProvider provider)Database schema mappers provider.DbClient.Builderstatements(DbStatements statements)Statements to use either from configuration or manually configured.
-
-
-
Method Detail
-
build
public DbClient build()
Build provider specific database handler.
-
addInterceptorProvider
public DbClient.Builder addInterceptorProvider(DbInterceptorProvider 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
-
addInterceptor
public DbClient.Builder addInterceptor(DbInterceptor interceptor)
Add a global interceptor. A global interceptor is applied to each statement.- Parameters:
interceptor- interceptor to apply- Returns:
- updated builder instance
-
addInterceptor
public DbClient.Builder addInterceptor(DbInterceptor interceptor, String... statementNames)
Add an interceptor to specific named statements.- Parameters:
interceptor- interceptor to applystatementNames- names of statements to apply it on- Returns:
- updated builder instance
-
addInterceptor
public DbClient.Builder addInterceptor(DbInterceptor interceptor, DbStatementType... dbStatementTypes)
Add an interceptor to specific statement types.- Parameters:
interceptor- interceptor to applydbStatementTypes- types of statements to apply it on- Returns:
- updated builder instance
-
config
public DbClient.Builder config(Config config)
Use database connection configuration from configuration file.- Parameters:
config-Configinstance 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 asDbMapperProviderJava 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
-
-