Still searching for a solution to this problem. I am attempting to pass an object with filters as keys and values.
ex.
const filters = {
'id': 12,
'first_name': john
}
function findBy(filter) {
return db('quotes')
.where(filter)
.orderBy('id');
}
I am working on making each where clause case insensitive using whereILike(). Any recommendations or solutions would be greatly appreciated!