We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66c03a1 commit 12151f5Copy full SHA for 12151f5
README.md
@@ -44,23 +44,22 @@ from typing import Any
44
from psqlpy import ConnectionPool, QueryResult
45
46
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
-
56
async def main() -> None:
+ db_pool = ConnectionPool(
+ username="postgres",
+ password="pg_password",
+ host="localhost",
+ port=5432,
+ db_name="postgres",
+ max_db_pool_size=2,
+ )
+
57
res: QueryResult = await db_pool.execute(
58
"SELECT * FROM users",
59
)
60
61
print(res.result())
62
- # You don't need to close Database Pool by yourself,
63
- # rust does it instead.
+ db_pool.close()
64
65
```
66
0 commit comments