def resource_caps

bendvy-ecs-core@0.1.0.4 · recognized_query_declaration.bend:56

import bendvy-ecs-core@0.1.0.4/recognized_query_declaration.bend as RecognizedQueryDeclaration
import 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_owned_event_family_resource.bend as Resource
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product

56# Internal capability assembly for resource_write. Keeps the resource and Logs
57# owners together and uses the ordinary resource transaction bridge; this is not
58# a direct application resource handle or permission to bypass rollback.
59def resource_caps(~S:Data,~Store:Type,~R:Type,~Logs:Type,~E:Data,~V:Data,~view:R -> R & V) -> Cap.ValueWrite<F.Frame<S,Store,Product.Owner<R,Logs>,E>,R,V>:
60  Cap.ValueWrite{F.bridge_get(~S,~Store,~Product.Owner<R,Logs>,~E,~V,~Resource.read(~S,~Store,~R,~Logs,~E,~V,~view)),F.bridge_set(~S,~Store,~Product.Owner<R,Logs>,~E,~R,~Resource.set(~S,~Store,~R,~Logs,~E))}

Uses (8)

Used by (1)