fetchConnection

abstract suspend fun fetchConnection(readOnly: Boolean = false): Connection(source)

Acquires a database connection.

If all connections are used, this function suspends until a connection is available.

The connection should always be short-lived, consider using transactional otherwise.

The returned connection must be closed with an use closure.

Parameters

readOnly

true if the database only is read from, can allow some optimizations but does not prevent writing

See also