code: function convertParamValues(parsedSql, values) {
      var ret = [];
      _.each(parsedSql.params, function(param) {
        if( !_.has(values, param.name) ) {
          throw new Error("No value found for parameter: " + param.name);
        }
        ret.push(values[param.name]);
      });
      return ret;
    }
docs: Converts parameter values from object to an array. Parameter value
  indexes come from the parsedSql object and a given parameter may
  appear in multiple positions.