upsertRow method

Future<EmailAccountPasswordResetRequest?> upsertRow(
  1. DatabaseSession session,
  2. EmailAccountPasswordResetRequest row, {
  3. required ColumnSelections<EmailAccountPasswordResetRequestTable> conflictColumns,
  4. ColumnSelections<EmailAccountPasswordResetRequestTable>? updateColumns,
  5. WhereExpressionBuilder<EmailAccountPasswordResetRequestTable>? updateWhere,
  6. Transaction? transaction,
})

Upserts a single EmailAccountPasswordResetRequest 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 EmailAccountPasswordResetRequest will have its id field set.

Implementation

Future<EmailAccountPasswordResetRequest?> upsertRow(
  _is.DatabaseSession session,
  EmailAccountPasswordResetRequest row, {
  required _is.ColumnSelections<EmailAccountPasswordResetRequestTable>
  conflictColumns,
  _is.ColumnSelections<EmailAccountPasswordResetRequestTable>? updateColumns,
  _is.WhereExpressionBuilder<EmailAccountPasswordResetRequestTable>?
  updateWhere,
  _is.Transaction? transaction,
}) async {
  return session.db.upsertRow<EmailAccountPasswordResetRequest>(
    row,
    conflictColumns: conflictColumns(EmailAccountPasswordResetRequest.t),
    updateColumns: updateColumns?.call(EmailAccountPasswordResetRequest.t),
    updateWhere: updateWhere?.call(EmailAccountPasswordResetRequest.t),
    transaction: transaction,
  );
}