insertAndGetId

suspend fun <Key : Any, T : IdTable<Key>> T.insertAndGetId(body: T.(UpdateBuilder<*>) -> Unit): EntityID<Key>

Represents the SQL statement that inserts a new row into a table.

Return

The generated ID for the new row.

Samples

org.jetbrains.exposed.r2dbc.sql.tests.shared.dml.InsertTests.testGeneratedKey04