node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey ยป


The original documentation is here []

Added functionality for ON DUPLICATE KEY UPDATE option for mysql insert


// INSERT INTO test (f1, f2, f3, f4, f5) VALUES (1, 1.2, TRUE, "blah", NULL) ON DUPLICATE KEY UPDATE f2=1.2, f4="blah"
    .set("f1", 1)
    .set("f2", 1.2, { duplicateKeyUpdate: true })
    .set("f3", true)
    .set("f4", "blah", { duplicateKeyUpdate: true })
    .set("f5", null)