pub struct Premix;Implementations§
Source§impl Premix
impl Premix
pub fn detect_runtime_profile() -> RuntimeProfile
pub fn sqlite_pool_options(profile: RuntimeProfile) -> PoolOptions<Sqlite>
pub fn postgres_pool_options(profile: RuntimeProfile) -> PoolOptions<Postgres>
pub async fn smart_sqlite_pool( database_url: &str, ) -> Result<Pool<Sqlite>, Error>
pub async fn smart_sqlite_pool_with_profile( database_url: &str, profile: RuntimeProfile, ) -> Result<Pool<Sqlite>, Error>
pub async fn smart_postgres_pool( database_url: &str, ) -> Result<Pool<Postgres>, Error>
pub async fn smart_postgres_pool_with_profile( database_url: &str, profile: RuntimeProfile, ) -> Result<Pool<Postgres>, Error>
pub fn raw<'q>(sql: &'q str) -> RawQuery<'q>
pub async fn sync<DB, M>(pool: &Pool<DB>) -> Result<(), Error>where
DB: SqlDialect,
M: Model<DB>,
<DB as Database>::Arguments<'q>: for<'q> IntoArguments<'q, DB>,
&'c mut <DB as Database>::Connection: for<'c> Executor<'c, Database = DB>,
&'c str: for<'c> ColumnIndex<<DB as Database>::Row>,
Auto Trait Implementations§
impl Freeze for Premix
impl RefUnwindSafe for Premix
impl Send for Premix
impl Sync for Premix
impl Unpin for Premix
impl UnwindSafe for Premix
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