sqlx_build_trust_sqlite/
database.rs

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