SentryIsarCollection<OBJ> class

Sentry wrapper around IsarCollection

Annotations
  • @experimental

Constructors

SentryIsarCollection(IsarCollection<OBJ> _isarCollection, Hub _hub, String _dbName)
ctor of SentryIsarCollection

Properties

hashCode int
The hash code for this object.
no setterinherited
isar → Isar
The corresponding Isar instance.
no setteroverride
name String
The name of the collection.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema → CollectionSchema<OBJ>
Get the schema of the collection.
no setteroverride

Methods

buildQuery<R>({List<WhereClause> whereClauses = const [], bool whereDistinct = false, Sort whereSort = Sort.asc, FilterOperation? filter, List<SortProperty> sortBy = const [], List<DistinctProperty> distinctBy = const [], int? offset, int? limit, String? property}) → Query<R>
Build a query dynamically for example to build a custom query language.
override
clear() Future<void>
Remove all data in this collection and reset the auto increment value.
override
clearSync() → void
Remove all data in this collection and reset the auto increment value.
override
count() Future<int>
Returns the total number of objects in this collection.
override
countSync() int
Returns the total number of objects in this collection.
override
delete(Id id) Future<bool>
Delete a single object by its id.
override
deleteAll(List<Id> ids) Future<int>
Delete a list of objects by their ids.
override
deleteAllByIndex(String indexName, List<IndexKey> keys) Future<int>
Delete a list of objects by the unique index indexName and keys.
override
deleteAllByIndexSync(String indexName, List<IndexKey> keys) int
Delete a list of objects by the unique index indexName and keys.
override
deleteAllSync(List<Id> ids) int
Delete a list of objects by their ids.
override
deleteByIndex(String indexName, IndexKey key) Future<bool>
Delete a single object by the unique index indexName and key.
override
deleteByIndexSync(String indexName, IndexKey key) bool
Delete a single object by the unique index indexName and key.
override
deleteSync(Id id) bool
Delete a single object by its id.
override
filter() → QueryBuilder<OBJ, OBJ, QFilterCondition>
Start building a query using the QueryBuilder.
override
get(Id id) Future<OBJ?>
Get a single object by its id or null if the object does not exist.
override
getAll(List<Id> ids) Future<List<OBJ?>>
Get a list of objects by their ids or null if an object does not exist.
override
getAllByIndex(String indexName, List<IndexKey> keys) Future<List<OBJ?>>
Get a list of objects by the unique index indexName and keys.
override
getAllByIndexSync(String indexName, List<IndexKey> keys) List<OBJ?>
Get a list of objects by the unique index indexName and keys.
override
getAllSync(List<Id> ids) List<OBJ?>
Get a list of objects by their ids or null if an object does not exist.
override
getByIndex(String indexName, IndexKey key) Future<OBJ?>
Get a single object by the unique index indexName and key.
override
getByIndexSync(String indexName, IndexKey key) → OBJ?
Get a single object by the unique index indexName and key.
override
getSize({bool includeIndexes = false, bool includeLinks = false}) Future<int>
Returns the size of the collection in bytes. Not supported on web.
override
getSizeSync({bool includeIndexes = false, bool includeLinks = false}) int
Returns the size of the collection in bytes. Not supported on web.
override
getSync(Id id) → OBJ?
Get a single object by its id or null if the object does not exist.
override
importJson(List<Map<String, dynamic>> json) Future<void>
Import a list of json objects.
override
importJsonRaw(Uint8List jsonBytes) Future<void>
Import a list of json objects encoded as a byte array.
override
importJsonRawSync(Uint8List jsonBytes) → void
Import a list of json objects encoded as a byte array.
override
importJsonSync(List<Map<String, dynamic>> json) → void
Import a list of json objects.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(OBJ object) Future<Id>
Insert or update an object. Returns the id of the new or updated object.
override
putAll(List<OBJ> objects) Future<List<Id>>
Insert or update a list of objects. Returns the list of ids of the new or updated objects.
override
putAllByIndex(String indexName, List<OBJ> objects) Future<List<Id>>
Insert or update a list of objects by the unique index indexName. Returns the list of ids of the new or updated objects.
override
putAllByIndexSync(String indexName, List<OBJ> objects, {bool saveLinks = true}) List<Id>
Insert or update a list of objects by the unique index indexName. Returns the list of ids of the new or updated objects.
override
putAllSync(List<OBJ> objects, {bool saveLinks = true}) List<Id>
Insert or update a list of objects. Returns the list of ids of the new or updated objects.
override
putByIndex(String indexName, OBJ object) Future<Id>
Insert or update the object by the unique index indexName. Returns the id of the new or updated object.
override
putByIndexSync(String indexName, OBJ object, {bool saveLinks = true}) → Id
Insert or update the object by the unique index indexName. Returns the id of the new or updated object.
override
putSync(OBJ object, {bool saveLinks = true}) → Id
Insert or update an object. Returns the id of the new or updated object.
override
toString() String
A string representation of this object.
inherited
verify(List<OBJ> objects) Future<void>
Verifies the integrity of the collection and its indexes.
override
Verifies the integrity of a link.
override
watchLazy({bool fireImmediately = false}) Stream<void>
Watch the collection for changes.
override
watchObject(Id id, {bool fireImmediately = false}) Stream<OBJ?>
Watch the object with id for changes. If a change occurs, the new object will be returned in the stream.
override
watchObjectLazy(Id id, {bool fireImmediately = false}) Stream<void>
Watch the object with id for changes.
override
where({bool distinct = false, Sort sort = Sort.asc}) → QueryBuilder<OBJ, OBJ, QWhere>
Start building a query using the QueryBuilder.
override

Operators

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