Changes for test/statement/insert.js: 3 added lines, 4 removed lines.
Original line number
Diff line number
Diff line
@@ -121,14 +121,13 @@ describe('Insert', function () {
it('should handle onConflictUpdate option with multiple fields and conflict keys and additional excluded fields',function (){
constresult=newInsert(source,{
field1:'value1',
object:'value2',
created_by:'value3'
object:'value2'
},{
onConflictUpdate:['id','field2'],
onConflictUpdateExclude:['created_by']
onConflictUpdateExclude:['object']
});
assert.equal(result.format(),'INSERT INTO "testsource" ("field1", "object") VALUES ($1, $2) ON CONFLICT ("id", "field2") DO UPDATE SET "field1" = EXCLUDED."field1", "object" = EXCLUDED."object" RETURNING *');
assert.equal(result.format(),'INSERT INTO "testsource" ("field1", "object") VALUES ($1, $2) ON CONFLICT ("id", "field2") DO UPDATE SET "field1" = EXCLUDED."field1" RETURNING *');