pub struct D1;Expand description
The Cloudflare D1 database driver: the type sqlx code names in
Executor<'_, Database = D1>, sqlx::query_as::<D1, _> and so on.
Trait Implementations§
Source§impl Database for D1
impl Database for D1
Source§const URL_SCHEMES: &'static [&'static str]
const URL_SCHEMES: &'static [&'static str]
The schemes for database URLs that should match this driver.
Source§type Connection = D1Connection
type Connection = D1Connection
The concrete
Connection implementation for this database.Source§type TransactionManager = D1TransactionManager
type TransactionManager = D1TransactionManager
The concrete
TransactionManager implementation for this database.Source§type QueryResult = QueryResult
type QueryResult = QueryResult
The concrete
QueryResult implementation for this database.Source§type Value = D1Value
type Value = D1Value
The concrete type used to hold an owned copy of the not-yet-decoded value that was
received from the database.
Source§type ValueRef<'r> = D1ValueRef<'r>
type ValueRef<'r> = D1ValueRef<'r>
The concrete type used to hold a reference to the not-yet-decoded value that has just been
received from the database.
Source§type Arguments = D1Arguments
type Arguments = D1Arguments
The concrete
Arguments implementation for this database.Source§type ArgumentBuffer = Vec<Value>
type ArgumentBuffer = Vec<Value>
The concrete type used as a buffer for arguments while encoding.
Source§type Statement = D1Statement
type Statement = D1Statement
The concrete
Statement implementation for this database.Source§impl Encode<'_, D1> for bool
impl Encode<'_, D1> for bool
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for i8
impl Encode<'_, D1> for i8
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for i16
impl Encode<'_, D1> for i16
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for i32
impl Encode<'_, D1> for i32
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for u8
impl Encode<'_, D1> for u8
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for u16
impl Encode<'_, D1> for u16
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for u32
impl Encode<'_, D1> for u32
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for i64
impl Encode<'_, D1> for i64
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for f64
impl Encode<'_, D1> for f64
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for f32
impl Encode<'_, D1> for f32
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for &str
impl Encode<'_, D1> for &str
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for String
impl Encode<'_, D1> for String
Source§fn encode(self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode(self, buf: &mut Vec<Value>) -> 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 Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
Source§impl Encode<'_, D1> for &[u8]
impl Encode<'_, D1> for &[u8]
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for Vec<u8>
impl Encode<'_, D1> for Vec<u8>
Source§fn encode(self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode(self, buf: &mut Vec<Value>) -> 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 Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
Source§impl Encode<'_, D1> for Box<str>
impl Encode<'_, D1> for Box<str>
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for Arc<str>
impl Encode<'_, D1> for Arc<str>
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for Cow<'_, str>
impl Encode<'_, D1> for Cow<'_, str>
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for Box<[u8]>
impl Encode<'_, D1> for Box<[u8]>
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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<'_, D1> for Arc<[u8]>
impl Encode<'_, D1> for Arc<[u8]>
Source§fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
fn encode_by_ref(&self, buf: &mut Vec<Value>) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>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, T> Encode<'q, D1> for Option<T>
impl<'q, T> Encode<'q, D1> for Option<T>
fn produces(&self) -> Option<<D1 as Database>::TypeInfo>
Source§fn encode(
self,
buf: &mut <D1 as Database>::ArgumentBuffer,
) -> Result<IsNull, BoxDynError>
fn encode( self, buf: &mut <D1 as Database>::ArgumentBuffer, ) -> 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 <D1 as Database>::ArgumentBuffer,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <D1 as Database>::ArgumentBuffer, ) -> Result<IsNull, BoxDynError>
fn size_hint(&self) -> usize
Auto Trait Implementations§
impl Freeze for D1
impl RefUnwindSafe for D1
impl Send for D1
impl Sync for D1
impl Unpin for D1
impl UnsafeUnpin for D1
impl UnwindSafe for D1
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