(exprs ...Expression)
| 101 | } |
| 102 | |
| 103 | func And(exprs ...Expression) Expression { |
| 104 | if len(exprs) == 0 { |
| 105 | return nil |
| 106 | } |
| 107 | |
| 108 | if len(exprs) == 1 { |
| 109 | if _, ok := exprs[0].(OrConditions); !ok { |
| 110 | return exprs[0] |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | return AndConditions{Exprs: exprs} |
| 115 | } |
| 116 | |
| 117 | type AndConditions struct { |
| 118 | Exprs []Expression |
no outgoing calls