We can apply a simple query filter in vapor with:
// User is my model object connecting corresponding MySQL database table
let aUser = try User.query().filter("user_email", "asd@example.com")
How can we chain multiple query filters with AND or OR conditions like we do in SQL queries?
Say for example, if we need to join filter("user_email", "asd@example.com")
and filter("user_password", "123456")
with an AND
condition, how can we achieve that?