Skip to main content

Module mssql

Module mssql 

Source
Expand description

Source implementation for SQL Server.

Two backend implementations exist:

  • src_mssql_tiberius: tiberius + bb8-tiberius, the original implementation.
  • src_mssql_tds: mssql-tds, Microsoft’s own TDS client.

Enabling exactly one of these two Cargo features picks that backend at compile time, with no runtime switch (and no cost of linking the other backend in). Enabling both (as the Python bindings do, so cx.mssql_driver can flip backends at runtime) links both in and dispatches through the MsSQLSource enum wrapper instead, selecting the active one via active_driver / set_active_driver (available only with both features).

All three configurations compile against the same MsSQLTypeSystem and MsSQLSourceError, so MsSQLArrowTransport (with dst_arrow) and everything above the source layer is unaffected by which backend(s) are active. See sfu-db/connector-x#942 for the migration plan.

Structs§

FloatN
Value of a nullable float column of either width, widened to f64.
IntN
Value of a nullable integer column of any width, widened to i64.
MsSQLSource
Source that reads from Microsoft SQL Server.
MsSQLSourceParser
Row parser for a SQL Server partition.
MsSQLSourcePartition
One partition of an MsSQLSource.

Enums§

MsSQLDriverKind
Which MSSQL wire-protocol driver ConnectorX uses for a given source.
MsSQLSourceError
Errors raised by the SQL Server source.
MsSQLTypeSystem
Column types of the SQL Server source. The bool is true when the column is nullable.

Functions§

set_user_agent_info
Sets the wrapper’s package version and runtime for the TDS User-Agent, leaving LOGIN7 unchanged. Language bindings should call this before creating connections. Reinitializing with the same values is allowed; different values are rejected.