Skip to content

Commit ecd5c7e

Browse files
committed
Update docs
1 parent f0a1d9f commit ecd5c7e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/queryable/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl Conn {
101101
}
102102
}
103103

104-
/// Methods of this trait used to execute database queries.
104+
/// Methods of this trait are used to execute database queries.
105105
pub trait Queryable: Send {
106106
/// Executes `COM_PING`.
107107
fn ping(&mut self) -> BoxFuture<'_, ()>;

src/queryable/transaction.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ impl fmt::Display for IsolationLevel {
121121

122122
/// This struct represents MySql transaction.
123123
///
124-
/// `Transaction` is just a sugar for `START TRANSACTION`, `ROLLBACK` and `COMMIT` queries, so one
125-
/// should note that it is easy to mess things up calling this queries manually. Also you will get
126-
/// `NestedTransaction` error if you call `transaction.start_transaction(_)`.
124+
/// `Transaction` is just a sugar for `START TRANSACTION`, `ROLLBACK` and `COMMIT` queries,
125+
/// so please note, that it is easy to mess things up calling this queries manually.
126+
///
127+
/// You should alwasy call either `commit` or `rollback`, otherwise transaction will be rolled
128+
/// back implicitly when corresponding connection is dropped or queried.
127129
#[derive(Debug)]
128130
pub struct Transaction<'a>(pub(crate) Connection<'a, 'static>);
129131

0 commit comments

Comments
 (0)