Nozbe / WatermelonDB

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
https://watermelondb.dev
MIT License
10.62k stars 600 forks source link

☂️ Moving towards fast deletes #384

Open radex opened 5 years ago

radex commented 5 years ago

This is to fix: https://github.com/Nozbe/WatermelonDB/issues/186

Right now, deleting records is not very efficient in WatermelonDB.

Say you have models like this: Blog has_many Post has_many Comment. If you want to delete a blog post, you also have to delete all its posts, and all their comments. This happens one-by-one currently. What we need is the ability to efficiently (and atomically if possible) delete the whole tree in one go.

This needs some work and we need Community help (your help!) to achieve this:

shashvat-kedia commented 5 years ago

@radex Can I work on this?

radex commented 5 years ago

@sd1998 Absolutely!

shashvat-kedia commented 5 years ago

@radex Could you please direct me towards the point I should start from to solve this issue? Thanks.

radex commented 5 years ago

@sd1998 yeah! take a look at this PR: https://github.com/Nozbe/WatermelonDB/pull/399 — Step 2 was implemented there. So the tests are already there, now Step 3 is just to make it faster. In Model/helpers you have the implementation...

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.