executeUpsert method
Executes an SQL UPSERT query and returns the result as a SQLResponseOf object.
The tableName
parameter specifies the name of the table to upsert into.
The values
parameter is a JsonRow object representing the values to upsert.
The where
parameter is a JsonRow object representing the WHERE clause.
The nullAsBlank
parameter specifies whether to treat null values as blank.
Implementation
Future<SQLResponseOf<void>> executeUpsert({
required String tableName,
required JsonRow values,
JsonRow where = const {},
bool nullAsBlank = false,
}) {
return executeSQL(
dataSetType: "table",
sql: values.asUpsertCommand(
tableName: tableName,
where: where,
nullAsBlank: nullAsBlank,
quoteChar: quoteChar,
dataBaseProvider: dataBaseProvider,
),
);
}