3

I am using feathers-vuex and vue.js for the frontend and feathers.js with MySql db at the backend. I want to execute a search function on the front end which sends a query to the backend with the Op.like function. The backend however, does not recognize Op.like (Sent from the front end) or even $like. How do I get this to work?

I have tried to setup the find query using both "$like" and "[Op.like]" as follows

Option 1:

this.find(query: {"attribute": {"$like":"SearchTerm"}})

This returns the following error:

Invalid query parameter $like

Option 2:

this.find(query: {"attribute": {"[Op.like]":"SearchTerm"}})

This returns the following error:

Invalid query parameter '[Op.like]'

Option 3:

this.find(query: {"attribute": {[Op.like]:"SearchTerm"}})

This fails in Vue.js itself:

Error in render: "ReferenceError: Op is not defined"

How do I get the backend to return query results using the Op.like parameter? Is there something I need to do in the backend?

Thanks in advance!

ChelAdm
  • 41
  • 3

0 Answers0