Skip to content

Commit 54e70d2

Browse files
committed
documentation: add description of conn:close() and pool:close() methods
1 parent f08e732 commit 54e70d2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ Quote a query string.
170170
- `quoted_string` on success
171171
- `error(reason)` on error
172172

173+
### `conn:close()`
174+
175+
Close the individual connection or return it to a pool.
176+
177+
Throws an error on failure.
178+
179+
*Returns*: `true`
180+
173181
### `pool = mysql.pool_create(opts)`
174182

175183
Create a connection pool with count of size established connections.
@@ -216,6 +224,12 @@ Return a connection to connection pool.
216224

217225
- `conn` - a connection
218226

227+
### `pool:close()`
228+
229+
Close all connections in pool.
230+
231+
*Returns*: `true`
232+
219233
## Comments
220234

221235
All calls to connections api will be serialized, so it should to be safe to

0 commit comments

Comments
 (0)