It would be very helpful and performant in many applications if when a record is changed and saved, the local query.data is updated without the need to do a round trip to the server and reload the query and the table and whatever else depends on the query.
Maybe the bulk update/insert queries are postponed/queued. The user can keep editing/viewing the app data until he hits Save at which point all of the queued queries are run.
I realize that this puts the local version out of sync with the master database, and in some applications this would be a deal killer. But in some it would be just fine and speed things up a lot. It would also be a major piece of the puzzle to allow offline editing.
Hmmm, if you could create a localstore connector then we could query the local store as if it were a database. To roll our own version of offline/queued updates the workflow might go something like this:
- Query database on app load.
- Store query.data into localstore
- Tables and components are loaded with data from localstore queries.
- Saving changes go to the local store using insert/update queries as usual.
- We would need to maintain our own
- When we wanted to we could then run bulkupdate queries with our recordUpdates object.
- In order to account for autoincrement IDs in a multiuser environment, we would also need to keep track of of our own
addRowsobject and if any records in it are updated, we update that instead of
This seems rather straightforward (so I must be missing something!), we just need that localstore connector!