pub struct InTransactionPostgresBackend<'a> { /* private fields */ }Expand description
A Postgres Backend that wraps a borrowed connection.
This backend is neither Sync nor Send.
Available if the features “state-merkle-sql-in-transaction” “postgres” are enabled.
Implementations§
Source§impl<'a> InTransactionPostgresBackend<'a>
impl<'a> InTransactionPostgresBackend<'a>
Sourcepub fn new(connection: &'a PgConnection) -> Self
pub fn new(connection: &'a PgConnection) -> Self
Wrap a reference to a diesel::pg::PgConnection.
Trait Implementations§
Source§impl<'a> Backend for InTransactionPostgresBackend<'a>
Available on crate feature state-merkle-sql-in-transaction only.
impl<'a> Backend for InTransactionPostgresBackend<'a>
Available on crate feature
state-merkle-sql-in-transaction only.Source§type Connection = BorrowedPostgresConnection<'a>
type Connection = BorrowedPostgresConnection<'a>
The database connection.
Source§fn connection(&self) -> Result<Self::Connection, InternalError>
fn connection(&self) -> Result<Self::Connection, InternalError>
Acquire a database connection. Read more
Source§impl<'a> Execute for InTransactionPostgresBackend<'a>
Available on crate feature state-merkle-sql-in-transaction only.
impl<'a> Execute for InTransactionPostgresBackend<'a>
Available on crate feature
state-merkle-sql-in-transaction only.fn execute<F, T>(&self, f: F) -> Result<T, InternalError>
Source§impl<'a> From<&'a PgConnection> for InTransactionPostgresBackend<'a>
Available on crate feature state-merkle-sql-in-transaction only.
impl<'a> From<&'a PgConnection> for InTransactionPostgresBackend<'a>
Available on crate feature
state-merkle-sql-in-transaction only.Source§fn from(conn: &'a PgConnection) -> Self
fn from(conn: &'a PgConnection) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for InTransactionPostgresBackend<'a>
impl<'a> !Send for InTransactionPostgresBackend<'a>
impl<'a> !Sync for InTransactionPostgresBackend<'a>
impl<'a> !UnwindSafe for InTransactionPostgresBackend<'a>
impl<'a> Freeze for InTransactionPostgresBackend<'a>
impl<'a> Unpin for InTransactionPostgresBackend<'a>
impl<'a> UnsafeUnpin for InTransactionPostgresBackend<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self to an expression for Diesel’s query builder. Read more