Skip to content

Commit 12151f5

Browse files
committed
Small changes in README
Signed-off-by: chandr-andr (Kiselev Aleksandr) <[email protected]>
1 parent 66c03a1 commit 12151f5

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,22 @@ from typing import Any
4444
from psqlpy import ConnectionPool, QueryResult
4545

4646

47-
db_pool = ConnectionPool(
48-
username="postgres",
49-
password="pg_password",
50-
host="localhost",
51-
port=5432,
52-
db_name="postgres",
53-
max_db_pool_size=2,
54-
)
55-
5647
async def main() -> None:
48+
db_pool = ConnectionPool(
49+
username="postgres",
50+
password="pg_password",
51+
host="localhost",
52+
port=5432,
53+
db_name="postgres",
54+
max_db_pool_size=2,
55+
)
56+
5757
res: QueryResult = await db_pool.execute(
5858
"SELECT * FROM users",
5959
)
6060

6161
print(res.result())
62-
# You don't need to close Database Pool by yourself,
63-
# rust does it instead.
62+
db_pool.close()
6463

6564
```
6665

0 commit comments

Comments
 (0)