-
Notifications
You must be signed in to change notification settings - Fork 116
Update docs #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs #166
Conversation
lib/db_connection.ex
Outdated
@@ -804,19 +806,20 @@ defmodule DBConnection do | |||
### Options | |||
|
|||
See module documentation. The pool and connection module may support other | |||
options. All options are passed to `handle_status/2`. | |||
options. All options are passed to `c:handle_status/2`. | |||
|
|||
### Example | |||
|
|||
{:ok, conn, _result} = DBConnection.begin(pool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's neither DBConnection.begin
nor DBConnection.commit
below in the example, need to update this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be DBConnection.transaction
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there - without begin
/commit
, how would one use non-closure based transactions, with the new DBConnection.html.transaction/3? This is a follow up to #87, which is closed now. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not possible to have non-closure based transactions. It adds to many complications and possible failure scenarios, so we decided to not support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. Thank you for your reply, José!
lib/db_connection.ex
Outdated
@@ -134,7 +134,7 @@ defmodule DBConnection do | |||
|
|||
This callback is called when the control of the state is passed back | |||
to the connection process. It should reverse any changes made in | |||
`checkout/2`. | |||
`c:checkout/1`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should reverse any changes made in
checkout/1
as in, any changes made to the connection state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
❤️ 💚 💙 💛 💜 |
No description provided.