[−][src]Struct diesel::prelude::PgConnection
The connection string expected by PgConnection::establish
should be a PostgreSQL connection string, as documented at
https://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING
Methods
impl PgConnection
[src]
pub fn build_transaction(&self) -> TransactionBuilder
[src]
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
impl Connection for PgConnection
[src]
type Backend = Pg
The backend this type connects to
type TransactionManager = AnsiTransactionManager
fn establish(database_url: &str) -> ConnectionResult<PgConnection>
[src]
fn transaction<T, E, F>(&self, f: F) -> Result<T, E> where
F: FnOnce() -> Result<T, E>,
E: From<Error>,
[src]
F: FnOnce() -> Result<T, E>,
E: From<Error>,
fn begin_test_transaction(&self) -> QueryResult<()>
[src]
fn test_transaction<T, E, F>(&self, f: F) -> T where
F: FnOnce() -> Result<T, E>,
E: Debug,
[src]
F: FnOnce() -> Result<T, E>,
E: Debug,
impl Send for PgConnection
[src]
impl SimpleConnection for PgConnection
[src]
fn batch_execute(&self, query: &str) -> QueryResult<()>
[src]
impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for PgConnection where
Changes: Copy + AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
Update<Changes, Changes>: LoadQuery<PgConnection, Output>,
[src]
Changes: Copy + AsChangeset<Target = <Changes as HasTable>::Table> + IntoUpdateTarget,
Update<Changes, Changes>: LoadQuery<PgConnection, Output>,
fn update_and_fetch(&self, changeset: Changes) -> QueryResult<Output>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PgConnection
impl !Sync for PgConnection
impl Unpin for PgConnection
impl UnwindSafe for PgConnection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
[src]
Self: AsExpression<T> + Sized,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,