Skip to content

Commit ce4648f

Browse files
committed
Simple filter operator validation
1 parent f35d30f commit ce4648f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

filter/simple.go

+9
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ type Simple struct {
3232
// The filter value
3333
Value interface{} `json:"val"`
3434
}
35+
36+
func (op Operation) Valid() bool {
37+
return op == OpEQ ||
38+
op == OpNEQ ||
39+
op == OpLT ||
40+
op == OpLTE ||
41+
op == OpGT ||
42+
op == OpGTE
43+
}

0 commit comments

Comments
 (0)