Storing and fetching nested Json object in db Flutter
You can check out Hive NoSQL Database with flutter, I really believe it encompasses what you are trying to achieve, here is a link to their official documentation https://pub.dev/packages/hive
Admin
Updated on December 17, 2022Comments
-
Admin over 1 year
I am trying to store and fetch the nested JSON object in db. My json will look like this :
{ "itemID": "12841", "rfidTag": "IRYS009", "itemERPKey": null, "skuNumber": "IRYS009", "designNumber": "FR001", "imageName": "FR001", "itemStatus": "InStock", "semiFinished": [ { "sfID": "775", "sfERPKey": "IRYS009", "sfType": "dia" }, { "sfID": "776", "sfERPKey": "IRYS009", "sfType": "ruby" } ], "miscellaneous": [ { "miscellaneousID": "459", "miscellaneousERPKey": "IRYS009", "miscellaneousType": "dia" }, { "miscellaneousID": "460", "miscellaneousERPKey": "IRYS009", "miscellaneousType": "ruby" } ] }
I first thought of using no SQL solution Sembast but got to know there is a performance issue with large data set. I need to store more than 60000 records. I also thought of using REALM but no stable package of Realm is available for Flutter.
I then used moor but in this too insertion and fetching of such complex objects are not easy.
Please let me know any possible solution available in flutter for storing and fetching complex JSON objects efficiently and also with 60000 records.