Driver

Struct Driver 

Source
pub struct Driver;
Expand description

Sqlite database driver.

Trait Implementations§

Source§

impl Database for Sqlite

Source§

const NAME: &'static str = "SQLite"

The display name for this database driver.
Source§

const URL_SCHEMES: &'static [&'static str]

The schemes for database URLs that should match this driver.
Source§

type Connection = SqliteConnection

The concrete Connection implementation for this database.
Source§

type TransactionManager = SqliteTransactionManager

The concrete TransactionManager implementation for this database.
Source§

type Row = SqliteRow

The concrete Row implementation for this database.
Source§

type QueryResult = SqliteQueryResult

The concrete QueryResult implementation for this database.
Source§

type Column = SqliteColumn

The concrete Column implementation for this database.
Source§

type TypeInfo = SqliteTypeInfo

The concrete TypeInfo implementation for this database.
Source§

type Value = SqliteValue

The concrete type used to hold an owned copy of the not-yet-decoded value that was received from the database.
Source§

impl Debug for Sqlite

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'r> Decode<'r, Sqlite> for &'r [u8]

Source§

fn decode( value: SqliteValueRef<'r>, ) -> Result<&'r [u8], Box<dyn Error + Send + Sync>>

Decode a new value of this type using a raw value from the database.
Source§

impl<'r> Decode<'r, Sqlite> for &'r str

Source§

fn decode( value: SqliteValueRef<'r>, ) -> Result<&'r str, Box<dyn Error + Send + Sync>>

Decode a new value of this type using a raw value from the database.
Source§

impl<'r> Decode<'r, Sqlite> for Vec<u8>

Source§

fn decode( value: SqliteValueRef<'r>, ) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>

Decode a new value of this type using a raw value from the database.
Source§

impl<'q> Encode<'q, Sqlite> for &'q [u8]

Source§

fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue<'q>>) -> IsNull

Writes the value of self into buf without moving self. Read more
Source§

fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
where Self: Sized,

Writes the value of self into buf in the expected format for the database.
Source§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source§

fn size_hint(&self) -> usize

Source§

impl<'q> Encode<'q, Sqlite> for &'q str

Source§

fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue<'q>>) -> IsNull

Writes the value of self into buf without moving self. Read more
Source§

fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
where Self: Sized,

Writes the value of self into buf in the expected format for the database.
Source§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source§

fn size_hint(&self) -> usize

Source§

impl<'q> Encode<'q, Sqlite> for Vec<u8>

Source§

fn encode(self, args: &mut Vec<SqliteArgumentValue<'q>>) -> IsNull

Writes the value of self into buf in the expected format for the database.
Source§

fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue<'q>>) -> IsNull

Writes the value of self into buf without moving self. Read more
Source§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

Source§

fn size_hint(&self) -> usize

Source§

impl<'q> HasArguments<'q> for Sqlite

Source§

type Database = Sqlite

Source§

type Arguments = SqliteArguments<'q>

The concrete Arguments implementation for this database.
Source§

type ArgumentBuffer = Vec<SqliteArgumentValue<'q>>

The concrete type used as a buffer for arguments while encoding.
Source§

impl<'q> HasStatement<'q> for Sqlite

Source§

type Database = Sqlite

Source§

type Statement = SqliteStatement<'q>

The concrete Statement implementation for this database.
Source§

impl<'r> HasValueRef<'r> for Sqlite

Source§

type Database = Sqlite

Source§

type ValueRef = SqliteValueRef<'r>

The concrete type used to hold a reference to the not-yet-decoded value that has just been received from the database.
Source§

impl MigrateDatabase for Sqlite

Source§

fn create_database( url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>

Source§

fn database_exists( url: &str, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + '_>>

Source§

fn drop_database( url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>

Source§

fn force_drop_database( _url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>

Source§

impl TestSupport for Sqlite

Source§

fn test_context( args: &TestArgs, ) -> Pin<Box<dyn Future<Output = Result<TestContext<Sqlite>, Error>> + Send + '_>>

Get parameters to construct a Pool suitable for testing. Read more
Source§

fn cleanup_test( db_name: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>

Source§

fn cleanup_test_dbs() -> Pin<Box<dyn Future<Output = Result<Option<usize>, Error>> + Send>>

Cleanup any test databases that are no longer in-use. Read more
Source§

fn snapshot( _conn: &mut <Sqlite as Database>::Connection, ) -> Pin<Box<dyn Future<Output = Result<FixtureSnapshot<Sqlite>, Error>> + Send + '_>>

Take a snapshot of the current state of the database (data only). Read more
Source§

impl Type<Sqlite> for [u8]

Source§

fn type_info() -> SqliteTypeInfo

Returns the canonical SQL type for this Rust type. Read more
Source§

fn compatible(ty: &SqliteTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
Source§

impl Type<Sqlite> for Vec<u8>

Source§

fn type_info() -> SqliteTypeInfo

Returns the canonical SQL type for this Rust type. Read more
Source§

fn compatible(ty: &SqliteTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
Source§

impl Type<Sqlite> for str

Source§

fn type_info() -> SqliteTypeInfo

Returns the canonical SQL type for this Rust type. Read more
Source§

fn compatible(ty: &<DB as Database>::TypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
Source§

impl HasStatementCache for Sqlite

Auto Trait Implementations§

§

impl Freeze for Sqlite

§

impl RefUnwindSafe for Sqlite

§

impl Send for Sqlite

§

impl Sync for Sqlite

§

impl Unpin for Sqlite

§

impl UnwindSafe for Sqlite

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,