pub trait GraphQuery {
type Error: From<GraphQueryError> + Error;
// Required method
fn query<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<GraphQueryOutput, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn execute<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn show_hosts<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Host>, Self::Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
fn show_spaces<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Space>, Self::Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
}
Required Associated Types§
type Error: From<GraphQueryError> + Error
Required Methods§
sourcefn query<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<GraphQueryOutput, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<GraphQueryOutput, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute stmt and return the query output.
§Notice
For operation that doesn’t return result, like CREATE TAG
, USE space
etc.
it’s recommended to use execute(stmt)
.
Provided Methods§
sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute stmt and doesn’t return the execution output.