Struct sqlx::Any

source ยท
pub struct Any;
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

ยง

type Connection = AnyConnection

The concrete Connection implementation for this database.
ยง

type TransactionManager = AnyTransactionManager

The concrete TransactionManager implementation for this database.
ยง

type Row = AnyRow

The concrete Row implementation for this database.
ยง

type QueryResult = AnyQueryResult

The concrete QueryResult implementation for this database.
ยง

type Column = AnyColumn

The concrete Column implementation for this database.
ยง

type TypeInfo = AnyTypeInfo

The concrete TypeInfo implementation for this database.
ยง

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ยง

impl Debug for Any

sourceยง

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

Formats the value using the given formatter. Read more
sourceยง

impl<'r> Decode<'r, Any> for &'r strwhere &'r str: AnyDecode<'r>,

sourceยง

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

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'r> Decode<'r, Any> for Stringwhere String: AnyDecode<'r>,

sourceยง

fn decode( value: AnyValueRef<'r> ) -> Result<String, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'r> Decode<'r, Any> for boolwhere bool: AnyDecode<'r>,

sourceยง

fn decode( value: AnyValueRef<'r> ) -> Result<bool, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'r> Decode<'r, Any> for f32where f32: AnyDecode<'r>,

sourceยง

fn decode( value: AnyValueRef<'r> ) -> Result<f32, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'r> Decode<'r, Any> for f64where f64: AnyDecode<'r>,

sourceยง

fn decode( value: AnyValueRef<'r> ) -> Result<f64, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'r> Decode<'r, Any> for i16where i16: AnyDecode<'r>,

sourceยง

fn decode( value: AnyValueRef<'r> ) -> Result<i16, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'r> Decode<'r, Any> for i32where i32: AnyDecode<'r>,

sourceยง

fn decode( value: AnyValueRef<'r> ) -> Result<i32, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'r> Decode<'r, Any> for i64where i64: AnyDecode<'r>,

sourceยง

fn decode( value: AnyValueRef<'r> ) -> Result<i64, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<'q> Encode<'q, Any> for &'q strwhere &'q str: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, T> Encode<'q, Any> for Option<T>where T: AnyEncode<'q> + 'q,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, Any> for Stringwhere String: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, Any> for boolwhere bool: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, Any> for f32where f32: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, Any> for f64where f64: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, Any> for i16where i16: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, Any> for i32where i32: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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, Any> for i64where i64: AnyEncode<'q>,

sourceยง

fn encode_by_ref(&self, buf: &mut AnyArgumentBuffer<'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) -> IsNullwhere 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> HasArguments<'q> for Any

ยง

type Database = Any

ยง

type Arguments = AnyArguments<'q>

The concrete Arguments implementation for this database.
ยง

type ArgumentBuffer = AnyArgumentBuffer<'q>

The concrete type used as a buffer for arguments while encoding.
sourceยง

impl<'q> HasStatement<'q> for Any

ยง

type Database = Any

ยง

type Statement = AnyStatement<'q>

The concrete Statement implementation for this database.
sourceยง

impl<'r> HasValueRef<'r> for Any

ยง

type Database = Any

ยง

type ValueRef = AnyValueRef<'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 Type<Any> for String

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &AnyTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Any> for bool

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &AnyTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Any> for f32

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &AnyTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Any> for f64

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &AnyTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Any> for i16

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

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

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

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

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &AnyTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Any> for str

sourceยง

fn type_info() -> AnyTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &AnyTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl HasStatementCache for Any

Auto Trait Implementationsยง

Blanket Implementationsยง

sourceยง

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

sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
sourceยง

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

const: unstable ยท sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
sourceยง

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

const: unstable ยท sourceยง

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

Mutably borrows from an owned value. Read more
sourceยง

impl<T> From<T> for T

const: unstable ยท sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

sourceยง

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

const: unstable ยท 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> Same<T> for T

ยง

type Output = T

Should always be Self
sourceยง

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

ยง

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable ยท sourceยง

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

Performs the conversion.
sourceยง

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

ยง

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

The type returned in the event of a conversion error.
const: unstable ยท sourceยง

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

Performs the conversion.
ยง

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

ยง

fn vzip(self) -> V