1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # mssql-types
//!
//! SQL Server to Rust type mappings and conversions.
//!
//! This crate provides bidirectional mapping between SQL Server data types
//! and Rust types, handling the encoding and decoding of values in TDS format.
//!
//! ## Features
//!
//! - `chrono` (default): Enable date/time type support via chrono
//! - `uuid` (default): Enable UUID type support
//! - `decimal` (default): Enable decimal type support via rust_decimal
//! - `json`: Enable JSON type support via serde_json
//!
//! ## Type Mappings
//!
//! | SQL Server Type | Rust Type |
//! |-----------------|-----------|
//! | `BIT` | `bool` |
//! | `TINYINT` | `u8` |
//! | `SMALLINT` | `i16` |
//! | `INT` | `i32` |
//! | `BIGINT` | `i64` |
//! | `REAL` | `f32` |
//! | `FLOAT` | `f64` |
//! | `DECIMAL`/`NUMERIC` | `rust_decimal::Decimal` |
//! | `CHAR`/`VARCHAR` | `String` |
//! | `NCHAR`/`NVARCHAR` | `String` |
//! | `DATE` | `chrono::NaiveDate` |
//! | `TIME` | `chrono::NaiveTime` |
//! | `DATETIME2` | `chrono::NaiveDateTime` |
//! | `UNIQUEIDENTIFIER` | `uuid::Uuid` |
pub use ;
pub use ;
pub use TypeError;
pub use FromSql;
pub use ToSql;
pub use ;
pub use SqlValue;