[][src]Trait sqlx_core::database::Database

pub trait Database where
    Self: Debug + Sized + Send + 'static,
    Self: for<'c> HasRow<'c, Database = Self>,
    Self: for<'c> HasRawValue<'c, Database = Self>,
    Self: for<'c, 'q> HasCursor<'c, 'q, Database = Self>, 
{ type Connection: Connect<Database = Self>; type Arguments: Arguments<Database = Self>; type TypeInfo: TypeInfo; type TableId: Display + Clone; type RawBuffer: Default; type Error: DatabaseError + Send + Sync; }

A database driver.

This trait encapsulates a complete driver implementation to a specific database (e.g., MySQL, Postgres).

Associated Types

type Connection: Connect<Database = Self>

The concrete Connection implementation for this database.

type Arguments: Arguments<Database = Self>

The concrete Arguments implementation for this database.

type TypeInfo: TypeInfo

The concrete TypeInfo implementation for this database.

type TableId: Display + Clone

The Rust type of table identifiers for this database.

type RawBuffer: Default

The Rust type used as the buffer when encoding arguments.

For example, Postgres and MySQL use Vec<u8>; however, SQLite uses Vec<SqliteArgumentValue>.

type Error: DatabaseError + Send + Sync

The concrete DatabaseError type used to report errors from the database.

Loading content...

Implementors

Loading content...