A sql client lib for rust.
use mssql_client::Connection;
use tokio::executor::current_thread::block_on_all;
fn main() {
let conn_str = "server=tcp:localhost\\SQL2017;database=Database1;integratedsecurity=sspi;trustservercertificate=true";
let connection = Connection::connect(conn_str);
let query = connection.query("SELECT 1 FROM Table1", ());
let (connection, rows): (_, Vec<i32>) = block_on_all(query).unwrap();
}
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.