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 16, 2023
1 parent 2973267 commit bc6536e
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 bc6536e

Please sign in to comment.