Skip to main content

Exec

Struct Exec 

Source
pub struct Exec<'a, 's> {
    pub store: &'a mut DeepStore<'s>,
    pub settings: &'a Settings,
    pub document: &'a Document,
    pub variables: &'a Json,
    pub auth: Auth,
    pub subject: u32,
    pub memo: HashMap<String, Rc<HashSet<String>>>,
}
Expand description

One request’s run over the store.

Fields§

§store: &'a mut DeepStore<'s>§settings: &'a Settings§document: &'a Document§variables: &'a Json§auth: Auth§subject: u32

The subject’s address in the store; 0 is a guest.

§memo: HashMap<String, Rc<HashSet<String>>>

The remote columns of a relation’s filter, kept for one root field.

Implementations§

Source§

impl<'a> Exec<'a, '_>

Source

pub fn flatten( &self, selections: &'a [Selection], typename: &str, ) -> GqlResult<Vec<&'a Field>>

The fields of selections that apply to typename, without fragments.

Source

pub fn contained_in(&mut self, package: &str, name: &str) -> Option<i64>

The link a Contain named name holds from the package named package.

Source

pub fn core_id(&mut self, name: &str) -> Option<i64>

The id of a type of @deep-foundation/core.

Source§

impl<'a> Exec<'a, '_>

Source

pub fn mutation_field(&mut self, field: &'a Field) -> GqlResult<Option<Json>>

The mutation field names, None when it names none.

Source§

impl<'a> Exec<'a, '_>

Source

pub fn select_field(&mut self, field: &'a Field) -> GqlResult<Option<Json>>

The root fields T, T_by_pk and T_aggregate.

Source

pub fn rows(&mut self, table: &str, condition: &Json) -> GqlResult<Vec<Json>>

The rows of table passing condition.

Source

pub fn matches( &mut self, table: &str, row: &Json, condition: &Json, ) -> GqlResult<bool>

Whether a row passes a bool_exp.

Source

pub fn project_all( &mut self, table: &str, rows: &[Json], selections: &'a [Selection], ) -> GqlResult<Json>

Source

pub fn project( &mut self, table: &str, row: &Json, selections: &'a [Selection], ) -> GqlResult<Json>

A row under a selection.

Source§

impl Exec<'_, '_>

Source

pub fn value_json(row: u32, value: &ValueRow) -> Json

Source

pub fn raw_row(&mut self, triplet: u32) -> Option<LinkRow>

The row of a triplet below permissions, for the server’s own lookups.

Source

pub fn table_rows(&mut self, table: &str) -> GqlResult<Vec<Json>>

Every row of a table that is not links, as the subject sees them.

Auto Trait Implementations§

§

impl<'a, 's> !RefUnwindSafe for Exec<'a, 's>

§

impl<'a, 's> !Send for Exec<'a, 's>

§

impl<'a, 's> !Sync for Exec<'a, 's>

§

impl<'a, 's> !UnwindSafe for Exec<'a, 's>

§

impl<'a, 's> Freeze for Exec<'a, 's>

§

impl<'a, 's> Unpin for Exec<'a, 's>

§

impl<'a, 's> UnsafeUnpin for Exec<'a, 's>

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, 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.