pub struct CallBuilder<'a, K, S = ClientOneShot> { /* private fields */ }Implementations§
Source§impl<'a, K> CallBuilder<'a, K, ClientOneShot>
impl<'a, K> CallBuilder<'a, K, ClientOneShot>
Sourcepub fn with_implicit_session(self) -> Self
pub fn with_implicit_session(self) -> Self
Execute with an empty session_id (server-side implicit session) instead of
leasing from the driver pool.
Source§impl<'a, K, S> CallBuilder<'a, K, S>
impl<'a, K, S> CallBuilder<'a, K, S>
pub fn param(self, name: impl Into<String>, value: impl Into<Value>) -> Self
pub fn params(self, params: HashMap<String, Value>) -> Self
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Wall-clock limit for the call. Retries transient errors until this deadline when
combined with .idempotent(true). Without .timeout(), retries
continue until a non-retryable error.
For QueryStream the timeout bounds opening the gRPC stream and any retries;
iterating result sets is not bounded by this value.
Inside retry_tx, per-call .timeout() is capped by
the remaining retry_tx deadline.
pub fn idempotent(self, idempotent: bool) -> Self
pub fn collect_stats(self) -> Self
Sourcepub fn with_commit(self, commit: bool) -> Self
pub fn with_commit(self, commit: bool) -> Self
Override auto-commit (commit_tx in Query Service TxControl).
One-shot defaults depend on Self::with_tx_mode: implicit mode relies on the server;
explicit modes default to commit_tx: true. Interactive transactions default to
commit_tx: false unless [Self::with_commit(true)] is set on the last query.
When using [Self::query] with with_commit(true) inside a transaction, you must
fully drain the stream and call QueryStream::close — dropping the stream early
cancels the gRPC call and does not commit.
Sourcepub fn with_tx_mode(self, mode: TxMode) -> Self
pub fn with_tx_mode(self, mode: TxMode) -> Self
Set transaction isolation for this call.
Default on [QueryClient] is TxMode::Implicit (no tx_control; the server
infers isolation from the SQL). Interactive transactions use the mode from
[TransactionOptions] unless overridden here.
TxMode::Implicit inside [Transaction] returns a runtime error — DDL and
other non-transactional statements must run on [QueryClient], not inside a transaction.
Sourcepub fn implicit_tx(self) -> Self
pub fn implicit_tx(self) -> Self
Shorthand for Self::with_tx_mode (ImplicitTx / NoTx).
TxMode::Implicit inside [Transaction] returns a runtime error — DDL and
other non-transactional statements must run on [QueryClient], not inside a transaction.
Source§impl<'a, T, S> CallBuilder<'a, OneRow<T>, S>
impl<'a, T, S> CallBuilder<'a, OneRow<T>, S>
pub fn typed<U: FromYdbRow>(self) -> CallBuilder<'a, OneRow<U>, S>
pub fn optional(self) -> CallBuilder<'a, OptionalRow<T>, S>
Trait Implementations§
Source§impl<'a, S> IntoFuture for CallBuilder<'a, ExecCall, S>
impl<'a, S> IntoFuture for CallBuilder<'a, ExecCall, S>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, ExecCall, S> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, ExecCall, S> as IntoFuture>::Output> + Send + 'a>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Source§impl<'a, T: FromYdbRow + 'a, S> IntoFuture for CallBuilder<'a, OneRow<T>, S>
impl<'a, T: FromYdbRow + 'a, S> IntoFuture for CallBuilder<'a, OneRow<T>, S>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, OneRow<T>, S> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, OneRow<T>, S> as IntoFuture>::Output> + Send + 'a>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Source§impl<'a, T: FromYdbRow + 'a, S> IntoFuture for CallBuilder<'a, OptionalRow<T>, S>
impl<'a, T: FromYdbRow + 'a, S> IntoFuture for CallBuilder<'a, OptionalRow<T>, S>
Source§type Output = Result<Option<T>, YdbError>
type Output = Result<Option<T>, YdbError>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, OptionalRow<T>, S> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, OptionalRow<T>, S> as IntoFuture>::Output> + Send + 'a>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Source§impl<'a, S> IntoFuture for CallBuilder<'a, OneResultSet, S>
impl<'a, S> IntoFuture for CallBuilder<'a, OneResultSet, S>
Source§type Output = Result<ResultSet, YdbError>
type Output = Result<ResultSet, YdbError>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, OneResultSet, S> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, OneResultSet, S> as IntoFuture>::Output> + Send + 'a>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Source§impl<'a, S> IntoFuture for CallBuilder<'a, Streamed, S>
impl<'a, S> IntoFuture for CallBuilder<'a, Streamed, S>
Source§type Output = Result<QueryStream<'a>, YdbError>
type Output = Result<QueryStream<'a>, YdbError>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, Streamed, S> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CallBuilder<'a, Streamed, S> as IntoFuture>::Output> + Send + 'a>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl<'a, K, S = ClientOneShot> !RefUnwindSafe for CallBuilder<'a, K, S>
impl<'a, K, S = ClientOneShot> !UnwindSafe for CallBuilder<'a, K, S>
impl<'a, K, S> Freeze for CallBuilder<'a, K, S>
impl<'a, K, S> Send for CallBuilder<'a, K, S>where
S: Send,
impl<'a, K, S> Sync for CallBuilder<'a, K, S>where
S: Sync,
impl<'a, K, S> Unpin for CallBuilder<'a, K, S>where
S: Unpin,
impl<'a, K, S> UnsafeUnpin for CallBuilder<'a, K, 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
impl<T> ErasedDestructor for Twhere
T: 'static,
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