In both examples you call 2 close functions. What is the reason for this?
What is a good practice to init the engine? Shall I init the engine every time I want to run a query and then call the 2 close functions?
Or shall I init the engine just once and close the engine when my app terminates ?
Describe the solution you'd like
Add more detailed examples
Describe alternatives you've considered
The library is very similar to sqlalchemy, I like it. I was not hard to migrate to an async driver.
Maybe add a migration guide from sqlalchemy to aiomysql.
Also, some sqlalchemy functions are not available, like one_or_none. But I read that fetchone returns None so I will use that
Additional context
No response
Code of Conduct
[X] I agree to follow the aio-libs Code of Conduct
Is your feature request related to a problem?
In your example at https://github.com/aio-libs/aiomysql#example-of-sqlalchemy-optional-integration you acquire a connection but in the documentation at https://aiomysql.readthedocs.io/en/stable/sa.html you also create a transaction and commit. Which os the correct one to use?
In both examples you call 2 close functions. What is the reason for this?
What is a good practice to init the engine? Shall I init the engine every time I want to run a query and then call the 2 close functions? Or shall I init the engine just once and close the engine when my app terminates ?
Describe the solution you'd like
Add more detailed examples
Describe alternatives you've considered
The library is very similar to sqlalchemy, I like it. I was not hard to migrate to an async driver. Maybe add a migration guide from sqlalchemy to aiomysql. Also, some sqlalchemy functions are not available, like one_or_none. But I read that fetchone returns None so I will use that
Additional context
No response
Code of Conduct