pub struct Transaction<T>(_);
Expand description

This struct represents MySql transaction.

Transaction it’s a sugar for START TRANSACTION, ROLLBACK and COMMIT queries, so one should note that it is easy to mess things up calling this queries manually. Also you will get NestedTransaction error if you call transaction.start_transaction(_).

Implementations§

Returns future that will perform COMMIT query and resolve to a wrapped Queryable.

Returns future that will perform ROLLBACK query and resolve to a wrapped Queryable.

Trait Implementations§

Returns future that resolves to Conn if COM_PING executed successfully.
Returns future that disconnects this connection from a server.
Returns future that performs query.
Returns future that resolves to a first row of result of a query execution (if any). Read more
Returns future that performs query. Result will be dropped.
Returns future that prepares statement.
Returns future that prepares and executes statement in one pass.
Returns future that resolves to a first row of result of a statement execution (if any). Read more
Returns future that prepares and executes statement. Result will be dropped.
Returns future that prepares statement and performs batch execution. Results will be dropped. Read more
Returns future that starts transaction.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.