[−][src]Struct diesel::pg::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]
impl PgConnection
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 SimpleConnection for PgConnection
[src]
impl SimpleConnection for PgConnection
fn batch_execute(&self, query: &str) -> QueryResult<()> | [src] |
impl Connection for PgConnection
[src]
impl Connection for PgConnection
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 | [src] |
Executes the given function inside of a database transaction Read more
fn begin_test_transaction(&self) -> QueryResult<()> | [src] |
Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction. Read more
fn test_transaction<T, E, F>(&self, f: F) -> T where | [src] |
Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more
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]
impl<Changes, Output> UpdateAndFetchResults<Changes, Output> for PgConnection where
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] |
impl Send for PgConnection
[src]
impl Send for PgConnection
Auto Trait Implementations
impl !Sync for PgConnection
impl !Sync for PgConnection
Blanket Implementations
impl<T> IntoSql for T
[src]
impl<T> IntoSql for T
fn into_sql<T>(self) -> AsExprOf<Self, T> where | [src] |
Convert self
to an expression for Diesel's query builder. Read more
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where | [src] |
Convert &self
to an expression for Diesel's query builder. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |