1use cdbc::database::{Database, HasArguments, HasStatement, HasStatementCache, HasValueRef};
2use crate::{
3 SqliteArgumentValue, SqliteArguments, SqliteColumn, SqliteConnection, SqliteQueryResult,
4 SqliteRow, SqliteStatement, SqliteTransactionManager, SqliteTypeInfo, SqliteValue,
5 SqliteValueRef,
6};
7
8#[derive(Debug)]
10pub struct Sqlite;
11
12impl Database for Sqlite {
13 type Connection = SqliteConnection;
14
15 type TransactionManager = SqliteTransactionManager;
16
17 type Row = SqliteRow;
18
19 type QueryResult = SqliteQueryResult;
20
21 type Column = SqliteColumn;
22
23 type TypeInfo = SqliteTypeInfo;
24
25 type Value = SqliteValue;
26
27 fn holder() -> &'static str {
28 "?"
29 }
30}
31
32impl<'r> HasValueRef<'r> for Sqlite {
33 type Database = Sqlite;
34
35 type ValueRef = SqliteValueRef<'r>;
36}
37
38impl<'q> HasArguments<'q> for Sqlite {
39 type Database = Sqlite;
40
41 type Arguments = SqliteArguments<'q>;
42
43 type ArgumentBuffer = Vec<SqliteArgumentValue<'q>>;
44}
45
46impl HasStatement for Sqlite {
47 type Database = Sqlite;
48
49 type Statement = SqliteStatement;
50}
51
52impl HasStatementCache for Sqlite {}