Isar class abstract
An instance of the Isar Database.
Properties
Methods
-
clear(
) → Future< void> - Remove all data in this instance and reset the auto increment values.
-
clearSync(
) → void - Remove all data in this instance and reset the auto increment values.
-
close(
{bool deleteFromDisk = false}) → Future< bool> - Releases an Isar instance.
-
getCollection<
T> () → IsarCollection< T> - Get a collection by its type.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
txn<
T> (Future< T> callback(Isar isar)) → Future<T> - Executes an asynchronous read-only transaction.
-
txnSync<
T> (T callback(Isar isar)) → T - Executes a synchronous read-only transaction.
-
writeTxn<
T> (Future< T> callback(Isar isar), {bool silent = false}) → Future<T> - Executes an asynchronous read-write transaction.
-
writeTxnSync<
T> (T callback(Isar isar), {bool silent = false}) → T - Executes a synchronous read-write transaction.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- autoIncrement → int
-
Placeholder for an auto-increment id.
final
-
instanceNames
→ Set<
String> -
A list of all Isar instances opened in the current isolate.
no setter
- schema → String?
-
Returns the schema of this Instance. You should avoid usint the schema directly.
no setter
Static Methods
-
addCloseListener(
IsarCloseCallback callback) → void - Registers a listener that is called whenever an Isar instance is released.
-
addOpenListener(
IsarOpenCallback callback) → void - Registers a listener that is called whenever an Isar instance is opened.
-
getInstance(
[String name = defaultName]) → Isar? - Returns an Isar instance opened in the current isolate by its name. If no name is provided, the default instane is returned.
-
initializeLibraries(
{Map< IsarAbi, String> libraries = const {}}) → dynamic - Initialize Isar Code. You need to provide binaries for every platform your app will run on.
-
open(
{required List< CollectionSchema> schemas, String? directory, String name = defaultName, bool relaxedDurability = true, bool inspector = false}) → Future<Isar> - Open a new Isar instance.
-
openSync(
{required List< CollectionSchema> schemas, String? directory, String name = defaultName, bool relaxedDurability = true, bool inspector = false}) → Isar - Open a new Isar instance.
-
removeCloseListener(
IsarCloseCallback callback) → void -
Removes a previously registered
IsarOpenCallback
. -
removeOpenListener(
IsarOpenCallback callback) → void -
Removes a previously registered
IsarOpenCallback
. -
splitWords(
String input) → List< String> - Split a String into words according to Unicode Annex #29. Only words containing at least one alphanumeric character will be included.