upsertRow method
Future<EmailCreateAccountRequest?>
upsertRow(
- DatabaseSession session,
- EmailCreateAccountRequest row, {
- required ColumnSelections<
EmailCreateAccountRequestTable> conflictColumns, - ColumnSelections<
EmailCreateAccountRequestTable> ? updateColumns, - WhereExpressionBuilder<
EmailCreateAccountRequestTable> ? updateWhere, - Transaction? transaction,
Upserts a single EmailCreateAccountRequest and returns the resulting row.
If the row conflicts on the given conflictColumns, the existing row is
updated. Otherwise, a new row is inserted.
If updateColumns is provided, only those columns will be updated on
conflict. If null, all non-conflict, non-id columns are updated.
If updateWhere is provided, the update only applies when the existing
row matches the expression. Returns null if no row was affected — for
example when updateWhere does not match the conflicting row.
The returned EmailCreateAccountRequest will have its id field set.
Implementation
Future<EmailCreateAccountRequest?> upsertRow(
_is.DatabaseSession session,
EmailCreateAccountRequest row, {
required _is.ColumnSelections<EmailCreateAccountRequestTable>
conflictColumns,
_is.ColumnSelections<EmailCreateAccountRequestTable>? updateColumns,
_is.WhereExpressionBuilder<EmailCreateAccountRequestTable>? updateWhere,
_is.Transaction? transaction,
}) async {
return session.db.upsertRow<EmailCreateAccountRequest>(
row,
conflictColumns: conflictColumns(EmailCreateAccountRequest.t),
updateColumns: updateColumns?.call(EmailCreateAccountRequest.t),
updateWhere: updateWhere?.call(EmailCreateAccountRequest.t),
transaction: transaction,
);
}