mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-24 13:48:45 +00:00
fix(eventstore): sub queries (#1805)
* sub queries * fix: tests * add builder to tests * new search query * rename searchquerybuilder to builder * remove comment from code * test with multiple queries * add filters test * fix(contibute): listing * add validate module * fix: search queries * remove unused event type in query * ignore query if error in marshal * go mod tidy * update privacy policy query * update queries Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
@@ -2,6 +2,7 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
@@ -26,9 +27,11 @@ func NewIAMIDPConfigWriteModel(configID string) *IAMIDPConfigWriteModel {
|
||||
}
|
||||
|
||||
func (wm *IAMIDPConfigWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent, iam.AggregateType).
|
||||
AggregateIDs(wm.AggregateID).
|
||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
||||
ResourceOwner(wm.ResourceOwner).
|
||||
AddQuery().
|
||||
AggregateTypes(iam.AggregateType).
|
||||
AggregateIDs(wm.AggregateID).
|
||||
EventTypes(
|
||||
iam.IDPConfigAddedEventType,
|
||||
iam.IDPConfigChangedEventType,
|
||||
@@ -36,8 +39,8 @@ func (wm *IAMIDPConfigWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
iam.IDPConfigReactivatedEventType,
|
||||
iam.IDPConfigRemovedEventType,
|
||||
iam.IDPOIDCConfigAddedEventType,
|
||||
iam.IDPOIDCConfigChangedEventType,
|
||||
)
|
||||
iam.IDPOIDCConfigChangedEventType).
|
||||
Builder()
|
||||
}
|
||||
|
||||
func (wm *IAMIDPConfigWriteModel) AppendEvents(events ...eventstore.EventReader) {
|
||||
|
||||
Reference in New Issue
Block a user