delete method

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

Deletes all UserProfileImages in the list and returns the deleted rows.

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

This is an atomic operation, meaning that if one of the rows fail to be deleted, none of the rows will be deleted.

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<UserProfileImage>> delete(
  _i1.DatabaseSession session,
  List<UserProfileImage> rows, {
  _i1.OrderByBuilder<UserProfileImageTable>? orderBy,
  @Deprecated('Use desc() on the orderBy column instead.')
  bool orderDescending = false,
  _i1.OrderByListBuilder<UserProfileImageTable>? orderByList,
  _i1.Transaction? transaction,
  bool noReturn = false,
}) async {
  return session.db.delete<UserProfileImage>(
    rows,
    orderBy: orderBy?.call(UserProfileImage.t),
    orderByList: orderByList?.call(UserProfileImage.t),
    orderDescending: // ignore: deprecated_member_use
        orderDescending,
    transaction: transaction,
    noReturn: noReturn,
  );
}