pub struct D1ConnectOptions { /* private fields */ }
Expand description
Implementations§
Source§impl D1ConnectOptions
impl D1ConnectOptions
pub fn new(d1: D1Database) -> D1ConnectOptions
pub async fn connect(self) -> Result<D1Connection, D1Error>
Source§impl D1ConnectOptions
impl D1ConnectOptions
pub fn case_sensitive_like(self, yes: bool) -> D1ConnectOptions
pub fn ignore_check_constraint(self, yes: bool) -> D1ConnectOptions
pub fn legacy_alter_table(self, yes: bool) -> D1ConnectOptions
pub fn recursive_triggers(self, yes: bool) -> D1ConnectOptions
pub fn unordered_selects(self, yes: bool) -> D1ConnectOptions
pub fn foreign_keys(self, yes: bool) -> D1ConnectOptions
pub fn defer_foreign_keys(self, yes: bool) -> D1ConnectOptions
Trait Implementations§
Source§impl Clone for D1ConnectOptions
impl Clone for D1ConnectOptions
Source§fn clone(&self) -> D1ConnectOptions
fn clone(&self) -> D1ConnectOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ConnectOptions for D1ConnectOptions
impl ConnectOptions for D1ConnectOptions
type Connection = D1Connection
Source§fn from_url(_url: &Url) -> Result<D1ConnectOptions, Error>
fn from_url(_url: &Url) -> Result<D1ConnectOptions, Error>
Parse the
ConnectOptions
from a URL.Source§fn to_url_lossy(&self) -> Url
fn to_url_lossy(&self) -> Url
Get a connection URL that may be used to connect to the same database as this
ConnectOptions
. Read moreSource§fn connect(
&self,
) -> Pin<Box<dyn Future<Output = Result<<D1ConnectOptions as ConnectOptions>::Connection, Error>> + Send + '_>>
fn connect( &self, ) -> Pin<Box<dyn Future<Output = Result<<D1ConnectOptions as ConnectOptions>::Connection, Error>> + Send + '_>>
Establish a new database connection with the options specified by
self
.Source§fn log_statements(self, _: LevelFilter) -> D1ConnectOptions
fn log_statements(self, _: LevelFilter) -> D1ConnectOptions
Log executed statements with the specified
level
Source§fn log_slow_statements(self, _: LevelFilter, _: Duration) -> D1ConnectOptions
fn log_slow_statements(self, _: LevelFilter, _: Duration) -> D1ConnectOptions
Log executed statements with a duration above the specified
duration
at the specified level
.Source§fn disable_statement_logging(self) -> Self
fn disable_statement_logging(self) -> Self
Entirely disables statement logging (both slow and regular).
Source§impl Debug for D1ConnectOptions
impl Debug for D1ConnectOptions
Source§impl FromStr for D1ConnectOptions
impl FromStr for D1ConnectOptions
impl Send for D1ConnectOptions
impl Sync for D1ConnectOptions
Auto Trait Implementations§
impl Freeze for D1ConnectOptions
impl RefUnwindSafe for D1ConnectOptions
impl Unpin for D1ConnectOptions
impl UnwindSafe for D1ConnectOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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