KandraRuntime
Entry point for all Kandra operations. Obtained from application.kandra in Ktor routes.
Tracks inFlightCount for graceful shutdown drain and isShuttingDown to reject new queries after shutdown is signalled.
application.kandra.batch {
userRepo.saveInBatch(user)
walletRepo.saveInBatch(wallet)
}Content copied to clipboard
Properties
Functions
Link copied to clipboard
Executes all operations in block as a single LOGGED batch.
Link copied to clipboard
Blocking variant of batch for use in non-suspend contexts.
Link copied to clipboard
Creates a blocking repository for entityClass. For blocking contexts only — use suspendRepository in Ktor routes.
Link copied to clipboard
Creates a suspend (coroutine-friendly) repository for entityClass. Preferred for Ktor routes.