function mkInsert(table, fvPairs) {
  var _head, _fields, _values;
  _head = 'INSERT INTO ' + table + ' ';
  _fields = [];
  _values = [];
  _.each(fvPairs, function(value, key) {
    _fields.push(key);
    _values.push(value);
  });
  return _head + ' ' + mkFields(_fields) + ' ' + mkValues(_values) +
    'RETURNING *';
}
/**
 * Given a table name and an object with field/value pairs, construct a valid
 * SQL statement.
 *
 * @param {String} table - the target table for insertion
 * @param {Object} fvPairs - set of field/value pairs that to be inserted
 * @returns {String} string representation of SQL INSERT statement
 */
Given a table name and an object with field/value pairs, construct a valid
SQL statement.

@param {String} table - the target table for insertion
@param {Object} fvPairs - set of field/value pairs that to be inserted
@returns {String} string representation of SQL INSERT statement
Given a table name and an object with field / value pairs construct a valid SQL statement . @param { String } table - the target table for insertion @param { Object } fvPairs - set of field / value pairs that to be inserted @returns { String } string representation of SQL INSERT statement
function mkInsert(table, fvPairs) {
  var _head, _fields, _values;
  _head = 'INSERT INTO ' + table + ' ';
  _fields = [];
  _values = [];
  _.each(fvPairs, function(value, key) {
    _fields.push(key);
    _values.push(value);
  });
  return _head + ' ' + mkFields(_fields) + ' ' + mkValues(_values) +
    'RETURNING *';
}
function mkInsert ( table , fvPairs ) { var _head , _fields , _values ; _head = 'INSERT INTO ' + table + ' ' ; _fields = [ ] ; _values = [ ] ; _ . each ( fvPairs , function ( value , key ) { _fields . push ( key ) ; _values . push ( value ) ; } ) ; return _head + ' ' + mkFields ( _fields ) + ' ' + mkValues ( _values ) + 'RETURNING *' ; }
Given a table name and an object with field/value pairs, construct a valid
 SQL statement.
Given a table name and an object with field / value pairs construct a valid SQL statement .