Can I chain where clauses conditionally?
Can I chain where clauses conditionally? Question: I’m using Peewee as ORM extensively and within my DAO API layer I need to conditionally make a query narrower e.g. query = UserModel.select().where(UserModel.last_name == last_name) if first_name is not None: query = query.where(UserModel.first_name == first_name) # … more conditions then df = pd.DataFrame(query.dicts()) is this the most …