title: knex select result return to a variable
body: <p>I need to get <code>knex</code> select query result to a variable.</p>
  
  <pre><code>function getUserPlanDetailsWithOutCb(user_id) {
   var dataArr =[];
   knex('user_plans').select('*').where({ 'user_id': user_id }).then(function(result) {
       result.forEach(function(value) {
          dataArr.push(value)
       });
   //return dataArr;
   });
   return dataArr;
  }
  
   var result = getUserPlanDetailsWithOutCb(12);
  </code></pre>
  
  <p>I have tried return value outside and inside of the call back in <code>knex</code>. For above code i got the result as <strong>[ ]</strong> 
  For second one <code>(return inside callback)</code> i got the result as </p>
  
  <pre><code>{
     "isFulfilled": false,
     "isRejected": false
  }
  </code></pre>