|
|
|
@ -1408,10 +1408,10 @@ class EventsWorkerStore(SQLBaseStore): |
|
|
|
|
) -> List[Tuple[int, str, str, str, str, str, str, str, str]]: |
|
|
|
|
sql = ( |
|
|
|
|
"SELECT e.stream_ordering, e.event_id, e.room_id, e.type," |
|
|
|
|
" state_key, redacts, relates_to_id, membership, rejections.reason IS NOT NULL" |
|
|
|
|
" se.state_key, redacts, relates_to_id, membership, rejections.reason IS NOT NULL" |
|
|
|
|
" FROM events AS e" |
|
|
|
|
" LEFT JOIN redactions USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events AS se USING (event_id)" |
|
|
|
|
" LEFT JOIN event_relations USING (event_id)" |
|
|
|
|
" LEFT JOIN room_memberships USING (event_id)" |
|
|
|
|
" LEFT JOIN rejections USING (event_id)" |
|
|
|
@ -1449,11 +1449,11 @@ class EventsWorkerStore(SQLBaseStore): |
|
|
|
|
) -> List[Tuple[int, str, str, str, str, str, str, str, str]]: |
|
|
|
|
sql = ( |
|
|
|
|
"SELECT event_stream_ordering, e.event_id, e.room_id, e.type," |
|
|
|
|
" state_key, redacts, relates_to_id, membership, rejections.reason IS NOT NULL" |
|
|
|
|
" se.state_key, redacts, relates_to_id, membership, rejections.reason IS NOT NULL" |
|
|
|
|
" FROM events AS e" |
|
|
|
|
" INNER JOIN ex_outlier_stream AS out USING (event_id)" |
|
|
|
|
" LEFT JOIN redactions USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events AS se USING (event_id)" |
|
|
|
|
" LEFT JOIN event_relations USING (event_id)" |
|
|
|
|
" LEFT JOIN room_memberships USING (event_id)" |
|
|
|
|
" LEFT JOIN rejections USING (event_id)" |
|
|
|
@ -1507,10 +1507,10 @@ class EventsWorkerStore(SQLBaseStore): |
|
|
|
|
) -> Tuple[List[Tuple[int, Tuple[str, str, str, str, str, str]]], int, bool]: |
|
|
|
|
sql = ( |
|
|
|
|
"SELECT -e.stream_ordering, e.event_id, e.room_id, e.type," |
|
|
|
|
" state_key, redacts, relates_to_id" |
|
|
|
|
" se.state_key, redacts, relates_to_id" |
|
|
|
|
" FROM events AS e" |
|
|
|
|
" LEFT JOIN redactions USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events AS se USING (event_id)" |
|
|
|
|
" LEFT JOIN event_relations USING (event_id)" |
|
|
|
|
" WHERE ? > stream_ordering AND stream_ordering >= ?" |
|
|
|
|
" AND instance_name = ?" |
|
|
|
@ -1537,11 +1537,11 @@ class EventsWorkerStore(SQLBaseStore): |
|
|
|
|
|
|
|
|
|
sql = ( |
|
|
|
|
"SELECT -event_stream_ordering, e.event_id, e.room_id, e.type," |
|
|
|
|
" state_key, redacts, relates_to_id" |
|
|
|
|
" se.state_key, redacts, relates_to_id" |
|
|
|
|
" FROM events AS e" |
|
|
|
|
" INNER JOIN ex_outlier_stream AS out USING (event_id)" |
|
|
|
|
" LEFT JOIN redactions USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events USING (event_id)" |
|
|
|
|
" LEFT JOIN state_events AS se USING (event_id)" |
|
|
|
|
" LEFT JOIN event_relations USING (event_id)" |
|
|
|
|
" WHERE ? > event_stream_ordering" |
|
|
|
|
" AND event_stream_ordering >= ?" |
|
|
|
|