objectbox / objectbox/objectbox-dart

Delete the store data with single function.

Open
#299 4 comments 4 reactions 1 assignee View on GitHub

@greenrobot-team is already working on this.

Since Jul 5, 2022.

enhancement
Dominant language
Dart
Stars
1.2k
Forks
162
Avg merge
15m
Merged PRs (30d)
1

Description

We have removeAll functionality for the individual boxes. Do we also have something like this for the entire store, such that all the data from all the boxes is deleted?

And if I have to run them in transaction and there are many entities. I am doing it like this now.

 _db.store.runInTransaction(TxMode.write, () {
      _db.store.box<Shape1>().removeAll();
      _db.store.box<Shape2>().removeAll();
    });

Could there be a better way to do this ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.