Commit 2c36c17a authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files Support pyformat paramstyle

This is used by the MySQL database backend.
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <>
parent 4a355c71
......@@ -32,7 +32,7 @@ class Connection:
raise ValueError('unsupported database backend')
def execute(self, query, params=()):
if self._paramstyle == 'format':
if self._paramstyle in ('format', 'pyformat'):
query = query.replace('%', '%%').replace('?', '%s')
elif self._paramstyle == 'qmark':
Supports Markdown
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