Struct postgres::transaction::Transaction [] [src]

pub struct Transaction<'conn> { /* fields omitted */ }

A transaction on a database connection.

The transaction will roll back by default.

Methods

impl<'conn> Transaction<'conn>
[src]

Like Connection::prepare.

Like Connection::prepare_cached.

Note that the statement will be cached for the duration of the connection, not just the duration of this transaction.

Like Connection::execute.

Like Connection::query.

Like Connection::batch_execute.

Like Connection::transaction, but creates a nested transaction via a savepoint.

Panics

Panics if there is an active nested transaction.

Like Connection::transaction, but creates a nested transaction via a savepoint with the specified name.

Panics

Panics if there is an active nested transaction.

Returns a reference to the Transaction's Connection.

Like Connection::is_active.

Alters the configuration of the active transaction.

Determines if the transaction is currently set to commit or roll back.

Sets the transaction to commit at its completion.

Sets the transaction to roll back at its completion.

A convenience method which consumes and commits a transaction.

Consumes the transaction, commiting or rolling it back as appropriate.

Functionally equivalent to the Drop implementation of Transaction except that it returns any error to the caller.

Trait Implementations

impl<'a> Debug for Transaction<'a>
[src]

Formats the value using the given formatter.

impl<'conn> Drop for Transaction<'conn>
[src]

A method called when the value goes out of scope. Read more

impl<'a> GenericConnection for Transaction<'a>
[src]

Like Connection::execute.

Like Connection::query.

Like Connection::prepare.

Like Connection::prepare_cached.

Like Connection::transaction.

Like Connection::batch_execute.

Like Connection::is_active.