pub struct SqliteStoreRef<'a> { /* private fields */ }Expand description
Borrowed view of the backing SQLite store (see crate::AinlRuntime::sqlite_store).
Methods from Deref<Target = SqliteGraphStore>§
pub fn query<'a>(&'a self, agent_id: &str) -> GraphQuery<'a>
Sourcepub fn insert_graph_edge(
&self,
from_id: Uuid,
to_id: Uuid,
label: &str,
) -> Result<(), String>
pub fn insert_graph_edge( &self, from_id: Uuid, to_id: Uuid, label: &str, ) -> Result<(), String>
Insert a directed edge between two node IDs (separate from per-node edge payloads).
Sourcepub fn insert_graph_edge_checked(
&self,
from_id: Uuid,
to_id: Uuid,
label: &str,
) -> Result<(), String>
pub fn insert_graph_edge_checked( &self, from_id: Uuid, to_id: Uuid, label: &str, ) -> Result<(), String>
Like Self::insert_graph_edge, but verifies both endpoints exist first (clear errors for strict runtime wiring).
Sourcepub fn insert_graph_edge_with_meta(
&self,
from_id: Uuid,
to_id: Uuid,
label: &str,
weight: f32,
metadata: Option<&Value>,
) -> Result<(), String>
pub fn insert_graph_edge_with_meta( &self, from_id: Uuid, to_id: Uuid, label: &str, weight: f32, metadata: Option<&Value>, ) -> Result<(), String>
Same as Self::insert_graph_edge, with optional edge weight and JSON metadata.
Sourcepub fn query_nodes_by_type_since(
&self,
node_type: &str,
since_timestamp: i64,
limit: usize,
) -> Result<Vec<AinlMemoryNode>, String>
pub fn query_nodes_by_type_since( &self, node_type: &str, since_timestamp: i64, limit: usize, ) -> Result<Vec<AinlMemoryNode>, String>
Nodes of a given node_type with timestamp >= since_timestamp, most recent first.
Sourcepub fn read_runtime_state(
&self,
agent_id: &str,
) -> Result<Option<RuntimeStateNode>, String>
pub fn read_runtime_state( &self, agent_id: &str, ) -> Result<Option<RuntimeStateNode>, String>
Read the most recent persisted RuntimeStateNode for agent_id, if any.
Rows are stored with node_type = 'runtime_state' and JSON $.node_type.runtime_state.agent_id matching the agent.
Sourcepub fn write_runtime_state(
&self,
state: &RuntimeStateNode,
) -> Result<(), String>
pub fn write_runtime_state( &self, state: &RuntimeStateNode, ) -> Result<(), String>
Upsert one RuntimeStateNode row per agent (stable id via Uuid::new_v5).
Sourcepub fn validate_graph(
&self,
agent_id: &str,
) -> Result<GraphValidationReport, String>
pub fn validate_graph( &self, agent_id: &str, ) -> Result<GraphValidationReport, String>
Validate structural integrity for one agent’s induced subgraph.
Sourcepub fn agent_subgraph_edges(
&self,
agent_id: &str,
) -> Result<Vec<SnapshotEdge>, String>
pub fn agent_subgraph_edges( &self, agent_id: &str, ) -> Result<Vec<SnapshotEdge>, String>
Directed edges where both endpoints are nodes owned by agent_id (aligned with Self::export_graph edge set).
Sourcepub fn export_graph(&self, agent_id: &str) -> Result<AgentGraphSnapshot, String>
pub fn export_graph(&self, agent_id: &str) -> Result<AgentGraphSnapshot, String>
Export all nodes and interconnecting edges for agent_id.