I have an input form with 3 input fields. The user can choose to fill between 1 and 3 of the input fields. I am generating a SQL alchemy query based on their input. If the user has not filled out a field, then it should not be part of the criteria for the query.
I suppose I could write code with 7 branches -- with a SQL alchemy query for each possible query (ex. if user has filled out fields 2 and 3 but not 1, then query looks like this...).
But I would think there would be a way to programmatically generate a SQL alchemy statement to avoid this sort of complex branching. Is there such a method?