def write

bendvy-ecs-core@0.1.0.4 · ordinary_query_declaration.bend:141

import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as OrdinaryQueryDeclaration
import Base
import bendvy-ecs-core@0.1.0.4/column.bend as Col
import bendvy-ecs-core@0.1.0.4/component.bend as Cmp
import bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend as Identity
import bendvy-ecs-core@0.1.0.4/compose.bend as Q
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap

141# Require this component and grant typed read/write operations to the body.
142# The set operation consumes replacement P and returns the affine owner.
143# Failed sets retain an error in Frame; Compose reports AccessError and rolls back.
144# Rejected replacement payloads are not returned through this grant. Reads expose V.
145# Writes participate in the enclosing system transaction and its rollback;
146# declaring access performs no write. See scheduled-health/registration.bend.
147def write(~S:Data,~P:Type,~Store:Type,~R:Type,~E:Data,~Rest:Type,~V:Data,~Token:Data,~identity:Identity.Declaration<S,P>,~view:P -> P & V,~take:Store -> Rest & Col.Column<S,P>,~put:Rest -> Col.Column<S,P> -> Store) -> Declaration<S,Q.Frame<S,Store,R,E>,Cap.Write<Q.Frame<S,Store,R,E>,P,V>>:
148  Declaration{Q.write_family(~S,~Store,~R,~E,~Rest,~P,~V,~Token,~take,~put,~view,~Cmp.Family{Identity.key(~S,~P,identity)}),Q.family_match(~S,~Store,~R,~E,~Rest,~P,~V,~Token,~take,~put,~view,~Cmp.Family{Identity.key(~S,~P,identity)},~Q.Required{}),[Clause{Identity.key(~S,~P,identity),Write{}}]}

Uses (14)

Used by (3)