updateWhere method

Future<List<RefreshToken>> updateWhere(
  1. DatabaseSession session, {
  2. required ColumnValueListBuilder<RefreshTokenUpdateTable> columnValues,
  3. required WhereExpressionBuilder<RefreshTokenTable> where,
  4. int? limit,
  5. int? offset,
  6. OrderByBuilder<RefreshTokenTable>? orderBy,
  7. OrderByListBuilder<RefreshTokenTable>? orderByList,
  8. @Deprecated('Use desc() on the orderBy column instead.') bool orderDescending = false,
  9. Transaction? transaction,
  10. bool noReturn = false,
})

Updates all RefreshTokens matching the where expression with the specified columnValues. Returns the list of updated rows.

If noReturn is set to true, the updated rows are not read back from the database and an empty list is returned. This avoids the overhead of transferring and deserializing the rows when the result is not needed.

Implementation

Future<List<RefreshToken>> updateWhere(
  _i1.DatabaseSession session, {
  required _i1.ColumnValueListBuilder<RefreshTokenUpdateTable> columnValues,
  required _i1.WhereExpressionBuilder<RefreshTokenTable> where,
  int? limit,
  int? offset,
  _i1.OrderByBuilder<RefreshTokenTable>? orderBy,
  _i1.OrderByListBuilder<RefreshTokenTable>? orderByList,
  @Deprecated('Use desc() on the orderBy column instead.')
  bool orderDescending = false,
  _i1.Transaction? transaction,
  bool noReturn = false,
}) async {
  return session.db.updateWhere<RefreshToken>(
    columnValues: columnValues(RefreshToken.t.updateTable),
    where: where(RefreshToken.t),
    limit: limit,
    offset: offset,
    orderBy: orderBy?.call(RefreshToken.t),
    orderByList: orderByList?.call(RefreshToken.t),
    orderDescending: // ignore: deprecated_member_use
        orderDescending,
    transaction: transaction,
    noReturn: noReturn,
  );
}