[sqlalchemy] Adding OR () with do_orm_execute

2023-01-11 Thread Val Huber
I am using this and it is working well to AND a series of filters to a statement. But I do not see how to OR these into the original statement. For example, I have filters f1 and f2. I want the result to be: where AND (f1 OR f2). Thanks in advance, Val -- SQLAlchemy - The Python SQL

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