HarnModelCollection<T extends HarnModel> class abstract


HarnModelCollection(HarnCollection _harnCollection)


collection HarnCollection
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


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<T>
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<T>
findByDate(DateTime date, {bool includeCreatedAt = true, bool includeUpdatedAt = false, DateSearchType searchType = DateSearchType.exact}) List<T>
findById(String id) → T?
findExtremes(String field) Map<String, num>
findOne(bool predicate(T)) → T?
fromMap(Map<String, dynamic> map) → T
fullTextSearch(String query) List<T>
geoSearch(String field, double lat, double lng, double radius) List<T>
groupBy(String fieldName) Map<String, List<T>>
index(String fieldName) Future<void>
insert(T dataModel) Future<void>
insertMany(List<T> 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.
orderBy(String field, {bool descending = false}) List<T>
orderByDate({String field = 'createdAt', bool descending = false}) List<T>
randomDocument(Map<String, dynamic> query) → T?
remove(String id) Future<void>
subscribe(HarnObserverCollection observer) → void
sumField(String field) num
toString() String
A string representation of this object.
unsubscribe(HarnObserverCollection observer) → void
update(String id, T updates) Future<void>
updateMany(Map<String, dynamic> query, T updates) Future<void>
where(bool predicate(T)) List<T>
whereBetween(String field, dynamic start, dynamic end) List<T>


operator ==(Object other) bool
The equality operator.