mirror of
https://github.com/element-hq/synapse
synced 2024-06-28 10:23:29 +00:00
Switch to f-strings
This commit is contained in:
parent
90128dd355
commit
2edc839c23
|
@ -2242,10 +2242,10 @@ class DatabasePool:
|
||||||
table: The name of the table to delete all rows from.
|
table: The name of the table to delete all rows from.
|
||||||
"""
|
"""
|
||||||
if isinstance(txn.database_engine, PostgresEngine):
|
if isinstance(txn.database_engine, PostgresEngine):
|
||||||
sql = "TRUNCATE %s" % table
|
sql = f"TRUNCATE {table}"
|
||||||
else:
|
else:
|
||||||
# SQLite does not support the TRUNCATE command
|
# SQLite does not support the TRUNCATE command
|
||||||
sql = "DELETE FROM %s" % table
|
sql = f"DELETE FROM {table}"
|
||||||
|
|
||||||
txn.execute(sql)
|
txn.execute(sql)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue