Struct diesel::prelude::PgConnection [] [src]

pub struct PgConnection { /* fields omitted */ }

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]

[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 Send for PgConnection
[src]

impl SimpleConnection for PgConnection
[src]

[src]

Execute multiple SQL statements within the same string. Read more

impl Connection for PgConnection
[src]

The backend this type connects to

[src]

Establishes a new connection to the database Read more

[src]

Executes the given function inside of a database transaction Read more

[src]

Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction. Read more

[src]

Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more

Auto Trait Implementations

impl !Sync for PgConnection