Class Database.Builder
java.lang.Object
com.pyranid.Database.Builder
- Enclosing class:
Database
Builder used to construct instances of
Database.
This class is intended for use by a single thread.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescription@NonNull Databasebuild()@NonNull Database.BuilderdatabaseType(@Nullable DatabaseType databaseType) Overrides automatic database type detection.@NonNull Database.BuilderinstanceProvider(@Nullable InstanceProvider instanceProvider) @NonNull Database.BuilderparsedSqlCacheCapacity(@Nullable Integer parsedSqlCacheCapacity) Configures the size of the parsed SQL cache.@NonNull Database.BuilderpreparedStatementBinder(@Nullable PreparedStatementBinder preparedStatementBinder) @NonNull Database.BuilderresultSetMapper(@Nullable ResultSetMapper resultSetMapper) @NonNull Database.BuilderstatementLogger(@Nullable StatementLogger statementLogger) @NonNull Database.Builder
-
Method Details
-
databaseType
Overrides automatic database type detection.If
null, the database type is detected lazily when database-type-specific behavior is first needed. Supplying a non-null value avoids automatic detection and its metadata lookup entirely.- Parameters:
databaseType- the database type to use (null to enable auto-detection)- Returns:
- this
Builder, for chaining - Since:
- 4.0.0
-
timeZone
-
instanceProvider
-
preparedStatementBinder
public @NonNull Database.Builder preparedStatementBinder(@Nullable PreparedStatementBinder preparedStatementBinder) -
resultSetMapper
-
statementLogger
-
parsedSqlCacheCapacity
Configures the size of the parsed SQL cache.A value of
0disables caching. A value ofnulluses the default size.- Parameters:
parsedSqlCacheCapacity- cache size (0 disables caching, null uses default)- Returns:
- this
Builder, for chaining
-
build
-