Skip to main content

RuntimeEntityPortCtx

Trait RuntimeEntityPortCtx 

Source
pub trait RuntimeEntityPortCtx: RuntimeEntityPort {
    // Provided methods
    fn create_row_ctx(
        &self,
        ctx: &OperationContext,
        input: CreateRowInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn create_node_ctx(
        &self,
        ctx: &OperationContext,
        input: CreateNodeInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn create_edge_ctx(
        &self,
        ctx: &OperationContext,
        input: CreateEdgeInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn create_vector_ctx(
        &self,
        ctx: &OperationContext,
        input: CreateVectorInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn create_document_ctx(
        &self,
        ctx: &OperationContext,
        input: CreateDocumentInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn create_kv_ctx(
        &self,
        ctx: &OperationContext,
        input: CreateKvInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn create_timeseries_point_ctx(
        &self,
        ctx: &OperationContext,
        input: CreateTimeSeriesPointInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn get_kv_ctx(
        &self,
        ctx: &OperationContext,
        collection: &str,
        key: &str,
    ) -> Result<Option<(Value, EntityId)>, RedDBError> { ... }
    fn delete_kv_ctx(
        &self,
        ctx: &OperationContext,
        collection: &str,
        key: &str,
    ) -> Result<bool, RedDBError> { ... }
    fn patch_entity_ctx(
        &self,
        ctx: &OperationContext,
        input: PatchEntityInput,
    ) -> Result<CreateEntityOutput, RedDBError> { ... }
    fn delete_entity_ctx(
        &self,
        ctx: &OperationContext,
        input: DeleteEntityInput,
    ) -> Result<DeleteEntityOutput, RedDBError> { ... }
}
Expand description

Context-aware extension trait that mirrors RuntimeEntityPort with &OperationContext threaded through every method.

This is the migration runway for the OperationContext deepening (PLAN cluster 6). Each default implementation forwards to the existing context-less method, so today the trait is a pure pass-through — but new callers can already adopt the context-passing surface, and a future PR will replace the defaults with real impls that read ctx.xid / ctx.write_consent.

Hidden behind the ctx-ports feature flag during the migration window so the impl bloat doesn’t burden default builds. Once every port is migrated, the flag goes away and these traits become the only surface.

Provided Methods§

Implementors§

Source§

impl<T> RuntimeEntityPortCtx for T

Blanket impl: every concrete RuntimeEntityPort automatically gains the context-aware surface via the default forwards above.