pub struct RuntimeTransaction { /* private fields */ }Expand description
Open TypeDB transaction owned by the shared runtime.
Implementations§
Source§impl RuntimeTransaction
impl RuntimeTransaction
Sourcepub fn supports_given_rows(&self) -> bool
pub fn supports_given_rows(&self) -> bool
Return whether this transaction’s negotiated driver can transport
given input rows.
Sourcepub fn query(&mut self, typeql: &str) -> BoxFuture<'_, Result<QueryResult>>
pub fn query(&mut self, typeql: &str) -> BoxFuture<'_, Result<QueryResult>>
Execute TypeQL within this transaction, materializing for legacy callers.
New match executors use Self::query_bounded directly.
Sourcepub fn query_bounded<'a>(
&'a mut self,
typeql: &'a str,
limits: RuntimeAnswerLimits,
consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send),
) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
pub fn query_bounded<'a>( &'a mut self, typeql: &'a str, limits: RuntimeAnswerLimits, consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send), ) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
Execute TypeQL and enforce bounds while polling the driver stream.
Sourcepub fn query_v2_bounded<'a>(
&'a mut self,
typeql: &'a str,
limits: QueryV2RuntimeAnswerLimits,
consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send),
) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
pub fn query_v2_bounded<'a>( &'a mut self, typeql: &'a str, limits: QueryV2RuntimeAnswerLimits, consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send), ) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
Execute V2 TypeQL with an additive document collection-member limit.
Sourcepub fn query_with_rows(
&mut self,
typeql: &str,
rows: GivenRowsSpec,
) -> BoxFuture<'_, Result<QueryResult>>
pub fn query_with_rows( &mut self, typeql: &str, rows: GivenRowsSpec, ) -> BoxFuture<'_, Result<QueryResult>>
Execute TypeQL with given-stage input rows within this transaction.
Rows travel through the driver API, not the query string, so this path is only available on the band-9 (TypeDB 3.12+) driver. On a band-8 connection this returns an actionable error — callers that can fall back to per-row queries should consult the detected server version before choosing this path.
Sourcepub fn query_with_rows_bounded<'a>(
&'a mut self,
typeql: &'a str,
rows: GivenRowsSpec,
limits: RuntimeAnswerLimits,
consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send),
) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
pub fn query_with_rows_bounded<'a>( &'a mut self, typeql: &'a str, rows: GivenRowsSpec, limits: RuntimeAnswerLimits, consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send), ) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
Execute TypeQL with given rows and enforce bounds while polling the
driver answer stream.
Sourcepub fn query_v2_with_rows_bounded<'a>(
&'a mut self,
typeql: &'a str,
rows: GivenRowsSpec,
limits: QueryV2RuntimeAnswerLimits,
consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send),
) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
pub fn query_v2_with_rows_bounded<'a>( &'a mut self, typeql: &'a str, rows: GivenRowsSpec, limits: QueryV2RuntimeAnswerLimits, consumer: &'a mut (dyn FnMut(RuntimeAnswerItem) -> Result<RuntimeAnswerControl> + Send), ) -> BoxFuture<'a, Result<RuntimeAnswerStats>>
Execute a V2 given query with an additive collection-member limit.
Sourcepub fn commit_classified(
&mut self,
) -> BoxFuture<'_, Result<(), RuntimeCommitError>>
pub fn commit_classified( &mut self, ) -> BoxFuture<'_, Result<(), RuntimeCommitError>>
Commit this transaction while retaining driver durability certainty.
Trait Implementations§
Source§impl Drop for RuntimeTransaction
impl Drop for RuntimeTransaction
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeTransaction
impl !UnwindSafe for RuntimeTransaction
impl Freeze for RuntimeTransaction
impl Send for RuntimeTransaction
impl Sync for RuntimeTransaction
impl Unpin for RuntimeTransaction
impl UnsafeUnpin for RuntimeTransaction
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