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
52
53
54
55
56
57
58
use sqlx_core::database::{Database, HasArguments, HasStatement, HasStatementCache, HasValueRef};

use crate::{
    arguments::{ExaArguments, ExaBuffer},
    column::ExaColumn,
    connection::ExaConnection,
    query_result::ExaQueryResult,
    row::ExaRow,
    statement::ExaStatement,
    transaction::ExaTransactionManager,
    type_info::ExaTypeInfo,
    value::{ExaValue, ExaValueRef},
};

#[derive(Debug, Clone, Copy)]
pub struct Exasol;

impl Database for Exasol {
    type Connection = ExaConnection;

    type TransactionManager = ExaTransactionManager;

    type Row = ExaRow;

    type QueryResult = ExaQueryResult;

    type Column = ExaColumn;

    type TypeInfo = ExaTypeInfo;

    type Value = ExaValue;

    const NAME: &'static str = "Exasol";

    const URL_SCHEMES: &'static [&'static str] = &["exa"];
}

impl<'r> HasValueRef<'r> for Exasol {
    type Database = Exasol;

    type ValueRef = ExaValueRef<'r>;
}

impl HasArguments<'_> for Exasol {
    type Database = Exasol;

    type Arguments = ExaArguments;

    type ArgumentBuffer = ExaBuffer;
}

impl<'q> HasStatement<'q> for Exasol {
    type Database = Exasol;

    type Statement = ExaStatement<'q>;
}

impl HasStatementCache for Exasol {}