Skip to content

Commit 86a853a

Browse files
committed
Add a couple of comments
1 parent e7376ea commit 86a853a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

grade/internal/domain/endorser/specifications.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ func (c Context) ValuesByPath(path ...string) ([]any, error) {
6868
}
6969

7070
func (c Context) endorserPath(obj Endorser, path ...string) ([]any, error) {
71+
// FIXME: Здесь мы имеем доступ к защищенным атрибутам только одного агрегата, что делает идею объекта Context лишенной смысла.
72+
// По хорошему должна быто композиция контекстов.
7173
switch path[0] {
7274
case "availableEndorsementCount":
7375
return []any{obj.availableEndorsementCount}, nil

grade/internal/domain/seedwork/specification/evaluate_visitor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ func (v *EvaluateVisitor) VisitInfix(n InfixNode) error {
9595
rights := v.CurrentValue()
9696
if v.yieldBooleanOperator(n.Operator()) {
9797
result := false
98+
// FIXME: здесь мы ищем совпадение по атрибуту любой из вложенных сущностей,
99+
// в то время как PostgresqlVisitor ищет совпадение по одной из вложенных сущностей.
100+
// В качестве решения можно воспользоваться относительным путем по аналогии @ в jsonpath.
98101
for i := range lefts {
99102
for j := range rights {
100103
// aggregate.[]entity.field int == aggregate2.[]entity.field int

0 commit comments

Comments
 (0)