Skip to content

Commit

Permalink
Make processor public (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy-L authored May 30, 2019
1 parent b23e532 commit dfcf072
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gorm/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type DefaultFilteringConditionProcessor struct {

// DefaultFilteringConditionConverter performs default convertion for Filter collection operator
type DefaultFilteringConditionConverter struct {
processor FilteringConditionProcessor
Processor FilteringConditionProcessor
}

// DefaultSortingCriteriaConverter performs default convertion for Sorting collection operator
Expand Down Expand Up @@ -160,7 +160,7 @@ func (converter *DefaultFilteringConditionConverter) StringConditionToGorm(ctx c
}

var value interface{}
if v, err := converter.processor.ProcessStringCondition(ctx, c.FieldPath, c.Value); err != nil {
if v, err := converter.Processor.ProcessStringCondition(ctx, c.FieldPath, c.Value); err != nil {
value = c.Value
} else {
value = v
Expand Down Expand Up @@ -335,7 +335,7 @@ func (converter *DefaultFilteringConditionConverter) StringArrayConditionToGorm(
placeholder := ""
for _, str := range c.Values {
placeholder += "?, "
if val, err := converter.processor.ProcessStringCondition(ctx, c.FieldPath, str); err == nil {
if val, err := converter.Processor.ProcessStringCondition(ctx, c.FieldPath, str); err == nil {
values = append(values, val)
continue
}
Expand Down

0 comments on commit dfcf072

Please sign in to comment.