From 96a0e09113edcde077ecee865f758b5c50b5fca8 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 2 Jan 2020 14:44:24 +0000 Subject: [PATCH] Tweaks from @babolivier review comments --- syncapi/storage/current_room_state_table.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/syncapi/storage/current_room_state_table.go b/syncapi/storage/current_room_state_table.go index 6dc761292..1ab70879a 100644 --- a/syncapi/storage/current_room_state_table.go +++ b/syncapi/storage/current_room_state_table.go @@ -84,10 +84,12 @@ const selectStateEventSQL = "" + "SELECT event_json FROM syncapi_current_room_state WHERE room_id = $1 AND type = $2 AND state_key = $3" const selectEventsWithEventIDsSQL = "" + - // TODO: The session_id and transaction_id blanks are here because otherwise the rowsToStreamEvents - // expects there to be exactly four columns. We need a better solution to this long term. - // - neilalexander, 2 Jan 2020 - "SELECT added_at, event_json, 0 AS session_id, '' AS transaction_id FROM syncapi_current_room_state WHERE event_id = ANY($1)" + // TODO: The session_id and transaction_id blanks are here because otherwise + // the rowsToStreamEvents expects there to be exactly four columns. We need to + // figure out if these really need to be in the DB, and if so, we need a + // better permanent fix for this. - neilalexander, 2 Jan 2020 + "SELECT added_at, event_json, 0 AS session_id, '' AS transaction_id" + + " FROM syncapi_current_room_state WHERE event_id = ANY($1)" type currentRoomStateStatements struct { upsertRoomStateStmt *sql.Stmt