SentryIsar class

A sentry wrapper around the Isar Database

Annotations
  • @experimental

Constructors

SentryIsar(Isar _isar, Hub _hub)
ctor of SentryIsar

Properties

directory String?
The directory containing the database file or null on the web.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isOpen bool
Is the instance open?
no setteroverride
name String
Name of the instance.
no setteroverride
path String?
The full path of the database file is directory/name.isar and the lock file directory/name.isar.lock.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

attachCollections(Map<Type, IsarCollection> collections) → void
@nodoc
clear() Future<void>
Remove all data in this instance and reset the auto increment values.
override
clearSync() → void
Remove all data in this instance and reset the auto increment values.
override
close({bool deleteFromDisk = false}) Future<bool>
Releases an Isar instance.
override
collection<T>() → IsarCollection<T>
Get a collection by its type.
override
copyToFile(String targetPath) Future<void>
Copy a compacted version of the database to the specified file.
override
getCollectionByNameInternal(String name) → IsarCollection?
@nodoc
getSize({bool includeIndexes = false, bool includeLinks = false}) Future<int>
Returns the size of all the collections in bytes. Not supported on web.
override
getSizeSync({bool includeIndexes = false, bool includeLinks = false}) int
Returns the size of all collections in bytes. Not supported on web.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requireOpen() → void
@nodoc
toString() String
A string representation of this object.
inherited
txn<T>(Future<T> callback()) Future<T>
Executes an asynchronous read-only transaction.
override
txnSync<T>(T callback()) → T
Executes a synchronous read-only transaction.
override
verify() Future<void>
Verifies the integrity of the database file.
override
writeTxn<T>(Future<T> callback(), {bool silent = false}) Future<T>
Executes an asynchronous read-write transaction.
override
writeTxnSync<T>(T callback(), {bool silent = false}) → T
Executes a synchronous read-write transaction.
override

Operators

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

Static Methods

open(List<CollectionSchema> schemas, {required String directory, String name = Isar.defaultName, int maxSizeMiB = Isar.defaultMaxSizeMiB, bool relaxedDurability = true, CompactCondition? compactOnLaunch, bool inspector = true, Hub? hub}) Future<Isar>
Open a new Isar instance, wrapped by SentryIsar
override
openSync(List<CollectionSchema> schemas, {required String directory, String name = Isar.defaultName, int maxSizeMiB = Isar.defaultMaxSizeMiB, bool relaxedDurability = true, CompactCondition? compactOnLaunch, bool inspector = true, Hub? hub}) → Isar
Open a new Isar instance, wrapped by SentryIsar
override