-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathnilfilter.go
69 lines (55 loc) · 1.32 KB
/
nilfilter.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package yaormfilter
// NilFilter is a filter to operate on unknown nil fields
type NilFilter struct {
valuefilterimpl
}
// NewNilFilter returns a new NilFilter
func NewNilFilter() ValueFilter {
return &NilFilter{}
}
// Equals applies an equal filter on Date
func (f *NilFilter) Equals(v interface{}) ValueFilter {
return f
}
// NotEquals applies an notEqual filter
func (f *NilFilter) NotEquals(v interface{}) ValueFilter {
return f
}
// Like is not applicable on Date
func (f *NilFilter) Like(v interface{}) ValueFilter {
return f
}
// Nil applies a nil filter on Date
func (f *NilFilter) Nil(v bool) ValueFilter {
f.nil(v)
return f
}
// In adds a IN filter (not implemented)
func (f *NilFilter) In(values ...interface{}) ValueFilter {
return f
}
// NotIn adds a NOT IN filter (not implemented)
func (f *NilFilter) NotIn(values ...interface{}) ValueFilter {
return f
}
// Lt adds a < filter
func (f *NilFilter) Lt(v interface{}) ValueFilter {
return f
}
// Lte adds a <= filter
func (f *NilFilter) Lte(v interface{}) ValueFilter {
return f
}
// Gt adds a > filter
func (f *NilFilter) Gt(v interface{}) ValueFilter {
return f
}
// Gte adds a > filter
func (f *NilFilter) Gte(v interface{}) ValueFilter {
return f
}
// Raw performs a Raw filter
func (f *NilFilter) Raw(s RawFilterFunc) ValueFilter {
f.raw(s)
return f
}