def resource_write
import bendvy-ecs-core@0.1.0.4/recognized_query_declaration.bend as RecognizedQueryDeclarationimport Base
import bendvy-ecs-core@0.1.0.4/internal/compact_operational_frame.bend as F
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap
import bendvy-ecs-core@0.1.0.4/ordinary_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/ordinary_owned_event_family_resource.bend as Resource
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
61# Declare read/write access to a schema resource whose owner is paired with Logs.
62# The owner-preserving view returns a Data value; resource selection alone does
63# not exclude an entity row. The supplied identity determines declared access.
64# Writes retain the ordinary resource undo/rollback behavior. Pair this with a
65# component declaration when the body also needs a current entity component.
66def resource_write(~S:Data,~Store:Type,~R:Type,~Logs:Type,~E:Data,~V:Data,~identity:Schema.Resource<S,R>,~view:R -> R & V) -> Declaration<S,Store,Product.Owner<R,Logs>,E,H => Cap.ValueWrite<H,R,V>>:
67 Declaration{_=>Resource.write(~S,~Store,~R,~Logs,~E,~V,~identity,~view),_=>resource_caps(~S,~Store,~R,~Logs,~E,~V,~view),F.all(~S,~Store,~Product.Owner<R,Logs>,~E)}
Uses (8)
Used by (0)
No other definition uses this definition.