Skip to main content

create_mssql_client

Function create_mssql_client 

Source
pub async fn create_mssql_client(
    config: &MssqlConnectionConfig,
) -> Result<MssqlClient>
Expand description

Create an authenticated tiberius::Client connected to a SQL Server instance. Uses tokio’s TCP stream wrapped with TokioAsyncWriteCompatExt to bridge between tokio’s async I/O and tiberius’s futures-io traits.

Encryption semantics:

  • trust_cert = true forces TLS on (matches SQL Server behavior where TrustServerCertificate=true is only meaningful with encryption).
  • Otherwise encryption follows the encrypt flag directly.