~takeda


#60 asyncpg support 4 years ago

Comment by ~takeda on ~olly/yoyo

Sorry, the last sentence supposed to be, the prior one was confusing: "What I initially proposed would make the async driver ugly looking, and any future async ones would still need to do the same amount of work. That's why I think the current approach is better"

#60 asyncpg support 4 years ago

Comment by ~takeda on ~olly/yoyo

After looking more into it, seems like the proper way would be actually to make the migration code async. That way adding other async drivers would be easier in the future, and the sync code simply just wouldn't be using await. This would require me to update existing drivers (probably the only change would be to change some "def" to "async def". The synchronous driver should continue to work, and basically not using "await" will equate to a synchronous call. Does that sound reasonable? What I initially proposed will make the async driver ugly looking, and any future ones will still need to do the same amount of work.

#60 asyncpg support 4 years ago

Comment by ~takeda on ~olly/yoyo

I can work on creating this, although I'm not yet familar with the code base. Since yoyo doesn't really need to perform its work asynchronously, it could still just invoke operations synchronously through asyncio.run().

The biggest reason for adding this driver is so applications that want to use it don't have to depend on asyncpg and psycopg2.

#60 asyncpg support 4 years ago

Ticket created by ~takeda on ~olly/yoyo

Is there a possibility for yoyo-migrations to support asyncpg backend?