BytesOr returns a composed predicate that represents the logical OR predicate.
(x, y BytesP, z ...BytesP)
| 154 | |
| 155 | // BytesOr returns a composed predicate that represents the logical OR predicate. |
| 156 | func BytesOr(x, y BytesP, z ...BytesP) BytesP { |
| 157 | expr := &bytesP{} |
| 158 | expr.done = func(name string) { |
| 159 | zs := make([]P, len(z)) |
| 160 | for i := range z { |
| 161 | zs[i] = z[i].Field(name) |
| 162 | } |
| 163 | expr.P = Or(x.Field(name), y.Field(name), zs...) |
| 164 | } |
| 165 | return expr |
| 166 | } |
| 167 | |
| 168 | // BytesAnd returns a composed predicate that represents the logical AND predicate. |
| 169 | func BytesAnd(x, y BytesP, z ...BytesP) BytesP { |