Put spaces at start of line

This commit is contained in:
David Baker 2016-04-29 19:16:15 +01:00
parent 83618d719a
commit 50ad8005e4

View File

@ -155,13 +155,13 @@ class EventPushActionsStore(SQLBaseStore):
def get_no_receipt(txn): def get_no_receipt(txn):
sql = ( sql = (
"SELECT ep.event_id, ep.room_id, ep.stream_ordering, ep.actions, " "SELECT ep.event_id, ep.room_id, ep.stream_ordering, ep.actions,"
"e.received_ts " " e.received_ts"
"FROM event_push_actions AS ep " " FROM event_push_actions AS ep"
"JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id " " JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id"
"WHERE ep.room_id not in (" " WHERE ep.room_id not in ("
" SELECT room_id FROM events NATURAL JOIN receipts_linearized" " SELECT room_id FROM events NATURAL JOIN receipts_linearized"
" WHERE receipt_type = 'm.read' AND user_id = ? " " WHERE receipt_type = 'm.read' AND user_id = ?"
" GROUP BY room_id" " GROUP BY room_id"
") AND ep.user_id = ? AND ep.stream_ordering > ?" ") AND ep.user_id = ? AND ep.stream_ordering > ?"
) )
@ -190,12 +190,12 @@ class EventPushActionsStore(SQLBaseStore):
def get_time_of_last_push_action_before(self, stream_ordering): def get_time_of_last_push_action_before(self, stream_ordering):
def f(txn): def f(txn):
sql = ( sql = (
"SELECT e.received_ts " "SELECT e.received_ts"
"FROM event_push_actions AS ep " " FROM event_push_actions AS ep"
"JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id " " JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id"
"WHERE ep.stream_ordering > ? " " WHERE ep.stream_ordering > ?"
"ORDER BY ep.stream_ordering ASC " " ORDER BY ep.stream_ordering ASC"
"LIMIT 1" " LIMIT 1"
) )
txn.execute(sql, (stream_ordering,)) txn.execute(sql, (stream_ordering,))
return txn.fetchone() return txn.fetchone()
@ -220,10 +220,10 @@ class EventPushActionsStore(SQLBaseStore):
""" """
def f(txn): def f(txn):
txn.execute( txn.execute(
"SELECT ep.room_id, MAX(e.received_ts) " "SELECT ep.room_id, MAX(e.received_ts)"
"FROM event_push_actions AS ep " " FROM event_push_actions AS ep"
"JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id " " JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id"
"GROUP BY ep.room_id" " GROUP BY ep.room_id"
) )
return txn.fetchall() return txn.fetchall()
result = yield self.runInteraction( result = yield self.runInteraction(