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(())
}
Upgrade
Version history
0.12.3latest on crates.io
Audit
Dependencies
No dependency data recorded yet.