function mkWhere(conjunction) {
  var _where = '';
  if(Object.keys(conjunction).length > 0) {
    _where = _.map(conjunction, function(value, key) {
      var _key, _value;
      _key = Object.keys(value)[0];
      _value = value[_key];
      _value = typeof _value === 'number' ? _value : '\'' + _value + '\'';
      return key + _key + _value;
    }).join(' AND ');
    _where = 'WHERE (' + _where + ')';
  }
  return _where;
}
/**
 * Form a valid SQL WHERE clause given a set of field/value pairs. Assumes
 * equality comparison.
 *
 * @param {Object} conjunction - field/value pairs to build a conjunction
 * @returns {String} string representation of SQL WHERE conjunction clause
 */
Form a valid SQL WHERE clause given a set of field/value pairs. Assumes
equality comparison.

@param {Object} conjunction - field/value pairs to build a conjunction
@returns {String} string representation of SQL WHERE conjunction clause
Form a valid SQL WHERE clause given a set of field / value pairs . Assumes equality comparison . @param { Object } conjunction - field / value pairs to build a conjunction @returns { String } string representation of SQL WHERE conjunction clause
function mkWhere(conjunction) {
  var _where = '';
  if(Object.keys(conjunction).length > 0) {
    _where = _.map(conjunction, function(value, key) {
      var _key, _value;
      _key = Object.keys(value)[0];
      _value = value[_key];
      _value = typeof _value === 'number' ? _value : '\'' + _value + '\'';
      return key + _key + _value;
    }).join(' AND ');
    _where = 'WHERE (' + _where + ')';
  }
  return _where;
}
function mkWhere ( conjunction ) { var _where = '' ; if ( Object . keys ( conjunction ) . length > 0 ) { _where = _ . map ( conjunction , function ( value , key ) { var _key , _value ; _key = Object . keys ( value ) [ 0 ] ; _value = value [ _key ] ; _value = typeof _value === 'number' ? _value : '\'' + _value + '\'' ; return key + _key + _value ; } ) . join ( ' AND ' ) ; _where = 'WHERE (' + _where + ')' ; } return _where ; }
Form a valid SQL WHERE clause given a set of field/value pairs.
Form a valid SQL WHERE clause given a set of field / value pairs .