with FooOrm.transaction() as conn:
FooOrm.query.one(connection=conn)
Because .one doesn't take kwargs so you can't pass connection to it.
Implementing this will actually be harder than it looks since most of the read methods just create an iterator and they don't actually make the query until you start iterating or whatnot, so there might need to be some rethinking on how this is done, like creating the cursor and passing the cursor into the iterator or something like that.
This doesn't work:
Because
.one
doesn't takekwargs
so you can't pass connection to it.Implementing this will actually be harder than it looks since most of the read methods just create an iterator and they don't actually make the query until you start iterating or whatnot, so there might need to be some rethinking on how this is done, like creating the cursor and passing the cursor into the iterator or something like that.