KandraBlockingBatchScope

DSL scope for building a caller-controlled LOGGED batch inside KandraRuntime.batchBlocking (non-suspend). See KandraBatchScope's class doc for the naming rationale and the GH #99 / ISS-086 reasoning behind keeping this a distinct type rather than sharing one scope class with both overload sets.

Functions

Link copied to clipboard

Adds the entity delete (primary + all lookup tables) to this batch. Blocking — for KandraRuntime.batchBlocking only.

Link copied to clipboard
fun <T : Any> KandraRepository<T>.saveInBatch(entity: T, ttlSeconds: Int? = null)

Adds the entity save (primary + BATCH lookups) to this batch. Blocking — for KandraRuntime.batchBlocking only.

Link copied to clipboard
fun <T : Any> KandraRepository<T>.saveInBatchAndGet(entity: T, ttlSeconds: Int? = null): T

Same as saveInBatch, but returns the entity that will be persisted when this batch commits — with any @GeneratedUuid/@CreatedAt/@UpdatedAt values already resolved. See KandraBatchScope.saveInBatchAndGet's doc (the suspend counterpart) for the underlying gap this closes.