does it suport mysql? i run the demo , it told me AttributeError: 'MySQLDialect_mysqldb' object has no attribute 'init_pool'
here is the code:
import asyncio
from gino import Gino
db = Gino()
async def main():
# await db.set_bind('asyncpg://root:[email protected]:3306/api')
await db.set_bind('mysql://root:[email protected]:3306/api')
asyncio.get_event_loop().run_until_complete(main())
While it's definitely possible to support MySQL, we need serious work to achieve that.
Sorry, but I can't see it happening soon.
If anyone is interested in a PR, I'm very glad to review.
You could use https://github.com/aio-libs/aiomysql to achieve this, just like you lads are currently using asyncpg for postgres.
@infin1tyy Yes! Thanks for the clue. I believe Paul from Gitter was trying to add SQLite support too. These new dialects should be expected in GINO 1.1 or later.
@infin1tyy Yes! Thanks for the clue. I believe Paul from Gitter was trying to add SQLite support too. These new dialects should be expected in GINO 1.1 or later.
My pleasure 馃槀 I'll be patiently waiting for v1.1 then :)
https://github.com/jreese/aiosqlite for SQLite.
Is there any update plan for mysql support?
@zhujinhe sorry, no we didn't have any contribution to support MySQL by far. PRs are more than welcome!
Update: I gave a try lately, and it turned out to be not difficult. But it does take more time to make the code compatible with both databases, especially tests. Likely I'll have a draft PR soon.
I'm working on GINO 2 for SQLAlchemy 1.4 / 2.0 here: https://github.com/python-gino/gino/commits/v2.0.x. This is, for now, a rewrite from scratch, but it will merge code from GINO 1.x once the foundation is ready.
Now the code has both PostgreSQL/asyncpg and MySQL/aiomysql support. It might be helpful for the MySQL support in GINO 1.1 here.
Sorry for being dormant. have been distracted by others lately.
I have my branch to get basic works, but there are more nuances than I expected to fix. I'm doing it by "adding" features via fixing tests.
I'll say it's around 60~70% on the way. If anyone has time, can also help to submit PR there or branch from it.
Most helpful comment
Update: I gave a try lately, and it turned out to be not difficult. But it does take more time to make the code compatible with both databases, especially tests. Likely I'll have a draft PR soon.