[][src]Trait sqlx::Database

pub trait Database: Debug + Send + 'static + HasRow<'c, Database = Self> + HasRawValue<'c, Database = Self> + HasCursor<'c, 'q, Database = Self> where
    <Self::Connection as Executor>::Database == Self,
    <Self::Arguments as Arguments>::Database == Self, 
{ type Connection: Connect; type Arguments: Arguments; type TypeInfo: TypeInfo; type TableId: Clone + Display; 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

The concrete Connection implementation for this database.

type Arguments: Arguments

The concrete Arguments implementation for this database.

type TypeInfo: TypeInfo

The concrete TypeInfo implementation for this database.

type TableId: Clone + Display

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...