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]

[src]

Like Connection::prepare.

[src]

Like Connection::prepare_cached.

Note

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

[src]

Like Connection::execute.

[src]

Like Connection::query.

[src]

Like Connection::batch_execute.

[src]

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

Panics

Panics if there is an active nested transaction.

[src]

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

Panics

Panics if there is an active nested transaction.

[src]

Returns a reference to the Transaction's Connection.

[src]

Like Connection::is_active.

[src]

Alters the configuration of the active transaction.

[src]

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

[src]

Sets the transaction to commit at its completion.

[src]

Sets the transaction to roll back at its completion.

[src]

A convenience method which consumes and commits a transaction.

[src]

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]

[src]

Formats the value using the given formatter.

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

[src]

Executes the destructor for this type. Read more

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

[src]

Like Connection::execute.

[src]

Like Connection::query.

[src]

Like Connection::prepare.

[src]

Like Connection::prepare_cached.

[src]

Like Connection::transaction.

[src]

Like Connection::batch_execute.

[src]

Like Connection::is_active.