@@ -81,6 +81,8 @@ Install a database `Session` on the domain `d`.
81
81
82
82
Sessions accept the following options:
83
83
84
+ <img align =" right " src =" https://cloud.githubusercontent.com/assets/37303/12259904/985ef78a-b8cd-11e5-8665-0535caa69334.png " alt =" assets/event-flowchart.dot " />
85
+
84
86
* ` maxConcurrency ` : An integer specifying the maximum number of connections a
85
87
given session will make at a time. ` 0 ` is treated as ` Infinity ` . Defaults to
86
88
` Infinity ` . * Note:* this number is implicitly bound by the size of the ` pg `
@@ -99,21 +101,29 @@ Sessions accept the following options:
99
101
an optional ` err ` parameter that will be called when a connection is released
100
102
back to the session.
101
103
* ` onTransactionRequest(baton, operation, args) ` : A function accepting a baton,
102
- function, and array of arguments representing the request for a transaction
104
+ function, and array of arguments, representing the request for a transaction
103
105
session. Called coincident with ` onConnectionRequest ` .
104
106
* ` onTransactionStart(baton, operation, args) ` : A function accepting a baton,
105
- function, and array of arguments representing the fulfillment of a request
107
+ function, and array of arguments, representing the fulfillment of a request
106
108
for a transaction session. Called before ` BEGIN ` , coincident with
107
109
` onConnectionStart ` .
108
110
* ` onTransactionFinish(baton, operation, args, PromiseInspection) ` :
109
111
A function accepting a baton, function, array of arguments, and a
110
112
[ ` PromiseInspection ` ] [ bluebird-inspection ] representing the state of the
111
113
transaction. Called coincident with ` onConnectionFinish ` .
114
+ * ` onTransactionConnectionRequest(baton) ` : A function accepting a baton,
115
+ representing the request for a connection within a transaction session.
116
+ * ` onTransactionConnectionStart(baton) ` : A function accepting a baton,
117
+ representing the fulfillment of a request for a connection within a
118
+ transaction session.
119
+ * ` onTransactionConnectionFinish(baton, err) ` : A function accepting a baton
120
+ and an optional ` err ` argument, representing the completion of a transaction
121
+ connection within a transaction session.
112
122
* ` onAtomicRequest(baton, operation, args) ` : A function accepting a baton,
113
- function, and array of arguments representing the request for an atomic
123
+ function, and array of arguments, representing the request for an atomic
114
124
session.
115
125
* ` onAtomicStart(baton, operation, args) ` : A function accepting a baton,
116
- function, and array of arguments representing the fulfillment of a request
126
+ function, and array of arguments, representing the fulfillment of a request
117
127
for an atomic session.
118
128
* ` onAtomicFinish(baton, operation, args, PromiseInspection) ` :
119
129
A function accepting a baton, function, array of arguments, and a
0 commit comments