Skip to main content

QueryManager

Struct 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>

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> 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> 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.

Source§

impl<T> Instrument for T

Source§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

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

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

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>,

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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