title: Feathers: Customizing find() for two different queries
body: <p>I'm using FeathersJS and ReactJs to build an application and now I am stuck in a certain point.</p>
  
  <p>The user interface I'm working on is a table and I have a navigation bar to control the data exhibited, like in the image.</p>
  
  <p><a href="https://i.stack.imgur.com/mEY2O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mEY2O.png" alt="My user interface"></a></p>
  
  <p>In the select users may choose how many results they are going to see in a page. The navigation buttons move among different pages. Every time one of these thing change I calculate</p>
  
  <pre><code>let skip = (this.state.page - 1) * this.state.limit;
  let url = '/users?$sort[name]=1&amp;$skip=' + skip + '&amp;$limit=' + this.state.limit;
  </code></pre>
  
  <p>and then make a REST call to Feathers backend. This is working perfectly well.</p>
  
  <p>The red arrow indicates my problem.</p>
  
  <p>When the user types part of a name in this input field I need to search the Users table to find all users with the typed string in the name, whatever the position and preferably case insensitive. In this case I am creating an url like</p>
  
  <pre><code>let url = '/users?name=&lt;typed input'&gt;;
  </code></pre>
  
  <p>and then making the REST call.</p>
  
  <p>It happens that this call will try to find a name equal to , and this is not what I need. Then I am assuming I'll have to customize my find() method to perform differently when it receives the two different sets of parameters, like in </p>
  
  <h3>users.class.js</h3>
  
  <pre><code>const { Service } = require('feathers-sequelize');
  
  exports.Users = class Users extends Service {
      find(data,params) {
          if (data.query.name) {
              // Do something to get the search I need
          }
          return super.find(data,params);
      }
  };
  </code></pre>
  
  <p>But I really don't know to proceed from this point on.</p>
  
  <p>Should I implement a Sequelize raw query inside this <code>if</code>? What would be the best way to get the data I need?</p>