Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Fix reference to 'db' var #103

Merged
merged 1 commit into from
Mar 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modifying.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ code. Bad things might result:
* You could believe you're executing queries on a single connection, inside of a transaction, when in reality Go has created several connections for you invisibly and some statements aren't part of the transaction.

While you are working inside a transaction you should be careful not to make
calls to the `Db` variable. Make all of your calls to the `Tx` variable that you
created with `db.Begin()`. The `Db` is not in a transaction, only the `Tx` is.
calls to the `db` variable. Make all of your calls to the `Tx` variable that you
created with `db.Begin()`. `db` is not in a transaction, only the `Tx` object is.
If you make further calls to `db.Exec()` or similar, those will happen outside
the scope of your transaction, on other connections.

Expand Down