KalamSyncStore class final
Single-writer access to Kalam's private persistence tables.
Constructors
- KalamSyncStore(GeneratedDatabase database, {KalamClock? clock})
Properties
- database → GeneratedDatabase
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyAndCheckpoint(
{required String accountKey, required String subscriptionId, required VersionId seq, required FutureOr< Object?> apply()}) → Future<bool> -
Runs
applyand advances its checkpoint in one SQLite transaction. -
claimNextAction(
DateTime now, {String? accountKey, Set< String> blockedOrderingKeys = const {}}) → Future<KalamActionRecord?> - Returns and marks the oldest eligible action as running.
-
completeAction(
String id, DateTime now) → Future< void> -
completeStep(
String actionId, String name, String resultJson) → Future< void> -
deleteCachedRow(
{required String accountKey, required String tableId, required String rowKey}) → Future< void> -
deleteCachedRows(
{required String accountKey, required String tableId}) → Future< void> -
deleteCheckpoint(
{required String accountKey, required String subscriptionId}) → Future< void> -
enqueue(
KalamActionDraft draft, {KalamOptimisticRow? optimisticRow, Future< void> applyOptimistic()?}) → Future<KalamActionRecord> -
failAction(
String id, String error, DateTime now) → Future< void> -
failStep(
String actionId, String name, String error) → Future< void> -
markRowSynced(
{required String accountKey, required String tableId, required String rowKey, required VersionId seq}) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readAction(
String id) → Future< KalamActionRecord?> -
readCheckpoint(
{required String accountKey, required String subscriptionId}) → Future< KalamCheckpoint?> -
readCompletedStep(
String actionId, String name) → Future< String?> -
recoverRunningActions(
DateTime now, {String? accountKey}) → Future< int> - Makes interrupted work eligible after a process/runtime restart.
-
removeRowState(
{required String accountKey, required String tableId, required String rowKey}) → Future< void> -
resetProjection(
{required String accountKey, required Iterable< String> subscriptionIds, Iterable<String> actionKeys = const []}) → Future<void> - Drops checkpoints and the named action keys for one account. Other action keys stay queued.
-
scheduleRetry(
String id, String error, DateTime retryAt) → Future< void> -
seedCheckpointIfAbsent(
{required String accountKey, required String subscriptionId, required VersionId seq}) → Future< bool> -
Writes
seqonly when this subscription has no checkpoint yet. -
toString(
) → String -
A string representation of this object.
inherited
-
upsertCachedRow(
{required String accountKey, required String tableId, required String rowKey, required String valuesJson}) → Future< void> -
watchActions(
String accountKey) → Stream< List< KalamActionRecord> > -
watchCachedRows(
{required String accountKey, required String tableId}) → Stream< List< KalamCachedRow> > -
watchRowOverlays(
{required String accountKey, required String tableId}) → Stream< List< KalamRowOverlay> >
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited