mirror of
https://github.com/element-hq/synapse
synced 2024-09-05 22:20:06 +00:00
Convert param style
This commit is contained in:
parent
18579534ea
commit
f67d60496a
1 changed files with 3 additions and 0 deletions
|
@ -85,6 +85,7 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
|
|
||||||
def __init__(self, db_conn, hs):
|
def __init__(self, db_conn, hs):
|
||||||
self.hs = hs
|
self.hs = hs
|
||||||
|
self.database_engine = hs.database_engine
|
||||||
|
|
||||||
cur = db_conn.cursor()
|
cur = db_conn.cursor()
|
||||||
try:
|
try:
|
||||||
|
@ -157,6 +158,8 @@ class DataStore(RoomMemberStore, RoomStore,
|
||||||
"stream": stream_column,
|
"stream": stream_column,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sql = self.database_engine.convert_param_style(sql)
|
||||||
|
|
||||||
txn = db_conn.cursor()
|
txn = db_conn.cursor()
|
||||||
txn.execute(sql, (int(max_value),))
|
txn.execute(sql, (int(max_value),))
|
||||||
rows = txn.fetchall()
|
rows = txn.fetchall()
|
||||||
|
|
Loading…
Reference in a new issue