if you have a select() construct, you can add new AND things just calling .where() again. e.g. existing_statement.where(or_(f1, f2)) .
On Wed, Jan 11, 2023, at 11:26 PM, Val Huber wrote: > 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 <original-statement> AND (f1 OR f2). > > Thanks in advance, > Val > > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/69c0c26f-812c-4c0f-b435-c4903ffdf57dn%40googlegroups.com > > <https://groups.google.com/d/msgid/sqlalchemy/69c0c26f-812c-4c0f-b435-c4903ffdf57dn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/f85048a8-51db-4eb4-9781-b40d1e0a6dee%40app.fastmail.com.
