| 16 | } |
| 17 | |
| 18 | func (n *ScalarArrayOpExpr) Format(buf *TrackedBuffer, d format.Dialect) { |
| 19 | if n == nil { |
| 20 | return |
| 21 | } |
| 22 | // ScalarArrayOpExpr represents "scalar op ANY/ALL (array)" |
| 23 | // Args[0] is the left operand, Args[1] is the array |
| 24 | if n.Args != nil && len(n.Args.Items) >= 2 { |
| 25 | buf.astFormat(n.Args.Items[0], d) |
| 26 | buf.WriteString(" = ") // TODO: Use actual operator based on Opno |
| 27 | if n.UseOr { |
| 28 | buf.WriteString("ANY(") |
| 29 | } else { |
| 30 | buf.WriteString("ALL(") |
| 31 | } |
| 32 | buf.astFormat(n.Args.Items[1], d) |
| 33 | buf.WriteString(")") |
| 34 | } |
| 35 | } |