Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 32 | |
| 33 | // Format implements the NodeFormatter interface. |
| 34 | func (node *CreateAggregate) Format(ctx *FmtCtx) { |
| 35 | ctx.WriteString("CREATE ") |
| 36 | if node.Replace { |
| 37 | ctx.WriteString("OR REPLACE ") |
| 38 | } |
| 39 | ctx.WriteString("AGGREGATE ") |
| 40 | ctx.FormatNode(node.Name) |
| 41 | ctx.WriteString(" ( ") |
| 42 | if node.OrderByArgs != nil { |
| 43 | if node.Args != nil { |
| 44 | ctx.FormatNode(node.Args) |
| 45 | } |
| 46 | ctx.WriteString(" ORDER BY ") |
| 47 | ctx.FormatNode(node.OrderByArgs) |
| 48 | ctx.WriteString(" ) ( ") |
| 49 | } else if node.Args != nil { |
| 50 | ctx.FormatNode(node.Args) |
| 51 | ctx.WriteString(" ) ( ") |
| 52 | } else { |
| 53 | ctx.WriteString("BASETYPE = ") |
| 54 | ctx.WriteString(node.BaseType.SQLString()) |
| 55 | ctx.WriteString(" , ") |
| 56 | } |
| 57 | ctx.WriteString("SFUNC = ") |
| 58 | ctx.FormatNode(node.SFunc) |
| 59 | ctx.WriteString(" , STYPE = ") |
| 60 | ctx.WriteString(node.BaseType.SQLString()) |
| 61 | if node.AggOptions != nil { |
| 62 | ctx.FormatNode(&node.AggOptions) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | type FinalFuncModifyType string |
| 67 |
nothing calls this directly
no test coverage detected