| 1 | use crate::any::{ |
| 2 | AnyArgumentBuffer, AnyArguments, AnyColumn, AnyConnection, AnyQueryResult, AnyRow, |
| 3 | AnyStatement, AnyTransactionManager, AnyTypeInfo, AnyValue, AnyValueRef, |
| 4 | }; |
| 5 | use crate::database::{Database, HasStatementCache}; |
| 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)] |
| 10 | pub struct Any; |
| 11 | |
| 12 | impl 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 | type ValueRef<'r> = AnyValueRef<'r>; |
| 27 | |
| 28 | type Arguments<'q> = AnyArguments<'q>; |
| 29 | type ArgumentBuffer<'q> = AnyArgumentBuffer<'q>; |
| 30 | |
| 31 | type Statement<'q> = AnyStatement<'q>; |
| 32 | |
| 33 | const NAME: &'static str = "Any"; |
| 34 | |
| 35 | const URL_SCHEMES: &'static [&'static str] = &[]; |
| 36 | } |
| 37 | |
| 38 | // This _may_ be true, depending on the selected database |
| 39 | impl HasStatementCache for Any {} |