Home > Enterprise >  Which is better, list function or query?
Which is better, list function or query?

Time:04-10

I am designing local database for flutter app. I find Hive and ObjectBox are best fit for my app.

But hive doesn't has builtin query function, you need to use list function like where, find, etc. While ObjectBox can query and return filtered list. So which one is better in term of performance.

CodePudding user response:

ObjectBox is known for its improved performance over Hive, as well as over Firebase, SQFLite and Moor. You will have to get some very large datasets and big queries in your app to easily notice the difference though. If ObjectBox is the easiest to use for you, it's definitely the right one to choose.

Edit:

In light of @SoulCRYSIS'sfurther questioning, converting lists to json in flutter is quite easy:

var json = jsonEncode(myList.map((e) => e.toJson()).toList());
  • Related