pub struct QueryManager<'tx> { /* private fields */ }
Expand description

Provides methods for executing TypeQL queries in the transaction.

Implementations§

source§

impl<'tx> QueryManager<'tx>

source

pub fn define(&self, query: &str) -> impl Promise<'tx, Result>

Performs a TypeQL Define query with default options. See QueryManager::define_with_options

source

pub fn define_with_options( &self, query: &str, options: Options ) -> impl Promise<'tx, Result>

Performs a TypeQL Define query in the transaction.

Arguments
  • query – The TypeQL Define query to be executed
  • options – Specify query options
Examples
transaction.query().define_with_options(query, options).await
source

pub fn undefine(&self, query: &str) -> impl Promise<'tx, Result>

Performs a TypeQL Undefine query with default options See QueryManager::undefine_with_options

source

pub fn undefine_with_options( &self, query: &str, options: Options ) -> impl Promise<'tx, Result>

Performs a TypeQL Undefine query in the transaction.

Arguments
  • query – The TypeQL Undefine query to be executed
  • options – Specify query options
Examples
transaction.query().undefine_with_options(query, options).await
source

pub fn delete(&self, query: &str) -> impl Promise<'tx, Result>

Performs a TypeQL Delete query with default options. See QueryManager::delete_with_options

source

pub fn delete_with_options( &self, query: &str, options: Options ) -> impl Promise<'tx, Result>

Performs a TypeQL Delete query in the transaction.

Arguments
  • query – The TypeQL Delete query to be executed
  • options – Specify query options
Examples
transaction.query().delete_with_options(query, options).await
source

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

source

pub fn get_with_options( &self, query: &str, options: Options ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>

Performs a TypeQL Match (Get) query in the transaction.

Arguments
  • query – The TypeQL Match (Get) query to be executed
  • options – Specify query options
Examples
transaction.query().get_with_options(query, options)
source

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

source

pub fn insert_with_options( &self, query: &str, options: Options ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>

Performs a TypeQL Insert query in the transaction.

Arguments
  • query – The TypeQL Insert query to be executed
  • options – Specify query options
Examples
transaction.query().insert_with_options(query, options)
source

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

source

pub fn update_with_options( &self, query: &str, options: Options ) -> Result<impl Stream<Item = Result<ConceptMap>> + 'tx>

Performs a TypeQL Update query in the transaction.

Arguments
  • query – The TypeQL Update query to be executed
  • options – Specify query options
Examples
transaction.query().update_with_options(query, options)
source

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

source

pub fn get_aggregate_with_options( &self, query: &str, options: Options ) -> impl Promise<'tx, Result<Option<Value>>>

Performs a TypeQL Match Aggregate query in the transaction.

Arguments
  • query – The TypeQL Match Aggregate query to be executed
  • options – Specify query options
Examples
transaction.query().get_aggregate_with_options(query, options).await
source

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

source

pub fn get_group_with_options( &self, query: &str, options: Options ) -> Result<impl Stream<Item = Result<ConceptMapGroup>> + 'tx>

Performs a TypeQL Match Group query in the transaction.

Arguments
  • query – The TypeQL Match Group query to be executed
  • options – Specify query options
Examples
transaction.query().get_group_with_options(query, options)
source

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

source

pub fn get_group_aggregate_with_options( &self, query: &str, options: Options ) -> Result<impl Stream<Item = Result<ValueGroup>> + 'tx>

Performs a TypeQL Match Group Aggregate query in the transaction.

Arguments
  • query – The TypeQL Match Group Aggregate query to be executed
  • options – Specify query options
Examples
transaction.query().get_group_aggregate_with_options(query, options)
source

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

source

pub fn fetch_with_options( &self, query: &str, options: Options ) -> Result<impl Stream<Item = Result<JSON>> + 'tx>

Performs a TypeQL Match Group Aggregate query in the transaction.

Arguments
  • query – The TypeQL Match Group Aggregate query to be executed
  • options – Specify query options
Examples
transaction.query().fetch_with_options(query, options)
source

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

source

pub fn explain_with_options( &self, explainable: &Explainable, options: Options ) -> Result<impl Stream<Item = Result<Explanation>> + 'tx>

Performs a TypeQL Explain query in the transaction.

Arguments
  • explainable – The Explainable to be explained
  • options – Specify query options
Examples
transaction.query().explain_with_options(explainable, options)

Trait Implementations§

source§

impl<'tx> Debug for QueryManager<'tx>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more