Struct mz_adapter::client::ConnClient
source · pub struct ConnClient { /* private fields */ }
Expand description
A coordinator client that is bound to a connection.
The ConnClient
automatically allocates an ID for the connection when
it is created, and frees that ID for potential reuse when it is dropped.
See also Client
.
Implementations§
source§impl ConnClient
impl ConnClient
sourcepub fn new_session(&self, user: User) -> Session
pub fn new_session(&self, user: User) -> Session
Creates a new session associated with this connection for the given user.
It is the caller’s responsibility to have authenticated the user.
sourcepub fn conn_id(&self) -> &ConnectionId
pub fn conn_id(&self) -> &ConnectionId
Returns the ID of the connection associated with this client.
sourcepub async fn startup(
self,
session: Session
) -> Result<(SessionClient, StartupResponse), AdapterError>
pub async fn startup( self, session: Session ) -> Result<(SessionClient, StartupResponse), AdapterError>
Upgrades this connection client to a session client.
A session is a connection that has successfully negotiated parameters, like the user. Most coordinator operations are available only after upgrading a connection to a session.
Returns a new client that is bound to the session and a response containing various details about the startup.
sourcepub fn cancel_request(&mut self, conn_id: ConnectionIdType, secret_key: u32)
pub fn cancel_request(&mut self, conn_id: ConnectionIdType, secret_key: u32)
Cancels the query currently running on another connection.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConnClient
impl Send for ConnClient
impl Sync for ConnClient
impl Unpin for ConnClient
impl !UnwindSafe for ConnClient
Blanket Implementations§
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.