fix text array contains

This commit is contained in:
Elio Bischof
2023-06-30 02:11:17 +02:00
parent d5d365d154
commit 39e8e869ac
12 changed files with 84 additions and 92 deletions

View File

@@ -402,10 +402,10 @@ func (p *labelPolicyProjection) reduceActivated(event eventstore.Event) (*handle
handler.NewCol(LabelPolicyDarkLogoURLCol, nil),
handler.NewCol(LabelPolicyDarkIconURLCol, nil),
},
[]handler.Condition{
handler.NewCond(LabelPolicyIDCol, event.Aggregate().ID),
handler.NewCond(LabelPolicyStateCol, domain.LabelPolicyStatePreview),
handler.NewCond(LabelPolicyInstanceIDCol, event.Aggregate().InstanceID),
[]handler.Column{
handler.NewCol(LabelPolicyIDCol, event.Aggregate().ID),
handler.NewCol(LabelPolicyStateCol, domain.LabelPolicyStatePreview),
handler.NewCol(LabelPolicyInstanceIDCol, event.Aggregate().InstanceID),
}), nil
}

View File

@@ -248,17 +248,17 @@ func (p *milestoneProjection) reduceUserTokenAdded(event eventstore.Event) (*han
}
// We ignore authentications without app, for example JWT profile or PAT
if e.ApplicationID != "" {
crdb.AddUpdateStatement(
statements = append(statements, crdb.AddUpdateStatement(
[]handler.Column{
handler.NewCol(MilestoneColumnReachedDate, event.CreationDate()),
},
[]handler.Condition{
handler.NewCond(MilestoneColumnInstanceID, event.Aggregate().InstanceID),
handler.NewCond(MilestoneColumnType, milestone.AuthenticationSucceededOnApplication),
crdb.NewContainsCond(MilestoneColumnIgnoreClientIDs, e.ApplicationID),
crdb.Not(crdb.NewTextArrayContainsCond(MilestoneColumnIgnoreClientIDs, e.ApplicationID)),
crdb.NewIsNullCond(MilestoneColumnReachedDate),
},
)
))
}
return crdb.NewMultiStatement(e, statements...), nil
}

View File

@@ -194,7 +194,7 @@ func applyCustomConfig(config crdb.StatementHandlerConfig, customConfig CustomCo
// as setup and start currently create them individually, we make sure we get the right one
// will be refactored when changing to new id based projections
//
// NotificationsProjection is not added here, because it does not statement based / has no proprietary projection table
// Event handlers NotificationsProjection, NotificationsQuotaProjection and NotificationsProjection are not added here, because the do not statement based / have no proprietary projection table
func newProjectionsList() {
projections = []projection{
OrgProjection,