upsertRow method

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

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

Implementation

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