pub enum DatabaseBackend {
MySql,
Postgres,
Sqlite,
}
Expand description
The type of database backend for real world databases. This is enabled by feature flags as specified in the crate documentation
Variantsยง
Implementationsยง
Sourceยงimpl DatabaseBackend
impl DatabaseBackend
Sourcepub fn is_prefix_of(self, base_url: &str) -> bool
pub fn is_prefix_of(self, base_url: &str) -> bool
Check if the URI is the same as the specified database backend. Returns true if they match.
ยงPanics
Panics if base_url
cannot be parsed as Url
.
Sourcepub fn build<S>(&self, statement: &S) -> Statementwhere
S: StatementBuilder,
pub fn build<S>(&self, statement: &S) -> Statementwhere
S: StatementBuilder,
Build an SQL Statement
Sourcepub fn get_query_builder(&self) -> Box<dyn QueryBuilder>
pub fn get_query_builder(&self) -> Box<dyn QueryBuilder>
A helper for building SQL queries
Sourcepub fn support_returning(&self) -> bool
pub fn support_returning(&self) -> bool
Check if the database supports RETURNING
syntax on insert and update
Trait Implementationsยง
Sourceยงimpl Clone for DatabaseBackend
impl Clone for DatabaseBackend
Sourceยงfn clone(&self) -> DatabaseBackend
fn clone(&self) -> DatabaseBackend
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 Debug for DatabaseBackend
impl Debug for DatabaseBackend
Sourceยงimpl PartialEq for DatabaseBackend
impl PartialEq for DatabaseBackend
impl Copy for DatabaseBackend
impl Eq for DatabaseBackend
impl StructuralPartialEq for DatabaseBackend
Auto Trait Implementationsยง
impl Freeze for DatabaseBackend
impl RefUnwindSafe for DatabaseBackend
impl Send for DatabaseBackend
impl Sync for DatabaseBackend
impl Unpin for DatabaseBackend
impl UnwindSafe for DatabaseBackend
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ยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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