Ok, I have a method with a few optional arguments like
def(username: Option[String], petname: Option[String], favouritefood: Option[String])
and I want to write a dynamic query that will be able to retrieve the data of certain arguments in a way
select * from table where un like username or pn like pn or ff like ff;
so depending on what arguments are defined to add them to the query with the OR operator?
source share