zitadel/internal/eventstore/repository/repository.go
Silvan 296f1c3c71
fix(eventstore): fill new column with data (#2288)
* fix: smaller outage on events migration first part

* fix: fill old events with sequence

* fix: migration add transactions

* fix: mig

* rename mig

* replace migration with setup step

* regenerate mock

* add step 20 to config

* log

* simplify step

* limit 1000

* limit 500
2021-09-01 09:25:52 +00:00

22 lines
965 B
Go

package repository
import (
"context"
)
//Repository pushes and filters events
type Repository interface {
//Health checks if the connection to the storage is available
Health(ctx context.Context) error
// PushEvents adds all events of the given aggregates to the eventstreams of the aggregates.
// if unique constraints are pushed, they will be added to the unique table for checking unique constraint violations
// This call is transaction save. The transaction will be rolled back if one event fails
Push(ctx context.Context, events []*Event, uniqueConstraints ...*UniqueConstraint) error
// Filter returns all events matching the given search query
Filter(ctx context.Context, searchQuery *SearchQuery) (events []*Event, err error)
//LatestSequence returns the latests sequence found by the the search query
LatestSequence(ctx context.Context, queryFactory *SearchQuery) (uint64, error)
Step20(ctx context.Context, latestSequence uint64) error
}