mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:46:01 -04:00
User Cursor.__iter__ instead of fetchall
This prevents unnecessary construction of lists
This commit is contained in:
parent
59358cd3e7
commit
00957d1aa4
16 changed files with 41 additions and 42 deletions
|
@ -313,10 +313,9 @@ class ReceiptsStore(SQLBaseStore):
|
|||
)
|
||||
|
||||
txn.execute(sql, (room_id, receipt_type, user_id))
|
||||
results = txn.fetchall()
|
||||
|
||||
if results and topological_ordering:
|
||||
for to, so, _ in results:
|
||||
if topological_ordering:
|
||||
for to, so, _ in txn:
|
||||
if int(to) > topological_ordering:
|
||||
return False
|
||||
elif int(to) == topological_ordering and int(so) >= stream_ordering:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue