pub trait Database:
'static
+ Sized
+ Send
+ Debug
+ for<'r> HasValueRef<'r, Database = Self>
+ for<'q> HasArguments<'q, Database = Self>
+ for<'q> HasStatement<'q, Database = Self> {
type Connection: Connection<Database = Self>;
type TransactionManager: TransactionManager<Database = Self>;
type Row: Row<Database = Self>;
type QueryResult: 'static + Sized + Send + Sync + Default + Extend<Self::QueryResult>;
type Column: Column<Database = Self>;
type TypeInfo: TypeInfo;
type Value: Value<Database = Self> + 'static;
}Expand description
A database driver.
This trait encapsulates a complete set of traits that implement a driver for a specific database (e.g., MySQL, PostgreSQL).
Required Associated Types§
Sourcetype Connection: Connection<Database = Self>
type Connection: Connection<Database = Self>
The concrete Connection implementation for this database.
Sourcetype TransactionManager: TransactionManager<Database = Self>
type TransactionManager: TransactionManager<Database = Self>
The concrete TransactionManager implementation for this database.
Sourcetype QueryResult: 'static + Sized + Send + Sync + Default + Extend<Self::QueryResult>
type QueryResult: 'static + Sized + Send + Sync + Default + Extend<Self::QueryResult>
The concrete QueryResult implementation for this database.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl Database for Any
Available on (crate features postgres or mysql or mssql or sqlite or odbc) and crate feature any only.
impl Database for Any
Available on (crate features
postgres or mysql or mssql or sqlite or odbc) and crate feature any only.type Connection = AnyConnection
type TransactionManager = AnyTransactionManager
type Row = AnyRow
type QueryResult = AnyQueryResult
type Column = AnyColumn
type TypeInfo = AnyTypeInfo
type Value = AnyValue
Source§impl Database for Mssql
Available on crate feature mssql only.
impl Database for Mssql
Available on crate feature
mssql only.type Connection = MssqlConnection
type TransactionManager = MssqlTransactionManager
type Row = MssqlRow
type QueryResult = MssqlQueryResult
type Column = MssqlColumn
type TypeInfo = MssqlTypeInfo
type Value = MssqlValue
Source§impl Database for MySql
Available on crate feature mysql only.
impl Database for MySql
Available on crate feature
mysql only.type Connection = MySqlConnection
type TransactionManager = MySqlTransactionManager
type Row = MySqlRow
type QueryResult = MySqlQueryResult
type Column = MySqlColumn
type TypeInfo = MySqlTypeInfo
type Value = MySqlValue
Source§impl Database for Odbc
Available on crate feature odbc only.
impl Database for Odbc
Available on crate feature
odbc only.type Connection = OdbcConnection
type TransactionManager = OdbcTransactionManager
type Row = OdbcRow
type QueryResult = OdbcQueryResult
type Column = OdbcColumn
type TypeInfo = OdbcTypeInfo
type Value = OdbcValue
Source§impl Database for Postgres
Available on crate feature postgres only.
impl Database for Postgres
Available on crate feature
postgres only.type Connection = PgConnection
type TransactionManager = PgTransactionManager
type Row = PgRow
type QueryResult = PgQueryResult
type Column = PgColumn
type TypeInfo = PgTypeInfo
type Value = PgValue
Source§impl Database for Sqlite
Available on crate feature sqlite only.
impl Database for Sqlite
Available on crate feature
sqlite only.