Builder

class Builder(var sqlLogger: SqlLogger? = null, var useNestedTransactions: Boolean = false, var defaultFetchSize: Int? = null, var defaultIsolationLevel: Int = -1, var defaultMaxAttempts: Int = 3, var defaultMinRetryDelay: Long = 0, var defaultMaxRetryDelay: Long = 0, var defaultReadOnly: Boolean = false, var warnLongQueriesDuration: Long? = null, var maxEntitiesToStoreInCachePerEntity: Int = Int.MAX_VALUE, var keepLoadedReferencesOutOfTransaction: Boolean = false, var explicitDialect: DatabaseDialect? = null, var defaultSchema: Schema? = null, var logTooMuchResultSetsThreshold: Int = 0, var preserveKeywordCasing: Boolean = true)

Constructors

Link copied to clipboard
constructor(sqlLogger: SqlLogger? = null, useNestedTransactions: Boolean = false, defaultFetchSize: Int? = null, defaultIsolationLevel: Int = -1, defaultMaxAttempts: Int = 3, defaultMinRetryDelay: Long = 0, defaultMaxRetryDelay: Long = 0, defaultReadOnly: Boolean = false, warnLongQueriesDuration: Long? = null, maxEntitiesToStoreInCachePerEntity: Int = Int.MAX_VALUE, keepLoadedReferencesOutOfTransaction: Boolean = false, explicitDialect: DatabaseDialect? = null, defaultSchema: Schema? = null, logTooMuchResultSetsThreshold: Int = 0, preserveKeywordCasing: Boolean = true)

Properties

Link copied to clipboard

How many records will be fetched at once by select queries

Link copied to clipboard

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. Check Database.getDefaultIsolationLevel for the database defaults.

Link copied to clipboard

The maximum amount of attempts that will be made to perform any transaction block. If this value is set to 1 and an SQLException 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.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Set the default schema for a database.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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.