HarnCollection class
Methods
-
aggregate(List<dynamic Function(List<Map<String, dynamic>>)> stages)
→ Future
-
-
aggregateCount(String fieldName)
→ Map<dynamic, int>
-
-
averageField(String field)
→ num
-
-
calculate(String field, num value, {String operator = '+'})
→ List<Map<String, dynamic>>
-
-
count({Map<String, dynamic>? query})
→ int
-
-
countWhere(bool predicate(dynamic))
→ int
-
-
deleteAll()
→ Future<void>
-
-
deleteMany(Map<String, dynamic> query)
→ Future<void>
-
-
distinct(String fieldName)
→ List
-
-
find(Map<String, dynamic> query)
→ List<Map<String, dynamic>>
-
-
findByDate(DateTime date, {bool includeCreatedAt = true, bool includeUpdatedAt = false, DateSearchType searchType = DateSearchType.exact})
→ List<Map<String, dynamic>>
-
-
findById(String id)
→ Map<String, dynamic>?
-
-
findExtremes(String field)
→ Map<String, num>
-
-
findOne(bool predicate(dynamic))
→ Map<String, dynamic>?
-
-
fullTextSearch(String query)
→ List<Map<String, dynamic>>
-
-
geoSearch(String field, double lat, double lng, double radius)
→ List<Map<String, dynamic>>
-
-
groupBy(String fieldName)
→ Map<dynamic, List<Map<String, dynamic>>>
-
-
index(String fieldName)
→ void
-
-
insert(Map<String, dynamic> document)
→ Future<void>
-
-
insertMany(List<Map<String, dynamic>> documents)
→ Future<void>
-
-
join(HarnCollection collectionB, String joinField, {List<String> propertiesA = const [], List<String> propertiesB = const []})
→ List<Map<String, dynamic>>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(String field, {bool descending = false})
→ List<Map<String, dynamic>>
-
-
orderByDate({String field = 'createdAt', bool descending = false})
→ List<Map<String, dynamic>>
-
-
randomDocument(Map<String, dynamic> query)
→ Map<String, dynamic>?
-
-
remove(String id)
→ Future<void>
-
-
subscribe(HarnObserverCollection observer)
→ void
-
-
sumField(String field)
→ num
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
unsubscribe(HarnObserverCollection observer)
→ void
-
-
update(String id, Map<String, dynamic> updates)
→ Future<void>
-
-
updateMany(Map<String, dynamic> query, Map<String, dynamic> updates)
→ Future<void>
-
-
where(bool predicate(dynamic))
→ List<Map<String, dynamic>>
-
-
whereBetween(String field, dynamic start, dynamic end)
→ List<Map<String, dynamic>>
-