pub struct QueryManager<'tx> { /* private fields */ }Expand description
Provides methods for executing TypeQL queries in the transaction.
Implementations§
Source§impl<'tx> QueryManager<'tx>
impl<'tx> QueryManager<'tx>
Sourcepub fn define(&self, query: &str) -> impl Promise<'tx, Result>
pub fn define(&self, query: &str) -> impl Promise<'tx, Result>
Performs a TypeQL Define query with default options.
See QueryManager::define_with_options
Sourcepub fn define_with_options(
&self,
query: &str,
options: Options,
) -> impl Promise<'tx, Result>
pub fn define_with_options( &self, query: &str, options: Options, ) -> impl Promise<'tx, Result>
Sourcepub fn undefine(&self, query: &str) -> impl Promise<'tx, Result>
pub fn undefine(&self, query: &str) -> impl Promise<'tx, Result>
Performs a TypeQL Undefine query with default options
See QueryManager::undefine_with_options
Sourcepub fn undefine_with_options(
&self,
query: &str,
options: Options,
) -> impl Promise<'tx, Result>
pub fn undefine_with_options( &self, query: &str, options: Options, ) -> impl Promise<'tx, Result>
Sourcepub fn delete(&self, query: &str) -> impl Promise<'tx, Result>
pub fn delete(&self, query: &str) -> impl Promise<'tx, Result>
Performs a TypeQL Delete query with default options.
See QueryManager::delete_with_options
Sourcepub fn delete_with_options(
&self,
query: &str,
options: Options,
) -> impl Promise<'tx, Result>
pub fn delete_with_options( &self, query: &str, options: Options, ) -> impl Promise<'tx, Result>
Sourcepub fn get(
&self,
query: &str,
) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
pub fn get( &self, query: &str, ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
Performs a TypeQL Match (Get) query with default options.
See QueryManager::get_with_options
Sourcepub fn get_with_options(
&self,
query: &str,
options: Options,
) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
pub fn get_with_options( &self, query: &str, options: Options, ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
Sourcepub fn insert(
&self,
query: &str,
) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
pub fn insert( &self, query: &str, ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
Performs a TypeQL Insert query with default options.
See QueryManager::insert_with_options
Sourcepub fn insert_with_options(
&self,
query: &str,
options: Options,
) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
pub fn insert_with_options( &self, query: &str, options: Options, ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
Sourcepub fn update(
&self,
query: &str,
) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
pub fn update( &self, query: &str, ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
Performs a TypeQL Update query with default options.
See QueryManager::update_with_options
Sourcepub fn update_with_options(
&self,
query: &str,
options: Options,
) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
pub fn update_with_options( &self, query: &str, options: Options, ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>
Sourcepub fn get_aggregate(
&self,
query: &str,
) -> impl Promise<'tx, Result<Option<Value>>>
pub fn get_aggregate( &self, query: &str, ) -> impl Promise<'tx, Result<Option<Value>>>
Performs a TypeQL Match Aggregate query with default options.
See QueryManager::get_aggregate
Sourcepub fn get_aggregate_with_options(
&self,
query: &str,
options: Options,
) -> impl Promise<'tx, Result<Option<Value>>>
pub fn get_aggregate_with_options( &self, query: &str, options: Options, ) -> impl Promise<'tx, Result<Option<Value>>>
Sourcepub fn get_group(
&self,
query: &str,
) -> Result<impl Stream<Item = Result<ConceptMapGroup>> + 'tx>
pub fn get_group( &self, query: &str, ) -> Result<impl Stream<Item = Result<ConceptMapGroup>> + 'tx>
Performs a TypeQL Match Group query with default options.
See QueryManager::get_group
Sourcepub fn get_group_with_options(
&self,
query: &str,
options: Options,
) -> Result<impl Stream<Item = Result<ConceptMapGroup>> + 'tx>
pub fn get_group_with_options( &self, query: &str, options: Options, ) -> Result<impl Stream<Item = Result<ConceptMapGroup>> + 'tx>
Sourcepub fn get_group_aggregate(
&self,
query: &str,
) -> Result<impl Stream<Item = Result<ValueGroup>> + 'tx>
pub fn get_group_aggregate( &self, query: &str, ) -> Result<impl Stream<Item = Result<ValueGroup>> + 'tx>
Performs a TypeQL Match Group Aggregate query with default options.
See QueryManager::get_group_aggregate_with_options
Sourcepub fn get_group_aggregate_with_options(
&self,
query: &str,
options: Options,
) -> Result<impl Stream<Item = Result<ValueGroup>> + 'tx>
pub fn get_group_aggregate_with_options( &self, query: &str, options: Options, ) -> Result<impl Stream<Item = Result<ValueGroup>> + 'tx>
Sourcepub fn fetch(
&self,
query: &str,
) -> Result<impl Stream<Item = Result<JSON>> + 'tx>
pub fn fetch( &self, query: &str, ) -> Result<impl Stream<Item = Result<JSON>> + 'tx>
Performs a TypeQL Fetch query with default options.
See QueryManager::fetch_with_options
Sourcepub fn fetch_with_options(
&self,
query: &str,
options: Options,
) -> Result<impl Stream<Item = Result<JSON>> + 'tx>
pub fn fetch_with_options( &self, query: &str, options: Options, ) -> Result<impl Stream<Item = Result<JSON>> + 'tx>
Sourcepub fn explain(
&self,
explainable: &Explainable,
) -> Result<impl Stream<Item = Result<Explanation>> + 'tx>
pub fn explain( &self, explainable: &Explainable, ) -> Result<impl Stream<Item = Result<Explanation>> + 'tx>
Performs a TypeQL Explain query in the transaction. See ``QueryManager::explain_with_options
Sourcepub fn explain_with_options(
&self,
explainable: &Explainable,
options: Options,
) -> Result<impl Stream<Item = Result<Explanation>> + 'tx>
pub fn explain_with_options( &self, explainable: &Explainable, options: Options, ) -> Result<impl Stream<Item = Result<Explanation>> + 'tx>
Trait Implementations§
Auto Trait Implementations§
impl<'tx> Freeze for QueryManager<'tx>
impl<'tx> RefUnwindSafe for QueryManager<'tx>
impl<'tx> Send for QueryManager<'tx>
impl<'tx> Sync for QueryManager<'tx>
impl<'tx> Unpin for QueryManager<'tx>
impl<'tx> UnsafeUnpin for QueryManager<'tx>
impl<'tx> UnwindSafe for QueryManager<'tx>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request