DevConnectIsar class
Auto-reporting wrapper for Isar database operations.
Since Isar is not a hard dependency, this uses duck-typing (dynamic).
final isarWrapper = DevConnectIsar.wrap(isar);
// Put — auto-reports
final id = isarWrapper.put('users', () => isar.users.put(user));
// Query — auto-reports
final users = isarWrapper.query('users', () => isar.users.where().findAll());
// Delete — auto-reports
isarWrapper.delete('users', () => isar.users.delete(userId), id: userId);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- inner → dynamic
-
Access the underlying Isar instance for direct operations.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear<
T> (String collection, T block()) → T - Wrap a clear (collection clear) operation.
-
delete<
T> (String collection, T block(), {dynamic id}) → T - Wrap a delete operation.
-
deleteAll<
T> (String collection, T block()) → T - Wrap a deleteAll (bulk delete) operation.
-
deleteAsync<
T> (String collection, Future< T> block(), {dynamic id}) → Future<T> - Wrap an async delete operation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put<
T> (String collection, T block(), {Map< String, dynamic> ? data}) → T - Wrap a query/read operation.
-
putAll<
T> (String collection, T block()) → T - Wrap a putAll (batch insert/update) operation.
-
putAsync<
T> (String collection, Future< T> block(), {Map<String, dynamic> ? data}) → Future<T> - Wrap an async put (insert/update) operation.
-
query<
T> (String collection, T block(), {String? filter}) → T - Wrap a query/read operation.
-
queryAsync<
T> (String collection, Future< T> block(), {String? filter}) → Future<T> - Wrap an async query/read operation.
-
read<
T> (String collection, T block(), {String? filter}) → T - Wrap a read operation. Alias for query.
-
readAsync<
T> (String collection, Future< T> block(), {String? filter}) → Future<T> - Wrap an async read operation. Alias for queryAsync.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
wrap(
dynamic isar) → DevConnectIsar - Wrap an Isar instance for auto-reporting.