Silvan 7cfb0e715a
fix(eventstore): improve pagination of handler filter (#6968)
* fix(setup): add filter_offset to `projections.current_states`

* fix(eventstore): allow offset in query

* fix(handler): offset for already processed events

(cherry picked from commit e3d1ca4d586f615854c05184c32314fbe67e128e)
2023-12-01 13:48:44 +01:00

13 lines
227 B
SQL

SELECT
aggregate_id
, aggregate_type
, "sequence"
, event_date
, "position"
, filter_offset
FROM
projections.current_states
WHERE
instance_id = $1
AND projection_name = $2
FOR UPDATE NOWAIT;