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.

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

Blocking counterpart of KandraBatchScope.saveWithNullsInBatch: a null property is written as NULL. GH #189.

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

saveWithNullsInBatch that returns the entity as it will be persisted — see saveInBatchAndGet. GH #189.