BatchUpsertStatement
Represents the SQL statement that either batch inserts new rows into a table, or updates the existing rows if insertions violate unique constraints.
Parameters
Table to either insert values into or update values from.
(optional) Columns to include in the condition that determines a unique constraint match. If no columns are provided, primary keys will be used. If the table does not have any primary keys, the first unique index will be attempted.
List of specific columns to exclude from updating. If left null, all columns will be updated with the values provided for the insert.
Condition that determines which rows to update, if a unique violation is found. This clause may not be supported by all vendors.
Specifies whether newly generated values (for example, auto-incremented IDs) should be returned. See Batch Insert for more details.
Constructors
Properties
The number of rows affected by the insert operation.
Whether the SQL statement is meant to be performed as part of a batch execution.
The ResultRows generated by processing the database result set retrieved after executing the statement.
Functions
Executes the SQL statement directly in the provided transaction and returns the generated result, or null
if either no result was retrieved or if the transaction blocked statement execution.
Determines the exact way that an SQL statement is executed in a transaction and applies any necessary logic before returning the result generated by the executed statement.
Specifies that this column should be updated using the same values that would be inserted if there was no violation of a unique constraint in an upsert statement.
Uses a transaction connection and an sql string representation to return a precompiled SQL statement, stored as an implementation of PreparedStatementApi.
Returns the string representation of an SQL statement.
Calls the specified function onUpdate with an UpdateStatement as its argument, allowing values to be stored as part of the UPDATE clause of the upsert statement associated with this builder.
Updates the mapping of the specified column with the value of the provided expression.