Skip to content

Commit

Permalink
Fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
spicy-sauce committed Nov 18, 2021
1 parent 319759b commit 73b5379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rgsync/Connectors/sql_connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def GetUpdateQuery(tableName, mappings, pk):
values = [val for kk, val in mappings.items() if not kk.startswith('_')]
values = [pk] + values
values.sort()
query = '%s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE %s' % (query, ','.join(values), ','.join([':%s' % a for a in values]), ','.join(['%s=:%s' % (a,a) for a in values]))
query = '%s (%s) VALUES (%s) ON DUPLICATE KEY UPDATE %s' % (query, ','.join(values), ','.join([':%s' % a for a in values]), ','.join(['%s=values(%s)' % (a,a) for a in values]))

return query
self.addQuery = GetUpdateQuery(self.tableName, mappings, self.pk)
Expand Down

0 comments on commit 73b5379

Please sign in to comment.