BytesAnd returns a composed predicate that represents the logical AND predicate.
(x, y BytesP, z ...BytesP)
| 167 | |
| 168 | // BytesAnd returns a composed predicate that represents the logical AND predicate. |
| 169 | func BytesAnd(x, y BytesP, z ...BytesP) BytesP { |
| 170 | expr := &bytesP{} |
| 171 | expr.done = func(name string) { |
| 172 | zs := make([]P, len(z)) |
| 173 | for i := range z { |
| 174 | zs[i] = z[i].Field(name) |
| 175 | } |
| 176 | expr.P = And(x.Field(name), y.Field(name), zs...) |
| 177 | } |
| 178 | return expr |
| 179 | } |
| 180 | |
| 181 | // BytesNot returns a predicate that represents the logical negation of the given predicate. |
| 182 | func BytesNot(x BytesP) BytesP { |