upsertRow method

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

Implementation

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