index.js
function mkInsert(table, obj) {
  const ks = Object.keys(obj).map(x => `\`${x}\``);
  const vs = Object.values(obj).map(toMysqlObj);

  return `INSERT INTO \`${table}\`(${ks}) VALUES(${vs})`;
}
function mkInsert(table, obj) {
  const ks = Object.keys(obj).map(x => `\`${x}\``);
  const vs = Object.values(obj).map(toMysqlObj);

  return `INSERT INTO \`${table}\`(${ks}) VALUES(${vs})`;
}
function mkInsert ( table , obj ) { const ks = Object . keys ( obj ) . map ( x => ` \` ${ x } \` ` ) ; const vs = Object . values ( obj ) . map ( toMysqlObj ) ; return ` \` ${ table } \` ${ ks } ${ vs } ` ; }
INSERT is the simplest operation, because there is no WHERE part in it.
@param {Object} obj - Object like { name: "Abc", age: 15 }.
@returns {string} - e.g. "INSERT INTO X(name, age) VALUES('Abc', 15)"
INSERT is the simplest operation because there is no WHERE part in it .