English | 简体中文

api-docs / org.ktorm.database / Database / executeUpdateAndRetrieveKeys

executeUpdateAndRetrieveKeys

fun executeUpdateAndRetrieveKeys(
    expression: SqlExpression
): Pair<Int, CachedRowSet>
(source code)

Format the given expression to a SQL string with its execution arguments, execute it via
PreparedStatement.executeUpdate, then return the effected row count along with the generated keys.

Parameters

expression - the SQL expression to be executed.

Since
2.7

Return
a Pair combines the effected row count and the generated keys.