danylaporte / mssql_client

A sql client lib for rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Build status

A sql client lib for rust.

Documentation

API Documentation

Example

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();
}

License

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.

About

A sql client lib for rust

License:Apache License 2.0


Languages

Language:Rust 96.5%Language:PowerShell 3.5%