Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 26 | |
| 27 | // Format implements the NodeFormatter interface. |
| 28 | func (node *Comment) Format(ctx *FmtCtx) { |
| 29 | ctx.WriteString("COMMENT ON ") |
| 30 | ctx.FormatNode(node.Object) |
| 31 | ctx.WriteString(" IS ") |
| 32 | if node.Comment != nil { |
| 33 | lex.EncodeSQLStringWithFlags(&ctx.Buffer, *node.Comment, ctx.flags.EncodeFlags()) |
| 34 | } else { |
| 35 | ctx.WriteString("NULL") |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | // CommentObject represents an object type definition for COMMENT ON command. |
| 40 | type CommentObject interface { |
nothing calls this directly
no test coverage detected