Skip to main content

Module backend

Module backend 

Source
Expand description

Backend-agnostic graph trait and SQLite implementation.

GraphBackend is a sync, object-safe trait covering the primitive node/edge operations every graph backend must support. It deliberately exposes no rusqlite types, so a PostgreSQL or in-memory backend can implement it (see the v0.8.0 roadmap). SqliteGraph is the bundled implementation: it wraps a single mutex-guarded connection and delegates to the existing free-function graph API in crate::graph.

The existing free functions (upsert_node(&conn, …), search_nodes(&conn, …), …) are unchanged — callers that already own a Connection keep using them. SqliteGraph simply packages a connection behind the trait for users who want backend-agnostic graph access.

Structs§

SqliteGraph
SQLite-backed GraphBackend over one mutex-guarded connection.

Traits§

GraphBackend
Sync, object-safe trait for graph backends.