exposed-jdbc/src/main/kotlin/org/jetbrains/exposed/v1/jdbc/Queries.kt [480:522]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - try { statement.body() if (removeLastData) statement.validateLastBatch() } catch (e: BatchDataInconsistentException) { if (this.statement.data.size == 1) { throw e } val notTheFirstBatch = this.statement.data.size > 1 if (notTheFirstBatch) { if (removeLastData) { statement.removeLastBatch() } execute(TransactionManager.current()) result += statement.resultedValues.orEmpty() } executable = newBatchStatement() if (removeLastData && notTheFirstBatch) { executable.statement.addBatch() executable.statement.body() executable.statement.validateLastBatch() } } } data.forEach { element -> executable.handleBatchException { addBatch() } executable.handleBatchException(true) { body(element) } } if (executable.statement.arguments().isNotEmpty()) { executable.execute(TransactionManager.current()) result += executable.statement.resultedValues.orEmpty() } return result } @Deprecated( "This `update()` with a nullable `where` parameter will be removed in future releases. Please leave a comment on " + "[YouTrack](https://youtrack.jetbrains.com/issue/EXPOSED-494/Inline-DSL-statement-and-query-functions) " + "with a use-case if a nullable condition cannot be replaced with the new `update()` overloads.", ReplaceWith("update(limit = limit) { body.invoke() }"), DeprecationLevel.ERROR ) @JvmName("updateNullableParam") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - exposed-r2dbc/src/main/kotlin/org/jetbrains/exposed/v1/r2dbc/Queries.kt [473:515]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - try { statement.body() if (removeLastData) statement.validateLastBatch() } catch (e: BatchDataInconsistentException) { if (this.statement.data.size == 1) { throw e } val notTheFirstBatch = this.statement.data.size > 1 if (notTheFirstBatch) { if (removeLastData) { statement.removeLastBatch() } execute(TransactionManager.current()) result += statement.resultedValues.orEmpty() } executable = newBatchStatement() if (removeLastData && notTheFirstBatch) { executable.statement.addBatch() executable.statement.body() executable.statement.validateLastBatch() } } } data.forEach { element -> executable.handleBatchException { addBatch() } executable.handleBatchException(true) { body(element) } } if (executable.statement.arguments().isNotEmpty()) { executable.execute(TransactionManager.current()) result += executable.statement.resultedValues.orEmpty() } return result } @Deprecated( "This `update()` with a nullable `where` parameter will be removed in future releases. Please leave a comment on " + "[YouTrack](https://youtrack.jetbrains.com/issue/EXPOSED-494/Inline-DSL-statement-and-query-functions) " + "with a use-case if a nullable condition cannot be replaced with the new `update()` overloads.", ReplaceWith("update(limit = limit) { body.invoke() }"), DeprecationLevel.ERROR ) @JvmName("updateNullableParam") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -