mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:27:32 +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 <livio.a@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
|
||||
"github.com/caos/zitadel/internal/repository/org"
|
||||
@@ -41,12 +42,15 @@ func (wm *OrgPasswordComplexityPolicyWriteModel) Reduce() error {
|
||||
}
|
||||
|
||||
func (wm *OrgPasswordComplexityPolicyWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent, org.AggregateType).
|
||||
AggregateIDs(wm.PasswordComplexityPolicyWriteModel.AggregateID).
|
||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
||||
ResourceOwner(wm.ResourceOwner).
|
||||
AddQuery().
|
||||
AggregateTypes(org.AggregateType).
|
||||
AggregateIDs(wm.PasswordComplexityPolicyWriteModel.AggregateID).
|
||||
EventTypes(org.PasswordComplexityPolicyAddedEventType,
|
||||
org.PasswordComplexityPolicyChangedEventType,
|
||||
org.PasswordComplexityPolicyRemovedEventType)
|
||||
org.PasswordComplexityPolicyRemovedEventType).
|
||||
Builder()
|
||||
}
|
||||
|
||||
func (wm *OrgPasswordComplexityPolicyWriteModel) NewChangedEvent(
|
||||
|
Reference in New Issue
Block a user