Back to Exposed

toExecutable

docs/api/exposed-r2dbc/org.jetbrains.exposed.v1.r2dbc.statements/to-executable.html

1.2.01.2 KB
Original Source

toExecutable

fun <T : Any, S : Statement<T>> S.toExecutable(): SuspendExecutable<T, S>

Returns the associated SuspendExecutable that accepts this Statement type as an argument, allowing the provided statement to be then sent to the database for execution.

kotlin
suspendTransaction { val insertTaskStatement = buildStatement { Tasks.insert { it[title] = "Follow Exposed tutorial" it[isComplete] = false } } exec(insertTask.toExecutable())}

Content copied to clipboard

Throws

IllegalStateException

If the invoking statement does not have a corresponding built-in executable.

Generated by Dokka © 2026 Copyright