All Projects → steffengy → Tiberius

steffengy / Tiberius

Licence: other
TDS 7.4 (mssql / Microsoft SQL Server) async driver for rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Tiberius

bizbook-server
The repository of bizbook server web api project
Stars: ✭ 45 (-70.78%)
Mutual labels:  sql-server, mssql
xelogstash
Send SQL Server Extended Events to Logstash, Elastic Search, or JSON
Stars: ✭ 22 (-85.71%)
Mutual labels:  sql-server, mssql
Reservation-System
Airline Reservation System is an online Airline Ticket Reservation Application built using Windows Forms, C#, MS SQL Server.
Stars: ✭ 18 (-88.31%)
Mutual labels:  sql-server, mssql
Node Mssql
Microsoft SQL Server client for Node.js
Stars: ✭ 1,951 (+1166.88%)
Mutual labels:  sql-server, mssql
React Express Fullstack
Full stack (mostly unopinionated) starter pack with React+Redux and Expressjs
Stars: ✭ 23 (-85.06%)
Mutual labels:  sql-server, mssql
tsql-scripts
Transact-SQL scripts and gists
Stars: ✭ 35 (-77.27%)
Mutual labels:  sql-server, mssql
uzbekistan-regions-data
Full Database of regions Uzbekistan available in JSON, SQL & CSV Format All Regions, Districts & Quarters with Latin, Cyrillic and Russian versions. (Районы (туманы) Республики Узбекистан и Города областного (республиканского) подчинения)
Stars: ✭ 46 (-70.13%)
Mutual labels:  sql-server, mssql
YelpDatasetSQL
Working with the Yelp Dataset in Azure SQL and SQL Server
Stars: ✭ 16 (-89.61%)
Mutual labels:  sql-server, mssql
Sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.
Stars: ✭ 5,039 (+3172.08%)
Mutual labels:  async, mssql
Securitydriven.tinyorm
.NET micro ORM done right.
Stars: ✭ 281 (+82.47%)
Mutual labels:  sql-server, mssql
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+11697.4%)
Mutual labels:  sql-server, mssql
Dbt Sqlserver
dbt adapter for SQL Server and Azure SQL
Stars: ✭ 41 (-73.38%)
Mutual labels:  sql-server, mssql
Dbatools
🚀 SQL Server automation and instance migrations have never been safer, faster or freer
Stars: ✭ 1,742 (+1031.17%)
Mutual labels:  sql-server, mssql
Require Vuejs
RequireJS plugin to async and dynamic load and parse .vue components
Stars: ✭ 143 (-7.14%)
Mutual labels:  async
Haslett
A lightweight WebSocket library for ClojureScript
Stars: ✭ 147 (-4.55%)
Mutual labels:  async
Unityfx.async
Asynchronous operations (promises) for Unity3d.
Stars: ✭ 143 (-7.14%)
Mutual labels:  async
Aint Queue
🚀 An async-queue library built on top of swoole, flexable multi-consumer, coroutine supported. 基于 Swoole 的一个异步队列库,可弹性伸缩的工作进程池,工作进程协程支持。
Stars: ✭ 143 (-7.14%)
Mutual labels:  async
Kubernetes asyncio
Python asynchronous client library for Kubernetes http://kubernetes.io/
Stars: ✭ 147 (-4.55%)
Mutual labels:  async
Vue Concurrency
A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition API.
Stars: ✭ 147 (-4.55%)
Mutual labels:  async
Async
Easily run code asynchronously
Stars: ✭ 1,983 (+1187.66%)
Mutual labels:  async

Tiberius

Build status Build Status Documentation
A native TDS (MSSQL) 7.4 driver for Rust

NOTE: Supporting async/await and revising the API is currently pending. A very early preview state with current design considerations is available in the async_await branch. At this time I do not have the time to overhaul the library and do not intend to further maintain the 0.3 version relying on the old futures ecosystem.

Documentation

Please check the documentation above for any examples.

For installing please don't forget the following things:

Enable TCP for SQL Server

As of now only TCP is supported, which is disabled by default.
Make sure to enable TCP in your MSSQL settings.

Encryption (TLS/SSL)

a) Make sure to use a trusted certificate

Make sure the certificate your using is trusted by your local machine.
To create a self-signed certificate that is trusted you can use the following powershell:

$cert = New-SelfSignedCertificate -DnsName $serverName,localhost -CertStoreLocation cert:\LocalMachine\My
$rootStore = Get-Item cert:\LocalMachine\Root
$rootStore.Open("ReadWrite")
$rootStore.Add($cert)
$rootStore.Close();

You also have to change the certificate in the SQL Server settings.
In a production setting you likely want to use a certificate that is issued by a CA.

b) Disable certificate validation by using TrustServerCertificate=true in your connection string (requires 0.2.2)

c) Alternatively: Disable Encryption for LOCALHOST

For a connection to localhost, which will never leave your machine, it's safe to disable encryption. Currently this is only possible by doing someting like the following in your cargo.toml:

tiberius = { version = "0.X", default-features=false,features=["chrono"] }

This will disable encryption for your ENTIRE crate

Securing Windows Authentication over TCP (non-localhost)

To ensure Windows-Authentication is secure, enable Extended-Protection.
Channel-Bindings only work when Force Encryption and Extended Protection
are enabled in the SQL Server Settings as described here.
It also leads to SPN's being used, which makes replay attacks harder.
Not supported yet.

SQL Type Mappings

Any nullable type should be accessed as Option<T> where T is any Rust Type listed below. This table unfortunately still is very incomplete, if you have a question about a specific type please create an issue, which will make this table grow.

SQL Type Rust Type Feature
NVARCHAR, BigVarChar &str
uniqueidentifier tiberius::ty::Guid
DATETIME tiberius::ty::DateTime
DATETIME2 tiberius::ty::DateTime2
DATETIME,DATETIME2 chrono::NaiveDateTime chrono
Support for versions below 7.4 (to 7.2 so that everything >= SQL Server 2008 works) is desired.

Supported Connection String Parameters

Not every parameter is supported yet. Below is a list of all parameters supported.

Parameters Description
server The name or network address of the instance of SQL Server to which to connect. The port number can be specified after the server name.
integratedsecurity Toggle between Windows authentication and SQL authentication.
uid, username, user The SQL Server login account.
password, pwd The password for the SQL Server account logging on.
database The name of the database.
trustservercertificate Specifies whether the driver trusts the server certificate when connecting using TLS.
encrypt Specifies whether the driver uses TLS to encrypt communication.

Old State (v0.1)

The old state can be found in the "old" branch (click me)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].