pub enum MssqlProxyKind {
Direct,
Multiplexed,
AzureGateway,
}Expand description
What the SQL Server connection is actually talking to.
Detection happens once at connect time via [detect_mssql_proxy_kind].
pub for integration-test reachability via MssqlSource::proxy_kind();
same “no external API contract” disclaimer applies as for the rest of
rivet::source::mssql::*.
Variants§
Direct
Direct connection to a SQL Server instance — no proxy detected.
Multiplexed
A transaction-mode multiplexer / connection router: detected because
@@SPID returned different session ids across two consecutive queries
on the same connection. The proxy is handing each statement to a
different backend session, so SET options, #temp tables, and cursors
will not persist across statements.
False negatives are possible when the proxy’s backend pool size is 1 (the same physical session is always reused).
AzureGateway
Azure SQL Database / Managed Instance: detected via
SERVERPROPERTY('EngineEdition') of 5 (Azure SQL DB) or 8 (Managed
Instance), falling back to the @@VERSION banner. These instances are
always fronted by the Azure SQL gateway — the session is preserved, but
the gateway may proxy or redirect the connection, enforces idle
timeouts, and injects transient faults.
Implementations§
Source§impl MssqlProxyKind
impl MssqlProxyKind
Sourcepub fn is_proxy(self) -> bool
pub fn is_proxy(self) -> bool
True for any non-direct connection (is_proxy() == false only for
MssqlProxyKind::Direct).
#[allow(dead_code)] because the binary compilation unit (which
re-declares mod source) does not reference this; the lib + tests do.
Trait Implementations§
Source§impl Clone for MssqlProxyKind
impl Clone for MssqlProxyKind
Source§fn clone(&self) -> MssqlProxyKind
fn clone(&self) -> MssqlProxyKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MssqlProxyKind
Source§impl Debug for MssqlProxyKind
impl Debug for MssqlProxyKind
impl Eq for MssqlProxyKind
Source§impl PartialEq for MssqlProxyKind
impl PartialEq for MssqlProxyKind
Source§fn eq(&self, other: &MssqlProxyKind) -> bool
fn eq(&self, other: &MssqlProxyKind) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MssqlProxyKind
Auto Trait Implementations§
impl Freeze for MssqlProxyKind
impl RefUnwindSafe for MssqlProxyKind
impl Send for MssqlProxyKind
impl Sync for MssqlProxyKind
impl Unpin for MssqlProxyKind
impl UnsafeUnpin for MssqlProxyKind
impl UnwindSafe for MssqlProxyKind
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.