Skip to content
Advertisement

Tag: objection.js

How to add dynamic Where queries in objection.js?

I have a table which has a global search bar that needs to trigger search for all fields like firstName, lastName, email and role. Also have a dynamic filter which can have single or multiple filter like “firstName” or/And “lastName” Obviously they need to be paginated. For pagination i can use Model.query().page(1, 10) But how to supply search or filter.

Advertisement