# Builder

open class Builder

Builder API responsible for constructing a custom DatabaseApi configuration parameter state.

## Constructors

Builder
Link copied to clipboard
constructor()

## Properties

defaultFetchSize
Link copied to clipboard
var defaultFetchSize: Int?

How many records will be fetched at once by select queries

defaultIsolationLevel
Link copied to clipboard
open var defaultIsolationLevel: Int

Default transaction isolation level. If not specified, the database-specific level will be used. This can be overridden on a per-transaction level by specifying the `transactionIsolation` parameter of the `transaction` function.

defaultMaxAttempts
Link copied to clipboard
var defaultMaxAttempts: Int

The maximum amount of attempts that will be made to perform any transaction block. If this value is set to 1 and a database exception happens, the exception will be thrown without performing a retry. This can be overridden on a per-transaction level by specifying the `maxAttempts` property in a `transaction` block. Default amount of attempts is 3.

defaultMaxRetryDelay
Link copied to clipboard
var defaultMaxRetryDelay: Long

The maximum number of milliseconds to wait before retrying a transaction if a database exception happens. This can be overridden on a per-transaction level by specifying the `maxRetryDelay` property in a `transaction` block. Default maximum delay is 0.

defaultMinRetryDelay
Link copied to clipboard
var defaultMinRetryDelay: Long

The minimum number of milliseconds to wait before retrying a transaction if a database exception happens. This can be overridden on a per-transaction level by specifying the `minRetryDelay` property in a `transaction` block. Default minimum delay is 0.

defaultQueryTimeout
Link copied to clipboard
var defaultQueryTimeout: Int

How many seconds the driver should wait for a statement to execute in a transaction before timing out. Note that not all drivers implement this limit. For more information, refer to the relevant driver documentation. Default timeout is 0.

defaultReadOnly
Link copied to clipboard
var defaultReadOnly: Boolean

Should all connections/transactions be executed in read-only mode by default or not. Default state is false.

defaultSchema
Link copied to clipboard
var defaultSchema: Schema?

Set the default schema for a database.

dispatcher
Link copied to clipboard
var dispatcher: CoroutineDispatcher

The CoroutineDispatcher to be used when determining the scope of Exposed transaction if It is run in a context with no dispatcher. It could be, for instance, a Ktor route or a standalone Kotlin script.

explicitDialect
Link copied to clipboard
var explicitDialect: DatabaseDialect?

Set the explicit dialect for a database. This can be useful when working with unsupported dialects which have the same behavior as the one that Exposed supports.

keepLoadedReferencesOutOfTransaction
Link copied to clipboard
var keepLoadedReferencesOutOfTransaction: Boolean

Turns on "mode" for Exposed DAO to store relations (after they were loaded) within the entity that will allow access to them outside the transaction. Useful when eager loading is used.

logTooMuchResultSetsThreshold
Link copied to clipboard
var logTooMuchResultSetsThreshold: Int

Log too much result sets opened in parallel. The error log will contain the stacktrace of the place in the code where a new result set occurs, and it exceeds the threshold. 0 value means no log needed.

maxEntitiesToStoreInCachePerEntity
Link copied to clipboard
var maxEntitiesToStoreInCachePerEntity: Int

Amount of entities to keep in an EntityCache per an Entity class. Applicable only when `exposed-dao` module is used. This can be overridden on a per-transaction basis via `EntityCache.maxEntitiesToStore`. All entities will be kept by default.

preserveIdentifierCasing
Link copied to clipboard
var preserveIdentifierCasing: Boolean

Toggle whether all table and column identifiers should be quoted to preserve their case sensitivity. When enabled, identifiers will be quoted regardless of their casing, ensuring case-sensitive matching in databases like PostgreSQL.

preserveKeywordCasing
Link copied to clipboard
var preserveKeywordCasing: Boolean

Toggle whether table and column identifiers that are also keywords should retain their case sensitivity. Keeping user-defined case sensitivity (value set to `true`) is the default setting.

sqlLogger
Link copied to clipboard
var sqlLogger: SqlLogger?

SQLLogger to be used to log all SQL statements. Slf4jSqlDebugLogger by default.

useNestedTransactions
Link copied to clipboard
var useNestedTransactions: Boolean

Turn on/off nested transactions support. Is disabled by default

warnLongQueriesDuration
Link copied to clipboard
var warnLongQueriesDuration: Long?

Threshold in milliseconds to log queries which exceed the threshold with WARN level. No tracing enabled by default. This can be set on a per-transaction level by setting Transaction.warnLongQueriesDuration field.