TransactionResult class
Result of a reducer call.
On v2 this is built by the caller-side ReducerResult handler (slice 4).
Failed / InternalError statuses do not reach consumers directly —
ReducerCaller.completeRequest throws SpacetimeDbReducerException in
those cases — so observed statuses here are Committed, Pending, and
Dropped.
Constructors
- TransactionResult({required UpdateStatus status, required DateTime timestamp, String? reducerName, int? reducerId, Uint8List? retValue, bool isPending = false, String? pendingRequestId})
- TransactionResult.dropped({required String reducerName})
-
factory
- TransactionResult.fromReducerResult(ReducerResultMessage message, {required String reducerName, int? reducerId})
-
Build from a v2
ReducerResult. Timestamp is microseconds-since-epoch (canonicalsats/src/timestamp.rs:11-14).OkEmptyand zero-lengthOk.ret_valueboth collapse toretValue: null.factory - TransactionResult.pending({required String reducerName, required String requestId})
-
factory
Properties
- errorMessage → String?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDropped → bool
-
no setter
- isFailed → bool
-
no setter
- isInternalError → bool
-
no setter
- isPending → bool
-
final
- isSuccess → bool
-
no setter
- isSuccessOrPending → bool
-
no setter
- pendingRequestId → String?
-
final
- reducerId → int?
-
final
- reducerName → String?
-
final
- retValue → Uint8List?
-
BSATN-encoded reducer return value.
nullwhen the reducer was unit-return (current Rust macro constraint) or when the wire sentOkEmpty. Populated in slice 4 fromReducerOk.ret_value.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → UpdateStatus
-
final
- timestamp → DateTime
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited