ground-db
ground-db copied to clipboard
Ground finished uploading/running all methods reactive var?
I built a full data entry app that lets users complete hundreds of forms offline. It uses collection inserts and no other methods.
I need some way of telling the user that all the inserts have been set to the sever, ideally with a red/green indicator. I was hopping Ground.ready()
would do the trick no luck on that end. The reason a red/green state is needed is I would like to tell the user that data (inserts) has been saved and needs to be synced to the server.
To clarify:
- red: offline changes have been made
- green: there are no change (none made or all sent to server)
I really need a Ground.hasQueue()
(or whatever) reactive var that says there are methods to sync to the server. I could get away with a myCollection.hasQueue()
method as all inserts are to one collection.
@Kestanous I'm looking for something similar... curious if/how you resolved it?
@lance-anderson unfortunately the number of records we are making is too many for a phone to keep in active memory and GroundDB was not a viable option for us. Using this project as a base we build our own in-house solution that fixes both that and this issue (Cordova only). This is likely overkill for most users and I don't plan on supporting this publicly, but if you or @raix need ideas here is the code: https://github.com/InformationPatterns/sqlite-collections
Very interesting; thank you for the quick response!