Registry / database / tiberius

tiberius

JSON →
library0.12.3rscratesunverified

A TDS (MSSQL) driver for Rust.

# Cargo.toml [dependencies] tiberius = "0.12.3"
INSTALL
IMPORT
SIG · TIBERIUS
T
tiberius
databaserustv0.12.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
✓ use tiberius::Client;

Connect to a MSSQL server and execute a query.

use tiberius::{Client, Config}; use tokio::net::TcpStream; use tokio_util::compat::TokioAsyncWriteCompatExt; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let config = Config::new(); let tcp = TcpStream::connect("localhost:1433").await?; tcp.set_nodelay(true)?; let mut client = Client::connect(config, tcp.compat_write()).await?; let stream = client.query("SELECT 1", &[]).await?; println!("Query executed"); Ok(()) }
Debug
Known issues
gotchaRequires an async runtime (tokio) and the `tokio-util` crate for compatibility.
fix
Add `tokio` and `tokio-util` with feature `compat` to your dependencies.
affects: >=0.12.0
Upgrade
Version history
0.12.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
tiberius — cargo add tiberius · libregistry