QueryManager class final

lang-core createQueryManager: fetches Query tools, caches by tool + args + state deps, serves defaults until data arrives, and runs Mutations on demand.

Constructors

QueryManager(ToolCaller? _call)

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

activate() → void
Makes a disposed manager fetch again.
dispose() → void
evaluateQueries(List<QueryNode> nodes) → void
Reconciles the active queries with the program's Query statements.
fireMutation(String statementId, Map<String, Object?> args, [List<String>? refreshQueryIds]) → Future<bool>
@Run(mutation): returns whether it succeeded, so a plan can halt. After a success, refreshQueryIds are refetched.
getMutationResult(String statementId) → MutationResult?
The last result of a Mutation, or null when statementId is not one.
getResult(String statementId) → Object?
The data a Query statement shows: its cached result, else the previous key's, else its defaults.
getSnapshot() → QuerySnapshot
The latest snapshot of every statement.
invalidate([List<String> statementIds = const []]) → void
@Run(query): refetch (all queries when statementIds is empty).
isAnyLoading() → bool
Whether any Query is loading.
isLoading(String statementId) → bool
Whether the Query statementId is loading.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerMutations(List<MutationNode> nodes) → void
subscribe(void listener()) → void Function()
Calls listener after every snapshot change; returns a cancel.
toString() → String
A string representation of this object.
inherited

Operators

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