Re: [sqlalchemy] Determine transaction after_flush state

2023-01-12 Thread Mike Bayer
it means the Session is in the middle of the "flush()" method. it's a boolean state. when flush() is over, it turns back off. On Wed, Jan 11, 2023, at 9:27 PM, Val Huber wrote: > Sounds like *session._flushing* is exactly what I want… presuming it means “I > have started flushing, in fact may

Re: [sqlalchemy] Determine transaction after_flush state

2023-01-11 Thread Val Huber
Sounds like session._flushing is exactly what I want… presuming it means “I have started flushing, in fact may have flushed any number of times”. Thanks for the again-quick response, if my presumption is correct, I am all set. Regards, Val > On Jan 11, 2023, at 6:22 PM, Mike Bayer > wrote: >

Re: [sqlalchemy] Determine transaction after_flush state

2023-01-11 Thread Mike Bayer
a session can flush any number of times, so what here determines "after" flush state as far as do_orm_execute()? do_orm_execute is not called within the flush itself (well, maybe it is...) If you see do_orm_executes inside of the flush, I guess you could look at session._flushing, is that

[sqlalchemy] Determine transaction after_flush state

2023-01-11 Thread Val Huber
In API Logic Server, clients can make RESTful requests that cause SQLAlchemy reads. These are subjected to authorization security using do_orm_execute (which is amazing, by the way). These add filters to ensure proper access. This is all fine. But, when the client makes changes, these