Struct limiting_factor::database::DatabaseConnection [−][src]
pub struct DatabaseConnection(pub PooledConnection<ConnectionManager<PgConnection>>);
Expand description
Represents an established working database connection from the pool
Tuple Fields
0: PooledConnection<ConnectionManager<PgConnection>>
Methods from Deref<Target = PgConnection>
Build a transaction, specifying additional details such as isolation level
See TransactionBuilder
for more examples.
conn.build_transaction()
.read_only()
.serializable()
.deferrable()
.run(|| Ok(()))
Trait Implementations
type Target = PgConnection
type Target = PgConnection
The resulting type after dereferencing.
Derives an instance of Self
from the incoming request metadata. Read more
Auto Trait Implementations
impl !RefUnwindSafe for DatabaseConnection
impl Send for DatabaseConnection
impl !Sync for DatabaseConnection
impl Unpin for DatabaseConnection
impl !UnwindSafe for DatabaseConnection
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more