pub struct QuerySession<'db, S: Schema> { /* private fields */ }Expand description
One isolated owner-branded query authoring session.
Every binding call allocates a fresh binding identity; bindings are
lightweight Copy values valid only for the session that created them.
Bindings from another session fail before I/O with
cross_session_handle.
Implementations§
Source§impl<'db, S: Schema> QuerySession<'db, S>
impl<'db, S: Schema> QuerySession<'db, S>
Sourcepub fn close(&self)
pub fn close(&self)
Explicitly close this authoring session.
Closing is idempotent. Existing query lineages retain their immutable values but reject later composition and execution before provider I/O.
Sourcepub fn exact<M>(&mut self) -> Result<Binding<S, M, Exact>>where
M: ThingModel<Schema = S> + CompleteModel,
pub fn exact<M>(&mut self) -> Result<Binding<S, M, Exact>>where
M: ThingModel<Schema = S> + CompleteModel,
Allocate a fresh exact-match binding for one concrete complete generated model. Abstract models have no exact binding constructor.
Source§impl<'db, S: Schema> QuerySession<'db, S>
impl<'db, S: Schema> QuerySession<'db, S>
Sourcepub fn reachable<R, FromOwner, FromPlayers, ToOwner, ToPlayers, Source, SourceMode, Target, TargetMode>(
&self,
relation: TypeToken<R>,
role_from: RoleToken<FromOwner, FromPlayers>,
role_to: RoleToken<ToOwner, ToPlayers>,
source: Binding<S, Source, SourceMode>,
target: Binding<S, Target, TargetMode>,
min_depth: u8,
max_depth: u8,
) -> Result<Predicate<S>>where
R: RelationModel<Schema = S> + CompleteModel + RoleTokenCompatible<FromOwner, FromPlayers> + RoleTokenCompatible<ToOwner, ToPlayers>,
FromOwner: RelationModel<Schema = S>,
ToOwner: RelationModel<Schema = S>,
FromPlayers: RolePlayerBinding<Source, SourceMode>,
ToPlayers: RolePlayerBinding<Target, TargetMode>,
Source: ThingModel<Schema = S>,
SourceMode: SelectionMode,
Target: ThingModel<Schema = S>,
TargetMode: SelectionMode,
pub fn reachable<R, FromOwner, FromPlayers, ToOwner, ToPlayers, Source, SourceMode, Target, TargetMode>(
&self,
relation: TypeToken<R>,
role_from: RoleToken<FromOwner, FromPlayers>,
role_to: RoleToken<ToOwner, ToPlayers>,
source: Binding<S, Source, SourceMode>,
target: Binding<S, Target, TargetMode>,
min_depth: u8,
max_depth: u8,
) -> Result<Predicate<S>>where
R: RelationModel<Schema = S> + CompleteModel + RoleTokenCompatible<FromOwner, FromPlayers> + RoleTokenCompatible<ToOwner, ToPlayers>,
FromOwner: RelationModel<Schema = S>,
ToOwner: RelationModel<Schema = S>,
FromPlayers: RolePlayerBinding<Source, SourceMode>,
ToPlayers: RolePlayerBinding<Target, TargetMode>,
Source: ThingModel<Schema = S>,
SourceMode: SelectionMode,
Target: ThingModel<Schema = S>,
TargetMode: SelectionMode,
Require a bounded directed walk between two generated endpoint bindings through one exact generated relation.
Each hop follows role_from -> role_to. Bounds are inclusive and a
zero-hop branch requires identical endpoint concepts. Generated role
compatibility and player-union evidence reject inactive roles and
invalid endpoint models at compile time; bounds, session ownership,
and installed-schema compatibility are validated before provider I/O.
Source§impl<'db, S: Schema> QuerySession<'db, S>
impl<'db, S: Schema> QuerySession<'db, S>
Sourcepub fn query<Shape: SelectedShape<S>>(
&self,
selection: Shape,
) -> Result<Query<'_, 'db, S, Shape>>
pub fn query<Shape: SelectedShape<S>>( &self, selection: Shape, ) -> Result<Query<'_, 'db, S, Shape>>
Begin one persistent query lineage from a singular selected shape.
Trait Implementations§
Auto Trait Implementations§
impl<'db, S> !Freeze for QuerySession<'db, S>
impl<'db, S> !RefUnwindSafe for QuerySession<'db, S>
impl<'db, S> !UnwindSafe for QuerySession<'db, S>
impl<'db, S> Send for QuerySession<'db, S>
impl<'db, S> Sync for QuerySession<'db, S>
impl<'db, S> Unpin for QuerySession<'db, S>
impl<'db, S> UnsafeUnpin for QuerySession<'db, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request