Answer the question
In order to leave comments, you need to log in
Can you help me figure out things that are not fully understood from the Gino documentation?
Maybe there are Gino connoisseurs here? Gino hasn't received an email from the developers yet
- it's an orm using the asyncpg driver based on sqlalchemy. And the developers adhered to the idea of not changing the principles of sqlalchemy I will
copy my question:
1) What are the differences between
import sqlalchemy
async def main():
engine = await sqlalchemy.create_engine('postgresql://... , strategy='gino')
import gino
async def main():
engine = await gino.create_engine('postgresql://...)
async with db.with_bind('postgresql://localhost/mydb') as engine:
await db.gino.create_all()
await User.create(name='jack', fullname='Jack Jones')
async with engine.acquire() as conn1
async with engine.acquire() as conn2
async with engine.acquire() as conn3 ...
async with engine.acquire() as conn1:
await inner(conn1)
async def inner()
async with engine.acquire() as conn2
async with engine.acquire() as conn
await User.create(name='jack')
await User.create(name='jane')
await User.create(name='james')
async with engine.acquire() as conn1
async with engine.acquire() as conn2
async with engine.acquire() as conn3 ...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question