Struct typedb_driver::transaction::query::QueryManager
source · 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> !RefUnwindSafe for QueryManager<'tx>
impl<'tx> Send for QueryManager<'tx>
impl<'tx> Sync for QueryManager<'tx>
impl<'tx> Unpin 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§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