Trait Database

Source
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§

Source

type Connection: Connection<Database = Self>

The concrete Connection implementation for this database.

Source

type TransactionManager: TransactionManager<Database = Self>

The concrete TransactionManager implementation for this database.

Source

type Row: Row<Database = Self>

The concrete Row implementation for this database.

Source

type QueryResult: 'static + Sized + Send + Sync + Default + Extend<Self::QueryResult>

The concrete QueryResult implementation for this database.

Source

type Column: Column<Database = Self>

The concrete Column implementation for this database.

Source

type TypeInfo: TypeInfo

The concrete TypeInfo implementation for this database.

Source

type Value: Value<Database = Self> + 'static

The concrete type used to hold an owned copy of the not-yet-decoded value that was received from the 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

Source§

impl Database for Mssql

Available on crate feature mssql only.
Source§

impl Database for MySql

Available on crate feature mysql only.
Source§

impl Database for Postgres

Available on crate feature postgres only.
Source§

impl Database for Sqlite

Available on crate feature sqlite only.