Skip to content

Commit a85322a

Browse files
authored
Merge pull request #214 from moigagoo/bugfix/fix_apidocs_links_213
Docs: Pool: Fix apidocs links.
2 parents f3c631a + e659c1e commit a85322a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

book/pool.nim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Norm offers a simple thread-safe connection pool implementation. It can be used
1717
**Important** Connection pooling requires `--mm:orc`.
1818
1919
To use connection pool:
20-
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)
2222
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)).
2424
"""
2525

2626
nbCode:
@@ -48,19 +48,19 @@ nbText: """
4848
If the app requests more connections from the pool than it can give, we say the pool is exhausted.
4949
5050
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
5252
2. open an additional connection and extend the pool size
5353
5454
The policy is set during the pool creation by setting `poolExhaustedPolicy` param to either `pepRaise` or `pepExtend`.
5555
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.
5757
5858
5959
## Manual Pool Manipulation
6060
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.
6262
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).
6464
"""
6565

6666
nbCode:
@@ -78,7 +78,7 @@ nbCode:
7878
nbText: """
7979
## Closing the Pool
8080
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.
8282
"""
8383

8484
nbCode:

0 commit comments

Comments
 (0)