How To Nest Conjunctions Or_ And And_ In Sqlalchamey
I'm tyring to recreate this query in SQL Alchamey but I've been unable to nest the filters: Query: SELECT * FROM calendar where (recurrenceRule = '') or (recurrenceRule != '' and
Solution 1:
You must use and_
explicitly:
events.filter(or_(
Calendar.recurrenceRule!='',
and_(Calendar.recurrenceRule=='', Calendar.start>=filterStart))
)
Post a Comment for "How To Nest Conjunctions Or_ And And_ In Sqlalchamey"