Skip to content

Commit bc6536e

Browse files
committed
Don't panic in Exists#ExtractConditions() & drop superfluous type assertion
1 parent 2973267 commit bc6536e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

internal/filter/types.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ func (c *Chain) Eval(filterable Filterable) (bool, error) {
7474
func (c *Chain) ExtractConditions() []*Condition {
7575
var conditions []*Condition
7676
for _, rule := range c.rules {
77-
if _, ok := rule.(*Exists); ok {
78-
continue
79-
}
80-
8177
conditions = append(conditions, rule.ExtractConditions()...)
8278
}
8379

@@ -197,7 +193,7 @@ type Exists struct {
197193
}
198194

199195
func (e *Exists) ExtractConditions() []*Condition {
200-
panic("filter exists doesn't support extract conditions")
196+
return nil
201197
}
202198

203199
func NewExists(column string) *Exists {

0 commit comments

Comments
 (0)