tinybase icon indicating copy to clipboard operation
tinybase copied to clipboard

Feature request: partial update in PostgresPersister autoload

Open jakubriedl opened this issue 8 months ago • 1 comments

Hi, me again. We're loving TinyBase, we're having great time and thank you for your amazing work. This feature request isn't blocking for us because we'll implement it ourselves on our fork and raise a PR back. Just creating this issue for having a place for discussion and/or feedback on what we're adding to our fork and how we may contribute back.

Problem / use-case

Is your feature request related to a problem? Please describe.

When using Postgres tabular persister it does currently reload all data when single cell updates. Which in our application that have bursts of writes create significant load. It's caused by the fact that that in the data trigger doesn't pass the changes to the listener and it then the autoload decides to trigger full load.

It would be ok in our future scenario when all writes will be managed through TinyBase but during transition we have existing app that is writing to the db and we need the data to be reflected in the store.

Feature Request

Describe the solution you'd like It would be great if only the row that has updated in db was updated in the store, ideally without any extra select.

Alternatives

Describe alternatives you've considered unfortunately we don't see an alternative that would work for us within current TinyBase capabilities. Our main alternative is to completely fork the persister and implement this.

Additional context This is in the same area as my existing PR for whereCondition.

jakubriedl avatar Apr 29 '25 13:04 jakubriedl