Skip to content

Commit

Permalink
Don't panic in Exists#ExtractConditions() & drop superfluous type a…
Browse files Browse the repository at this point in the history
…ssertion
  • Loading branch information
yhabteab committed Nov 14, 2023
1 parent a808268 commit d127963
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/filter/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ func (c *Chain) Eval(filterable Filterable) (bool, error) {
func (c *Chain) ExtractConditions() []*Condition {
var conditions []*Condition
for _, rule := range c.rules {
if _, ok := rule.(*Exists); ok {
continue
}

conditions = append(conditions, rule.ExtractConditions()...)
}

Expand Down Expand Up @@ -197,7 +193,7 @@ type Exists struct {
}

func (e *Exists) ExtractConditions() []*Condition {
panic("filter exists doesn't support extract conditions")
return nil
}

func NewExists(column string) *Exists {
Expand Down

0 comments on commit d127963

Please sign in to comment.