create method
Tries to store queries payload in hive box
Implementation
Future<QueryResult> create(Query query, LazyBox<JSON> box) async {
final id = query.payload['id'] as String?;
if (id != null && box.containsKey(id)) {
return QueryResult.failed(
query,
errorMsg: 'Object already exists in hive box',
);
}
return _store(query, box);
}