getItemWhere method
Implementation
Future<dynamic> getItemWhere(
bool Function(dynamic) where, {
String? streamId,
}) async {
final data = await get(streamId: streamId);
if (data is Map) {
return data.entries.firstWhere((entry) => where(entry.value));
} else if (data is List) {
return data.firstWhere(where);
} else {
throw StorageDatabaseException(
"This Collection ($collectionId) does not support collections",
);
}
}