Unverified Commit 8556a098 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

use %s as substitute

parent 8aaae55f
Pipeline #19208 passed with stages
in 1 minute and 57 seconds
......@@ -44,8 +44,8 @@ class Indexer:
db_values = [record[f] for f in fields if f in record and record[f]]
db_values.extend([record[f] for f in fields if f != 'sig' and f in record and record[f]])
db_fields = ','.join([f for f in fields if f in record and record[f]])
db_value_placeholders = ', '.join(['?' for f in fields if f in record and record[f]])
key_value = ", ".join([f"{f}=?" for f in fields
db_value_placeholders = ', '.join(['%s' for f in fields if f in record and record[f]])
key_value = ", ".join([f"{f}=%s" for f in fields
if f != 'sig' and f in record and record[f]])
# noinspection SqlNoDataSourceInspection
return 'INSERT INTO {} ({}) VALUES ({}) ON DUPLICATE KEY UPDATE {}'.format(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment