docs/api/exposed-r2dbc/org.jetbrains.exposed.v1.r2dbc/batch-replace.html
suspend fun <T : Table, E : Any> T.batchReplace(data: Iterable<E>, shouldReturnGeneratedValues: Boolean = true, body: BatchReplaceStatement.(E) -> Unit): List<ResultRow>
Represents the SQL statement that either batch inserts new rows into a table, or, if insertions violate unique constraints, first deletes the existing rows before inserting new rows.
Note: This operation is not supported by all vendors, please check the documentation.
data
Collection of values to use in replace.
shouldReturnGeneratedValues
Specifies whether newly generated values (for example, auto-incremented IDs) should be returned. See Batch Insert for more details.
org.jetbrains.exposed.v1.r2dbc.sql.tests.shared.dml.ReplaceTests.testBatchReplace01
suspend fun <T : Table, E : Any> T.batchReplace(data: Sequence<E>, shouldReturnGeneratedValues: Boolean = true, body: BatchReplaceStatement.(E) -> Unit): List<ResultRow>
Represents the SQL statement that either batch inserts new rows into a table, or, if insertions violate unique constraints, first deletes the existing rows before inserting new rows.
Note: This operation is not supported by all vendors, please check the documentation.
data
Sequence of values to use in replace.
shouldReturnGeneratedValues
Specifies whether newly generated values (for example, auto-incremented IDs) should be returned. See Batch Insert for more details.
org.jetbrains.exposed.v1.r2dbc.sql.tests.shared.dml.ReplaceTests.testBatchReplaceWithSequence
Generated by Dokka © 2026 Copyright