pub struct Any;
Available on crate feature
any
only.Expand description
Opaque database driver. Capable of being used in place of any SQLx database driver. The actual driver used will be selected at runtime, from the connection url.
Trait Implementations§
source§impl Database for Any
impl Database for Any
§type Connection = AnyConnection
type Connection = AnyConnection
The concrete
Connection
implementation for this database.§type TransactionManager = AnyTransactionManager
type TransactionManager = AnyTransactionManager
The concrete
TransactionManager
implementation for this database.§type QueryResult = AnyQueryResult
type QueryResult = AnyQueryResult
The concrete
QueryResult
implementation for this database.§type TypeInfo = AnyTypeInfo
type TypeInfo = AnyTypeInfo
The concrete
TypeInfo
implementation for this database.§type Value = AnyValue
type Value = AnyValue
The concrete type used to hold an owned copy of the not-yet-decoded value that was
received from the database.
source§const URL_SCHEMES: &'static [&'static str] = _
const URL_SCHEMES: &'static [&'static str] = _
The schemes for database URLs that should match this driver.
source§impl<'a> Encode<'a, Any> for &'a str
impl<'a> Encode<'a, Any> for &'a str
source§fn encode(self, buf: &mut <Any as HasArguments<'a>>::ArgumentBuffer) -> IsNull
fn encode(self, buf: &mut <Any as HasArguments<'a>>::ArgumentBuffer) -> IsNull
Writes the value of
self
into buf
in the expected format for the database.source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'a>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'a>>::ArgumentBuffer ) -> IsNull
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for &'q [u8]
impl<'q> Encode<'q, Any> for &'q [u8]
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q, T> Encode<'q, Any> for Option<T>
impl<'q, T> Encode<'q, Any> for Option<T>
source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for String
impl<'q> Encode<'q, Any> for String
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for Vec<u8>
impl<'q> Encode<'q, Any> for Vec<u8>
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for bool
impl<'q> Encode<'q, Any> for bool
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for f32
impl<'q> Encode<'q, Any> for f32
source§fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'q>) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for f64
impl<'q> Encode<'q, Any> for f64
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for i16
impl<'q> Encode<'q, Any> for i16
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for i32
impl<'q> Encode<'q, Any> for i32
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> Encode<'q, Any> for i64
impl<'q> Encode<'q, Any> for i64
source§fn encode_by_ref(
&self,
buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer
) -> IsNull
fn encode_by_ref( &self, buf: &mut <Any as HasArguments<'q>>::ArgumentBuffer ) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl<'q> HasArguments<'q> for Any
impl<'q> HasArguments<'q> for Any
type Database = Any
§type Arguments = AnyArguments<'q>
type Arguments = AnyArguments<'q>
The concrete
Arguments
implementation for this database.§type ArgumentBuffer = AnyArgumentBuffer<'q>
type ArgumentBuffer = AnyArgumentBuffer<'q>
The concrete type used as a buffer for arguments while encoding.
source§impl<'q> HasStatement<'q> for Any
impl<'q> HasStatement<'q> for Any
source§impl<'r> HasValueRef<'r> for Any
impl<'r> HasValueRef<'r> for Any
source§impl MigrateDatabase for Any
impl MigrateDatabase for Any
fn create_database( url: &str ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn database_exists( url: &str ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + '_>>
fn drop_database( url: &str ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn force_drop_database( url: &str ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
source§impl Type<Any> for i16
impl Type<Any> for i16
source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<Any> for i32
impl Type<Any> for i32
source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<Any> for i64
impl Type<Any> for i64
source§fn type_info() -> AnyTypeInfo
fn type_info() -> AnyTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &AnyTypeInfo) -> bool
fn compatible(ty: &AnyTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl HasStatementCache for Any
Auto Trait Implementations§
impl Freeze for Any
impl RefUnwindSafe for Any
impl Send for Any
impl Sync for Any
impl Unpin for Any
impl UnwindSafe for Any
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more