Skip to main content

QueryPatternV2

Enum QueryPatternV2 

Source
pub enum QueryPatternV2 {
    FieldValue {
        field: QueryFieldV2,
        comparator: QueryComparatorV2,
        value: CompatibilityValueV2,
    },
    FieldComparison {
        left: QueryFieldV2,
        comparator: QueryComparatorV2,
        right: QueryFieldV2,
    },
    FieldPresence {
        field: QueryFieldV2,
        present: bool,
    },
    BindingIid {
        binding: BindingId,
        iid: String,
    },
    RoleEdge {
        include_relation_subtypes: bool,
        player: BindingId,
        relation: BindingId,
        relation_type: TypeId,
        role: RoleId,
    },
    Reachable {
        min_depth: u8,
        max_depth: u8,
        relation: TypeId,
        role_from: RoleId,
        role_to: RoleId,
        source: BindingId,
        target: BindingId,
    },
    And {
        patterns: Vec<QueryPatternV2>,
    },
    Or {
        patterns: Vec<QueryPatternV2>,
    },
    Not {
        pattern: Box<QueryPatternV2>,
    },
}
Expand description

The closed boolean compatibility algebra used by the production adapter.

Variants§

§

FieldValue

Compare one bound field with one exact scalar literal.

Fields

§field: QueryFieldV2

Descriptor-qualified field.

§comparator: QueryComparatorV2

Closed comparison operator.

§value: CompatibilityValueV2

Canonical or released-only typed literal.

§

FieldComparison

Compare two descriptor-qualified bound fields.

Fields

§left: QueryFieldV2

Left field.

§comparator: QueryComparatorV2

Closed non-string comparison operator.

§right: QueryFieldV2

Right field.

§

FieldPresence

Require one descriptor-qualified field to be present or absent.

Fields

§field: QueryFieldV2

Descriptor-qualified field.

§present: bool

true requires at least one value; false requires none.

§

BindingIid

Match one thing binding by its canonical provider IID.

Fields

§binding: BindingId

Thing binding.

§iid: String

Canonical TypeDB thing IID.

§

RoleEdge

Require one descriptor-qualified role edge.

Fields

§include_relation_subtypes: bool

Whether relation subtypes remain admitted while matching the edge.

§player: BindingId

Player binding.

§relation: BindingId

Relation binding.

§relation_type: TypeId

Declared relation type.

§role: RoleId

Descriptor-qualified role.

§

Reachable

Require one finite directed walk.

Fields

§min_depth: u8

Inclusive minimum hop count.

§max_depth: u8

Inclusive maximum hop count.

§relation: TypeId

Exact relation type used for every hop.

§role_from: RoleId

Source role.

§role_to: RoleId

Target role.

§source: BindingId

Source binding.

§target: BindingId

Target binding.

§

And

Require every child in source order.

Fields

§patterns: Vec<QueryPatternV2>

Non-empty children.

§

Or

Require at least one branch in source order.

Fields

§patterns: Vec<QueryPatternV2>

Non-empty branches.

§

Not

Negate one closed child.

Fields

§pattern: Box<QueryPatternV2>

Negated child.

Trait Implementations§

Source§

impl Clone for QueryPatternV2

Source§

fn clone(&self) -> QueryPatternV2

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QueryPatternV2

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for QueryPatternV2

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for QueryPatternV2

Source§

impl PartialEq for QueryPatternV2

Source§

fn eq(&self, other: &QueryPatternV2) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for QueryPatternV2

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for QueryPatternV2

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.