0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-21 04:03:52 +01:00

Add LIMIT to scalar subquery

This commit is contained in:
Erik Johnston 2014-09-25 15:51:21 +01:00
parent 24e4c48468
commit c818aa13eb
3 changed files with 10 additions and 5 deletions

View file

@ -256,6 +256,7 @@ class DataStore(RoomMemberStore, RoomStore,
def get_current_state(self, room_id, event_type=None, state_key=""):
del_sql = (
"SELECT event_id FROM redactions WHERE redacts = e.event_id "
"LIMIT 1"
)
sql = (

View file

@ -184,6 +184,7 @@ class RoomMemberStore(SQLBaseStore):
def _get_members_query_txn(self, txn, where_clause, where_values):
del_sql = (
"SELECT event_id FROM redactions WHERE redacts = e.event_id "
"LIMIT 1"
)
sql = (

View file

@ -159,6 +159,7 @@ class StreamStore(SQLBaseStore):
del_sql = (
"SELECT event_id FROM redactions WHERE redacts = e.event_id "
"LIMIT 1"
)
if limit:
@ -231,6 +232,7 @@ class StreamStore(SQLBaseStore):
del_sql = (
"SELECT event_id FROM redactions WHERE redacts = events.event_id "
"LIMIT 1"
)
sql = (
@ -273,6 +275,7 @@ class StreamStore(SQLBaseStore):
del_sql = (
"SELECT event_id FROM redactions WHERE redacts = events.event_id "
"LIMIT 1"
)
sql = (