pub enum QueryPattern {
Isa {
binding: BindingId,
include_subtypes: bool,
type_id: TypeId,
},
Has {
attribute: BindingId,
attribute_id: AttributeId,
owner: BindingId,
},
Links {
players: Vec<AssertionRolePlayer>,
relation: BindingId,
relation_id: TypeId,
},
Value {
comparator: ValueComparator,
left: QueryOperand,
right: QueryOperand,
},
Or {
branches: Vec<Vec<QueryPattern>>,
},
Not {
patterns: Vec<QueryPattern>,
},
Try {
patterns: Vec<QueryPattern>,
},
Reachable {
min_depth: u8,
max_depth: u8,
relation: TypeId,
role_from: RoleId,
role_to: RoleId,
source: BindingId,
target: BindingId,
},
FunctionCall {
arguments: Vec<QueryOperand>,
assigned: BindingId,
function: FunctionId,
},
}Expand description
The closed typed pattern algebra of the first public vocabulary.
Exactly the V1-parity graph shapes: typed isa with optional subtype
inclusion, effective-ownership has, role-qualified links, typed value
comparison, and negation over a closed conjunction. No variant accepts an
arbitrary TypeQL fragment.
Variants§
Isa
Constrain a binding to one schema type, optionally including subtypes.
Fields
Has
Bind an owned attribute through an effective ownership.
Fields
attribute_id: AttributeIdThe exact attribute type.
Links
Bind a relation and role-qualified players.
Fields
players: Vec<AssertionRolePlayer>Role-qualified player bindings.
Value
Compare two exact typed scalar operands.
Fields
comparator: ValueComparatorThe closed comparator.
left: QueryOperandThe left operand.
right: QueryOperandThe right operand.
Or
Require at least one child pattern.
A binding is positively established after this pattern only when every branch establishes it. Branch-local bindings never leak into the outer row environment.
Fields
branches: Vec<Vec<QueryPattern>>Non-empty alternative conjunctions in source order.
Not
Negate a closed nested conjunction.
Fields
patterns: Vec<QueryPattern>The negated conjunction.
Try
Optionally match a nested conjunction without filtering rows.
Bindings established only inside the body survive as optional: rows
where the body matched carry them, other rows carry an explicit
absence. The first optional vocabulary admits isa, has, links,
and value comparisons in the body, at the root conjunction only.
Fields
patterns: Vec<QueryPattern>The optional conjunction.
Reachable
Existential bounded reachability along one role-directed relation.
Holds when the target is reachable from the source in
min_depth..=max_depth hops, each hop one relation instance from the
role_from player to the role_to player. A zero-hop branch is exact
concept identity. Positive branches are finite directed walks: repeated
vertices or relation instances are admitted, so cycles cannot make
execution unbounded. Proof-path identity is existential and never
enters the selected row. Lowering unrolls every admitted length
provider-side, never by repeated client queries.
Fields
FunctionCall
Assign one scalar schema-function result to a binding.
The first function vocabulary admits scalar, non-optional returns only; tuple and stream returns stay reserved behind later capabilities.
Fields
arguments: Vec<QueryOperand>Ordered call arguments.
function: FunctionIdThe exact schema function identity.
Trait Implementations§
Source§impl Clone for QueryPattern
impl Clone for QueryPattern
Source§fn clone(&self) -> QueryPattern
fn clone(&self) -> QueryPattern
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more