DriftLocalStore class

LocalStore implementation backed by a Drift database.

Uses raw SQL to upsert/delete records in any table, so it works with any Drift database without requiring specific DAOs.

Requirement: Tables must have a column named id as the primary key.

Implemented types

Constructors

DriftLocalStore(GeneratedDatabase _db)
Creates a DriftLocalStore backed by the given Drift GeneratedDatabase.
const

Properties

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

Methods

clearAll(List<String> tables) Future<void>
Wipe all data in the specified tables. Used for secure logout (Category 1: Cross-User Isolation).
override
delete(String table, String id) Future<void>
Delete a record from a local table.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upsert(String table, String id, Map<String, dynamic> data) Future<void>
Insert or update a record in a local table.
override

Operators

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