welds_sqlx_mssql/
database.rs

1use crate::{
2    MssqlArguments, MssqlColumn, MssqlConnection, MssqlQueryResult, MssqlRow, MssqlStatement,
3    MssqlTransactionManager, MssqlTypeInfo, MssqlValue, MssqlValueRef,
4};
5use sqlx_core::database::{Database, HasArguments, HasStatement, HasValueRef};
6
7/// MSSQL database driver.
8#[derive(Debug)]
9pub struct Mssql;
10
11impl Database for Mssql {
12    type Connection = MssqlConnection;
13
14    type TransactionManager = MssqlTransactionManager;
15
16    type Row = MssqlRow;
17
18    type QueryResult = MssqlQueryResult;
19
20    type Column = MssqlColumn;
21
22    type TypeInfo = MssqlTypeInfo;
23
24    type Value = MssqlValue;
25
26    const NAME: &'static str = "Mssql";
27
28    const URL_SCHEMES: &'static [&'static str] = &["mssql"];
29}
30
31impl<'r> HasValueRef<'r> for Mssql {
32    type Database = Mssql;
33
34    type ValueRef = MssqlValueRef<'r>;
35}
36
37impl<'q> HasStatement<'q> for Mssql {
38    type Database = Mssql;
39
40    type Statement = MssqlStatement<'q>;
41}
42
43impl HasArguments<'_> for Mssql {
44    type Database = Mssql;
45
46    type Arguments = MssqlArguments;
47
48    type ArgumentBuffer = Vec<u8>;
49}