Skip to content

Commit

Permalink
fix tablename
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Lambert committed Aug 3, 2017
1 parent 22c8c72 commit fdac01f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/upsert.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function (object, table, settable_fields, upsert_index) {
) = (
${placeholders}
)
WHERE orders.${upsert_index} = '${object[upsert_index]}'
WHERE ${table}.${upsert_index} = '${object[upsert_index]}'
RETURNING *;
`
return db.getFirstRow(query, values);
Expand Down

0 comments on commit fdac01f

Please sign in to comment.