pub struct SqliteGraphStore { /* private fields */ }Expand description
SQLite implementation of GraphStore
Integrates with existing openfang-memory schema by adding two tables:
ainl_graph_nodes: stores node payloadsainl_graph_edges: stores graph edges
Implementations§
Source§impl SqliteGraphStore
impl SqliteGraphStore
Sourcepub fn ensure_schema(conn: &Connection) -> Result<(), Error>
pub fn ensure_schema(conn: &Connection) -> Result<(), Error>
Ensure the AINL graph schema exists in the database
Sourcepub fn from_connection(conn: Connection) -> Result<Self, String>
pub fn from_connection(conn: Connection) -> Result<Self, String>
Create from an existing connection (for integration with openfang-memory pool)
Trait Implementations§
Source§impl GraphStore for SqliteGraphStore
impl GraphStore for SqliteGraphStore
Source§fn write_node(&self, node: &AinlMemoryNode) -> Result<(), String>
fn write_node(&self, node: &AinlMemoryNode) -> Result<(), String>
Write a node to storage
Source§fn query_episodes_since(
&self,
since_timestamp: i64,
limit: usize,
) -> Result<Vec<AinlMemoryNode>, String>
fn query_episodes_since( &self, since_timestamp: i64, limit: usize, ) -> Result<Vec<AinlMemoryNode>, String>
Query episodes since a given timestamp
Source§fn find_by_type(&self, type_name: &str) -> Result<Vec<AinlMemoryNode>, String>
fn find_by_type(&self, type_name: &str) -> Result<Vec<AinlMemoryNode>, String>
Find nodes by type
Source§fn walk_edges(
&self,
from_id: Uuid,
label: &str,
) -> Result<Vec<AinlMemoryNode>, String>
fn walk_edges( &self, from_id: Uuid, label: &str, ) -> Result<Vec<AinlMemoryNode>, String>
Walk edges from a node with a given label
Auto Trait Implementations§
impl !Freeze for SqliteGraphStore
impl !RefUnwindSafe for SqliteGraphStore
impl Send for SqliteGraphStore
impl !Sync for SqliteGraphStore
impl Unpin for SqliteGraphStore
impl UnsafeUnpin for SqliteGraphStore
impl !UnwindSafe for SqliteGraphStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more