Migration Guide¶
Migrating from v1 to v2¶
-
Update Imports
-
Update Connection Method
-
Update Error Attributes
-
Use New Features
# v2 new: URL connection engine = Engine(url="mysql://root:pass@127.0.0.1:3306/") # v2 new: Streaming query async for row in engine.execute("SELECT * FROM large_table", stream=True): process(row) # v2 new: Custom result type async with engine.execute("SELECT * FROM users", result_class=dict) as result: users = await result.fetch_all()