Do the same as SQLite

This commit is contained in:
Neil Alexander 2021-01-22 13:28:48 +00:00
parent be08a9c94f
commit 095599398a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -44,8 +44,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS syncapi_event_topological_position_idx ON sync
const insertEventInTopologySQL = "" + const insertEventInTopologySQL = "" +
"INSERT INTO syncapi_output_room_events_topology (event_id, topological_position, room_id, stream_position)" + "INSERT INTO syncapi_output_room_events_topology (event_id, topological_position, room_id, stream_position)" +
" VALUES ($1, $2, $3, $4)" + " VALUES ($1, $2, $3, $4)" +
" ON CONFLICT (topological_position, stream_position, room_id) DO UPDATE SET event_id = $1" + " ON CONFLICT DO NOTHING" +
" ON CONFLICT (event_id) DO NOTHING" +
" RETURNING topological_position" " RETURNING topological_position"
const selectEventIDsInRangeASCSQL = "" + const selectEventIDsInRangeASCSQL = "" +