jvmMain.api.RaptorScope.kt Maven / Gradle / Ivy
The newest version!
package io.fluidsonic.raptor.transactions
import io.fluidsonic.raptor.*
import kotlin.contracts.*
@RaptorDsl
public suspend inline fun RaptorScope.transaction(block: RaptorTransactionScope.() -> Result): Result {
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
return context.transaction().execute(block)
}