sqlx_firebird/
database.rs

1//
2// Copyright © 2023, RedSoft
3// License: MIT
4//
5
6use sqlx_core::database::{Database, HasArguments, HasStatement, HasStatementCache, HasValueRef};
7
8use crate::{
9    FbArgumentValue, FbArguments, FbColumn, FbConnection, FbQueryResult, FbRow, FbStatement,
10    FbTransactionManager, FbTypeInfo, FbValue, FbValueRef,
11};
12
13#[derive(Debug)]
14pub struct Firebird;
15
16impl Database for Firebird {
17    type Connection = FbConnection;
18
19    type TransactionManager = FbTransactionManager;
20
21    type QueryResult = FbQueryResult;
22
23    type Row = FbRow;
24
25    type Column = FbColumn;
26
27    type TypeInfo = FbTypeInfo;
28
29    type Value = FbValue;
30
31    const NAME: &'static str = "Firebird";
32
33    const URL_SCHEMES: &'static [&'static str] = &["firebird"];
34}
35
36impl<'q> HasStatement<'q> for Firebird {
37    type Database = Firebird;
38
39    type Statement = FbStatement<'q>;
40}
41
42impl<'q> HasArguments<'q> for Firebird {
43    type Database = Firebird;
44
45    type Arguments = FbArguments<'q>;
46
47    type ArgumentBuffer = Vec<FbArgumentValue<'q>>;
48}
49
50impl<'r> HasValueRef<'r> for Firebird {
51    type Database = Firebird;
52
53    type ValueRef = FbValueRef<'r>;
54}
55
56impl HasStatementCache for Firebird {}