Struct sqlx_mysql::MySql
source · pub struct MySql;
Expand description
MySQL database driver.
Trait Implementations§
source§impl Database for MySql
impl Database for MySql
§type Connection = MySqlConnection
type Connection = MySqlConnection
The concrete
Connection
implementation for this database.§type TransactionManager = MySqlTransactionManager
type TransactionManager = MySqlTransactionManager
The concrete
TransactionManager
implementation for this database.§type QueryResult = MySqlQueryResult
type QueryResult = MySqlQueryResult
The concrete
QueryResult
implementation for this database.§type Column = MySqlColumn
type Column = MySqlColumn
The concrete
Column
implementation for this database.§type TypeInfo = MySqlTypeInfo
type TypeInfo = MySqlTypeInfo
The concrete
TypeInfo
implementation for this database.§type Value = MySqlValue
type Value = MySqlValue
The concrete type used to hold an owned copy of the not-yet-decoded value that was
received from the database.
§type ValueRef<'r> = MySqlValueRef<'r>
type ValueRef<'r> = MySqlValueRef<'r>
The concrete type used to hold a reference to the not-yet-decoded value that has just been
received from the database.
§type Arguments<'q> = MySqlArguments
type Arguments<'q> = MySqlArguments
The concrete
Arguments
implementation for this database.§type ArgumentBuffer<'q> = Vec<u8>
type ArgumentBuffer<'q> = Vec<u8>
The concrete type used as a buffer for arguments while encoding.
§type Statement<'q> = MySqlStatement<'q>
type Statement<'q> = MySqlStatement<'q>
The concrete
Statement
implementation for this 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 Decode<'_, MySql> for IpAddr
impl Decode<'_, MySql> for IpAddr
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for Ipv4Addr
impl Decode<'_, MySql> for Ipv4Addr
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for Ipv6Addr
impl Decode<'_, MySql> for Ipv6Addr
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for String
impl Decode<'_, MySql> for String
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for Vec<u8>
impl Decode<'_, MySql> for Vec<u8>
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for bool
impl Decode<'_, MySql> for bool
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for f32
impl Decode<'_, MySql> for f32
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for f64
impl Decode<'_, MySql> for f64
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for i16
impl Decode<'_, MySql> for i16
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for i32
impl Decode<'_, MySql> for i32
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for i64
impl Decode<'_, MySql> for i64
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for i8
impl Decode<'_, MySql> for i8
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for u16
impl Decode<'_, MySql> for u16
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for u32
impl Decode<'_, MySql> for u32
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for u64
impl Decode<'_, MySql> for u64
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Decode<'_, MySql> for u8
impl Decode<'_, MySql> for u8
source§fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl<'r> Decode<'r, MySql> for &'r [u8]
impl<'r> Decode<'r, MySql> for &'r [u8]
source§fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl<'r> Decode<'r, MySql> for &'r str
impl<'r> Decode<'r, MySql> for &'r str
source§fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl<'r> Decode<'r, MySql> for Box<[u8]>
impl<'r> Decode<'r, MySql> for Box<[u8]>
source§fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl<'r> Decode<'r, MySql> for Box<str>
impl<'r> Decode<'r, MySql> for Box<str>
source§fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl<'r> Decode<'r, MySql> for Cow<'r, str>
impl<'r> Decode<'r, MySql> for Cow<'r, str>
source§fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl<'r, T> Decode<'r, MySql> for Text<T>
impl<'r, T> Decode<'r, MySql> for Text<T>
source§fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl Encode<'_, MySql> for &[u8]
impl Encode<'_, MySql> for &[u8]
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for &str
impl Encode<'_, MySql> for &str
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for Box<[u8]>
impl Encode<'_, MySql> for Box<[u8]>
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for Box<str>
impl Encode<'_, MySql> for Box<str>
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for Cow<'_, str>
impl Encode<'_, MySql> for Cow<'_, str>
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for IpAddr
impl Encode<'_, MySql> for IpAddr
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for Ipv4Addr
impl Encode<'_, MySql> for Ipv4Addr
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for Ipv6Addr
impl Encode<'_, MySql> for Ipv6Addr
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for String
impl Encode<'_, MySql> for String
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for Vec<u8>
impl Encode<'_, MySql> for Vec<u8>
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for bool
impl Encode<'_, MySql> for bool
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for f32
impl Encode<'_, MySql> for f32
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for f64
impl Encode<'_, MySql> for f64
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for i16
impl Encode<'_, MySql> for i16
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for i32
impl Encode<'_, MySql> for i32
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for i64
impl Encode<'_, MySql> for i64
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for i8
impl Encode<'_, MySql> for i8
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for u16
impl Encode<'_, MySql> for u16
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for u32
impl Encode<'_, MySql> for u32
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for u64
impl Encode<'_, MySql> for u64
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Encode<'_, MySql> for u8
impl Encode<'_, MySql> for u8
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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, MySql> for MySqlTime
impl<'q> Encode<'q, MySql> for MySqlTime
source§fn encode_by_ref(
&self,
buf: &mut <MySql as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <MySql as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, BoxDynError>
fn size_hint(&self) -> usize
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
source§impl<'q, T> Encode<'q, MySql> for Option<T>
impl<'q, T> Encode<'q, MySql> for Option<T>
fn produces(&self) -> Option<<MySql as Database>::TypeInfo>
source§fn encode(
self,
buf: &mut <MySql as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, BoxDynError>
fn encode( self, buf: &mut <MySql as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, BoxDynError>
Writes the value of
self
into buf
in the expected format for the database.source§fn encode_by_ref(
&self,
buf: &mut <MySql as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <MySql as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, BoxDynError>
fn size_hint(&self) -> usize
source§impl<'q, T> Encode<'q, MySql> for Text<T>where
T: Display,
impl<'q, T> Encode<'q, MySql> for Text<T>where
T: Display,
source§fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<u8>) -> Result<IsNull, BoxDynError>
source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
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 Type<MySql> for [u8]
impl Type<MySql> for [u8]
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for Box<[u8]>
impl Type<MySql> for Box<[u8]>
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for Box<str>
impl Type<MySql> for Box<str>
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for Cow<'_, str>
impl Type<MySql> for Cow<'_, str>
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for IpAddr
impl Type<MySql> for IpAddr
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for Ipv4Addr
impl Type<MySql> for Ipv4Addr
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for Ipv6Addr
impl Type<MySql> for Ipv6Addr
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for String
impl Type<MySql> for String
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl<T> Type<MySql> for Text<T>
impl<T> Type<MySql> for Text<T>
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for Vec<u8>
impl Type<MySql> for Vec<u8>
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for bool
impl Type<MySql> for bool
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for f32
impl Type<MySql> for f32
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for f64
impl Type<MySql> for f64
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for i16
impl Type<MySql> for i16
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for i32
impl Type<MySql> for i32
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for i64
impl Type<MySql> for i64
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for i8
impl Type<MySql> for i8
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for str
impl Type<MySql> for str
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for u16
impl Type<MySql> for u16
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for u32
impl Type<MySql> for u32
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for u64
impl Type<MySql> for u64
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl Type<MySql> for u8
impl Type<MySql> for u8
source§fn type_info() -> MySqlTypeInfo
fn type_info() -> MySqlTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &MySqlTypeInfo) -> bool
fn compatible(ty: &MySqlTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
source§impl TypeChecking for MySql
impl TypeChecking for MySql
source§const PARAM_CHECKING: ParamChecking = ::sqlx_core::type_checking::ParamChecking::Weak
const PARAM_CHECKING: ParamChecking = ::sqlx_core::type_checking::ParamChecking::Weak
Describes how the database in question typechecks query parameters.
source§fn param_type_for_id(info: &Self::TypeInfo) -> Option<&'static str>
fn param_type_for_id(info: &Self::TypeInfo) -> Option<&'static str>
Get the full path of the Rust type that corresponds to the given
TypeInfo
, if applicable. Read moresource§fn return_type_for_id(info: &Self::TypeInfo) -> Option<&'static str>
fn return_type_for_id(info: &Self::TypeInfo) -> Option<&'static str>
Get the full path of the Rust type that corresponds to the given
TypeInfo
, if applicable. Read moreimpl HasStatementCache for MySql
Auto Trait Implementations§
impl Freeze for MySql
impl RefUnwindSafe for MySql
impl Send for MySql
impl Sync for MySql
impl Unpin for MySql
impl UnwindSafe for MySql
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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