In slick we can use
query.filter( m => (m.state === state1 && m.status === status1) || (m.state === state2 && m.status == status2))
While playing around with it, I finally found a way to do it:-
query.filter {
m => conditions.map(n => m._13 === n._1 && m._14 === n._2).reduceLeft(_ || _)
}
where conditions
is of the form List[(String,String)]
, m._13
maps to state and m._14
maps to status.
Hopefully this will help someone trying out same thing.