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 TypeMethodDescriptionbuild()databaseType(@Nullable DatabaseType databaseType) Overrides automatic database type detection.instanceProvider(@Nullable InstanceProvider instanceProvider) parsedSqlCacheCapacity(@Nullable Integer parsedSqlCacheCapacity) Configures the size of the parsed SQL cache.preparedStatementBinder(@Nullable PreparedStatementBinder preparedStatementBinder) resultSetMapper(@Nullable ResultSetMapper resultSetMapper) statementLogger(@Nullable StatementLogger statementLogger)
-
Method Details
-
databaseType
Overrides automatic database type detection.- 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
-