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

log sql query


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent 9b36ca3e
Pipeline #21731 passed with stages
in 1 minute and 48 seconds
......@@ -48,8 +48,10 @@ class Indexer:
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(
table_name, db_fields, db_value_placeholders, key_value), tuple(db_values)
sql = 'INSERT INTO {} ({}) VALUES ({}) ON DUPLICATE KEY UPDATE {}'.format(
table_name, db_fields, db_value_placeholders, key_value)
logging.debug(sql)
return sql, tuple(db_values)
def insert_in_db(self, record) -> (bool, str):
"""
......
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