Skip to main content

RawGraphStore

Trait RawGraphStore 

Source
pub trait RawGraphStore: Send + Sync {
    // Required methods
    async fn save_graph(
        &self,
        id: &str,
        goal: &str,
        status: &str,
        graph_json: &str,
        created_at: &str,
        finished_at: Option<&str>,
    ) -> Result<(), DbError>;
    async fn load_graph(&self, id: &str) -> Result<Option<String>, DbError>;
    async fn list_graphs(
        &self,
        limit: u32,
    ) -> Result<Vec<GraphSummary>, DbError>;
    async fn delete_graph(&self, id: &str) -> Result<bool, DbError>;
}
Expand description

Raw persistence interface for task graphs.

All graph data is stored as an opaque JSON blob. The orchestration layer in zeph-core / zeph-orchestration is responsible for serializing and deserializing TaskGraph values.

Required Methods§

Source

async fn save_graph( &self, id: &str, goal: &str, status: &str, graph_json: &str, created_at: &str, finished_at: Option<&str>, ) -> Result<(), DbError>

Persist a graph (upsert by id).

§Errors

Returns DbError on database failure.

Source

async fn load_graph(&self, id: &str) -> Result<Option<String>, DbError>

Load a graph by its string UUID.

Returns None if the graph does not exist.

§Errors

Returns DbError on database failure.

Source

async fn list_graphs(&self, limit: u32) -> Result<Vec<GraphSummary>, DbError>

List graphs ordered by created_at descending, limited to limit rows.

§Errors

Returns DbError on database failure.

Source

async fn delete_graph(&self, id: &str) -> Result<bool, DbError>

Delete a graph by its string UUID.

Returns true if a row was deleted.

§Errors

Returns DbError on database failure.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§