pub struct GraphDB { /* private fields */ }Expand description
Graph database core structure
Implementations§
Source§impl GraphDB
impl GraphDB
Sourcepub async fn set_timestamp(&self, ts: Timestamp)
pub async fn set_timestamp(&self, ts: Timestamp)
Set the current timestamp for operations (for testing/temporal control)
Sourcepub async fn create_node(&self, data: &[u8]) -> Result<Rid, Box<dyn Error>>
pub async fn create_node(&self, data: &[u8]) -> Result<Rid, Box<dyn Error>>
Create a new node with initial data
Sourcepub async fn update_node(
&self,
rid: Rid,
data: &[u8],
) -> Result<(), Box<dyn Error>>
pub async fn update_node( &self, rid: Rid, data: &[u8], ) -> Result<(), Box<dyn Error>>
Update a node’s data
Sourcepub async fn get_node(
&self,
rid: Rid,
) -> Result<Option<Vec<u8>>, Box<dyn Error>>
pub async fn get_node( &self, rid: Rid, ) -> Result<Option<Vec<u8>>, Box<dyn Error>>
Get current data for a node
Sourcepub async fn get_node_at(
&self,
rid: Rid,
as_of: Timestamp,
) -> Result<Option<Vec<u8>>, Box<dyn Error>>
pub async fn get_node_at( &self, rid: Rid, as_of: Timestamp, ) -> Result<Option<Vec<u8>>, Box<dyn Error>>
Get node data at a specific timestamp (temporal query)
Sourcepub async fn create_edge(
&self,
from: Rid,
to: Rid,
label: LabelId,
properties: &[u8],
) -> Result<(), Box<dyn Error>>
pub async fn create_edge( &self, from: Rid, to: Rid, label: LabelId, properties: &[u8], ) -> Result<(), Box<dyn Error>>
Create an edge between nodes
Auto Trait Implementations§
impl Freeze for GraphDB
impl !RefUnwindSafe for GraphDB
impl Send for GraphDB
impl Sync for GraphDB
impl Unpin for GraphDB
impl !UnwindSafe for GraphDB
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