sqlx_core_oldapi/any/
database.rs

1use crate::any::{
2    AnyArgumentBuffer, AnyArguments, AnyColumn, AnyConnection, AnyQueryResult, AnyRow,
3    AnyStatement, AnyTransactionManager, AnyTypeInfo, AnyValue, AnyValueRef,
4};
5use crate::database::{Database, HasArguments, HasStatement, HasStatementCache, HasValueRef};
6
7/// Opaque database driver. Capable of being used in place of any SQLx database driver. The actual
8/// driver used will be selected at runtime, from the connection url.
9#[derive(Debug)]
10pub struct Any;
11
12impl Database for Any {
13    type Connection = AnyConnection;
14
15    type TransactionManager = AnyTransactionManager;
16
17    type Row = AnyRow;
18
19    type QueryResult = AnyQueryResult;
20
21    type Column = AnyColumn;
22
23    type TypeInfo = AnyTypeInfo;
24
25    type Value = AnyValue;
26}
27
28impl<'r> HasValueRef<'r> for Any {
29    type Database = Any;
30
31    type ValueRef = AnyValueRef<'r>;
32}
33
34impl<'q> HasStatement<'q> for Any {
35    type Database = Any;
36
37    type Statement = AnyStatement<'q>;
38}
39
40impl<'q> HasArguments<'q> for Any {
41    type Database = Any;
42
43    type Arguments = AnyArguments<'q>;
44
45    type ArgumentBuffer = AnyArgumentBuffer<'q>;
46}
47
48// This _may_ be true, depending on the selected database
49impl HasStatementCache for Any {}