IntOr returns a composed predicate that represents the logical OR predicate.
(x, y IntP, z ...IntP)
| 966 | |
| 967 | // IntOr returns a composed predicate that represents the logical OR predicate. |
| 968 | func IntOr(x, y IntP, z ...IntP) IntP { |
| 969 | expr := &intP{} |
| 970 | expr.done = func(name string) { |
| 971 | zs := make([]P, len(z)) |
| 972 | for i := range z { |
| 973 | zs[i] = z[i].Field(name) |
| 974 | } |
| 975 | expr.P = Or(x.Field(name), y.Field(name), zs...) |
| 976 | } |
| 977 | return expr |
| 978 | } |
| 979 | |
| 980 | // IntAnd returns a composed predicate that represents the logical AND predicate. |
| 981 | func IntAnd(x, y IntP, z ...IntP) IntP { |