You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. create a [`Pool`](/apidocs/norm/pool.html#Pool) instance by calling [`newPool`](/apidocs/norm/pool.html#newPool,Positive)
21
-
2. wrap your DB calls in a [`withDb`](/apidocs/norm/pool.html#withDb.t,Pool,untyped)
20
+
1. create a [`Pool`](/norm/apidocs/norm/pool.html#Pool) instance by calling [`newPool`](/norm/apidocs/norm/pool.html#newPool,Positive)
21
+
2. wrap your DB calls in a [`withDb`](/norm/apidocs/norm/pool.html#withDb.t,Pool,untyped)
22
22
23
-
`newPool` creates a pool of a given size with connections of type `DbConn` (either from [`sqlite`](/apidocs/norm/sqlite.html) or [`postgres`](/apidocs/norm/postgres.html)). The params for the connections are taken from the environment, similar to how `withDb` works (see [Configuration from Environment](/config.html)).
23
+
`newPool` creates a pool of a given size with connections of type `DbConn` (either from [`sqlite`](/norm/apidocs/norm/sqlite.html) or [`postgres`](/norm/apidocs/norm/postgres.html)). The params for the connections are taken from the environment, similar to how `withDb` works (see [Configuration from Environment](/config.html)).
24
24
"""
25
25
26
26
nbCode:
@@ -48,19 +48,19 @@ nbText: """
48
48
If the app requests more connections from the pool than it can give, we say the pool is exhausted.
49
49
50
50
There are two ways a pool can react to that:
51
-
1. raise a [`PoolExhaustedError`](/apidocs/norm/pool.html#PoolExhaustedError); this is the default policy
51
+
1. raise a [`PoolExhaustedError`](/norm/apidocs/norm/pool.html#PoolExhaustedError); this is the default policy
52
52
2. open an additional connection and extend the pool size
53
53
54
54
The policy is set during the pool creation by setting `poolExhaustedPolicy` param to either `pepRaise` or `pepExtend`.
55
55
56
-
To reset the pool back to its default size after it has been extended, call [`reset`](/apidocs/norm/pool.html#reset,Pool) proc on it.
56
+
To reset the pool back to its default size after it has been extended, call [`reset`](/norm/apidocs/norm/pool.html#reset,Pool) proc on it.
57
57
58
58
59
59
## Manual Pool Manipulation
60
60
61
-
You can borrow connections from the pool manually by calling [`pop`](/apidocs/norm/pool.html#add%2CPool%2CT) proc.
61
+
You can borrow connections from the pool manually by calling [`pop`](/norm/apidocs/norm/pool.html#add%2CPool%2CT) proc.
62
62
63
-
**Important** If you choose to get connections from the pool manually, you must care about putting the borrowed connections back byb calling [`add`](/apidocs/norm/pool.html#add,Pool,T).
63
+
**Important** If you choose to get connections from the pool manually, you must care about putting the borrowed connections back byb calling [`add`](/norm/apidocs/norm/pool.html#add,Pool,T).
64
64
"""
65
65
66
66
nbCode:
@@ -78,7 +78,7 @@ nbCode:
78
78
nbText: """
79
79
## Closing the Pool
80
80
81
-
When you no longer need the pool, for example, when your app exits or crashes, to avoid leaving hanging connections, close the pool by calling [`close`](/apidocs/norm/pool.html#close,Pool). This proc closes all connections in the pool and sets its size to 0.
81
+
When you no longer need the pool, for example, when your app exits or crashes, to avoid leaving hanging connections, close the pool by calling [`close`](/norm/apidocs/norm/pool.html#close,Pool). This proc closes all connections in the pool and sets its size to 0.
0 commit comments