Skip to main content

Crate sqlx_sqlserver

Crate sqlx_sqlserver 

Source
Expand description

Independent Microsoft SQL Server driver crate for SQLx.

This crate is intentionally outside the SQLx workspace and does not use local path dependencies. The current port includes tested connection option parsing, PRELOGIN/LOGIN7 handshake support, TDS-wrapped TLS handshake support for encrypted SQL Server connections, SQL batch execution, transaction batches, and RPC execution for stable scalar bind parameters.

§Testing

Fast tests do not require SQL Server:

cargo test

Integration tests require MSSQL_DATABASE_URL and skip cleanly when it is absent:

MSSQL_DATABASE_URL='mssql://sa:Password123!@localhost:1433/master?encrypt=mandatory&trust_server_certificate=true' \
cargo test --features integration-tests --test mssql_smoke

Re-exports§

pub use options::Encrypt;
pub use options::MssqlConnectOptions;
pub use options::MssqlInvalidOption;

Modules§

any
Runtime Any driver registration for SQL Server.
options
Connection option parsing and configuration for SQL Server.
protocol
Small protocol helpers covered by fast unit tests.

Structs§

Mssql
SQL Server database driver marker.
MssqlArguments
SQL Server argument buffer.
MssqlColumn
SQL Server column metadata skeleton.
MssqlConnection
SQL Server connection.
MssqlQueryResult
Summary of a SQL Server query execution.
MssqlRow
SQL Server row skeleton.
MssqlStatement
SQL Server prepared statement metadata skeleton.
MssqlTransactionManager
SQL Server transaction manager.
MssqlTypeInfo
SQL Server type information.
MssqlValue
Owned SQL Server value skeleton.
MssqlValueRef
Borrowed SQL Server value skeleton.

Enums§

MssqlType
SQL Server scalar type families known by the skeleton driver.

Traits§

MssqlExecutor
An alias for Executor<'_, Database = Mssql>.

Type Aliases§

MssqlPool
An alias for Pool, specialized for SQL Server.
MssqlPoolOptions
An alias for PoolOptions, specialized for SQL Server.
MssqlTransaction
An alias for Transaction, specialized for SQL Server.