pub struct GraphHostBinding { /* private fields */ }Implementations§
Source§impl GraphHostBinding
impl GraphHostBinding
Sourcepub fn query<T: FromTable>(&self, query: &str) -> Result<T, Box<dyn Error>>
pub fn query<T: FromTable>(&self, query: &str) -> Result<T, Box<dyn Error>>
Executes a query against the host graph. For this provider, we assume the query is a Cypher query
but it could be Gremlin or GraphQL, etc, depending on the capability provider satisfying wascc:graphdb. This
can be used to perform mutations if you also return data from the mutation query
Sourcepub fn query_with_statistics<T: FromTable>(
&self,
query: &str,
) -> Result<(T, Statistics), Box<dyn Error>>
pub fn query_with_statistics<T: FromTable>( &self, query: &str, ) -> Result<(T, Statistics), Box<dyn Error>>
The same as query, but returns statistics from the query like execution time and nodes/relations affected, etc.
Sourcepub fn mutate(&mut self, query: &str) -> Result<(), Box<dyn Error>>
pub fn mutate(&mut self, query: &str) -> Result<(), Box<dyn Error>>
Executes the given query without returning any values
If you want to mutate the graph and retrieve values using one query, use query instead.
Sourcepub fn mutate_with_statistics(
&mut self,
query: &str,
) -> Result<Statistics, Box<dyn Error>>
pub fn mutate_with_statistics( &mut self, query: &str, ) -> Result<Statistics, Box<dyn Error>>
Same as mutate, but returns statistics about the query.
Auto Trait Implementations§
impl Freeze for GraphHostBinding
impl RefUnwindSafe for GraphHostBinding
impl Send for GraphHostBinding
impl Sync for GraphHostBinding
impl Unpin for GraphHostBinding
impl UnwindSafe for GraphHostBinding
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