Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 898 | |
| 899 | // Format implements the NodeFormatter interface. |
| 900 | func (node *ArrayFlatten) Format(ctx *FmtCtx) { |
| 901 | ctx.WriteString("ARRAY ") |
| 902 | exprFmtWithParen(ctx, node.Subquery) |
| 903 | if ctx.HasFlags(FmtParsable) { |
| 904 | if t, ok := node.Subquery.(*DTuple); ok { |
| 905 | if len(t.D) == 0 { |
| 906 | ctx.WriteString(":::") |
| 907 | ctx.Buffer.WriteString(node.typ.SQLString()) |
| 908 | } |
| 909 | } |
| 910 | } |
| 911 | } |
| 912 | |
| 913 | // Exprs represents a list of value expressions. It's not a valid expression |
| 914 | // because it's not parenthesized. |
nothing calls this directly
no test coverage detected