Is it possible (how?) to build a select query programmatically in peewee? The point is to add .where() clauses as needed.
Asked
Active
Viewed 393 times
1 Answers
2
query = SomeThing.select()
if foo:
query = query.where(SomeThing.value == 'foo')
else:
query = query.where(...)

coleifer
- 24,887
- 6
- 60
- 75