pub struct SurrealGraphStore {
pub endpoint: String,
pub namespace: String,
pub database: String,
/* private fields */
}Fields§
§endpoint: String§namespace: String§database: StringImplementations§
Trait Implementations§
Source§impl GraphStore for SurrealGraphStore
impl GraphStore for SurrealGraphStore
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
query: GraphQuery,
) -> Pin<Box<dyn Future<Output = Result<JsonValue, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
query: GraphQuery,
) -> Pin<Box<dyn Future<Output = Result<JsonValue, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a query and return JSON results.
Source§fn upsert_node<'life0, 'async_trait>(
&'life0 self,
node: GraphNode,
) -> Pin<Box<dyn Future<Output = Result<(), GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert_node<'life0, 'async_trait>(
&'life0 self,
node: GraphNode,
) -> Pin<Box<dyn Future<Output = Result<(), GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upsert a node into the store.
Source§fn upsert_edge<'life0, 'async_trait>(
&'life0 self,
edge: GraphEdge,
) -> Pin<Box<dyn Future<Output = Result<(), GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert_edge<'life0, 'async_trait>(
&'life0 self,
edge: GraphEdge,
) -> Pin<Box<dyn Future<Output = Result<(), GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upsert an edge into the store.
Source§fn get_node<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GraphNode>, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_node<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<GraphNode>, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a node by id.
Source§fn neighbors<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<GraphNode>, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn neighbors<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<GraphNode>, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return immediate neighbor nodes for
node_id.Source§fn traverse<'life0, 'life1, 'async_trait>(
&'life0 self,
start: &'life1 str,
max_depth: usize,
) -> Pin<Box<dyn Future<Output = Result<GraphSubgraph, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn traverse<'life0, 'life1, 'async_trait>(
&'life0 self,
start: &'life1 str,
max_depth: usize,
) -> Pin<Box<dyn Future<Output = Result<GraphSubgraph, GraphDbError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Traverse from
start and return a GraphSubgraph up to max_depth.Auto Trait Implementations§
impl !Freeze for SurrealGraphStore
impl !RefUnwindSafe for SurrealGraphStore
impl Send for SurrealGraphStore
impl Sync for SurrealGraphStore
impl Unpin for SurrealGraphStore
impl UnsafeUnpin for SurrealGraphStore
impl !UnwindSafe for SurrealGraphStore
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