deleteWhere method

Future<List<UserProfile>> deleteWhere(
  1. DatabaseSession session, {
  2. required WhereExpressionBuilder<UserProfileTable> where,
  3. OrderByBuilder<UserProfileTable>? orderBy,
  4. @Deprecated('Use desc() on the orderBy column instead.') bool orderDescending = false,
  5. OrderByListBuilder<UserProfileTable>? orderByList,
  6. Transaction? transaction,
  7. bool noReturn = false,
})

Deletes all rows matching the where expression.

To specify the order of the returned rows use orderBy or orderByList when sorting by multiple columns.

If noReturn is set to true, the deleted 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<UserProfile>> deleteWhere(
  _i1.DatabaseSession session, {
  required _i1.WhereExpressionBuilder<UserProfileTable> where,
  _i1.OrderByBuilder<UserProfileTable>? orderBy,
  @Deprecated('Use desc() on the orderBy column instead.')
  bool orderDescending = false,
  _i1.OrderByListBuilder<UserProfileTable>? orderByList,
  _i1.Transaction? transaction,
  bool noReturn = false,
}) async {
  return session.db.deleteWhere<UserProfile>(
    where: where(UserProfile.t),
    orderBy: orderBy?.call(UserProfile.t),
    orderByList: orderByList?.call(UserProfile.t),
    orderDescending: // ignore: deprecated_member_use
        orderDescending,
    transaction: transaction,
    noReturn: noReturn,
  );
}