Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 20 | |
| 21 | // Format implements the NodeFormatter interface. |
| 22 | func (n *CommentOnDatabase) Format(ctx *FmtCtx) { |
| 23 | ctx.WriteString("COMMENT ON DATABASE ") |
| 24 | ctx.FormatNode(&n.Name) |
| 25 | ctx.WriteString(" IS ") |
| 26 | if n.Comment != nil { |
| 27 | lex.EncodeSQLStringWithFlags(&ctx.Buffer, *n.Comment, ctx.flags.EncodeFlags()) |
| 28 | } else { |
| 29 | ctx.WriteString("NULL") |
| 30 | } |
| 31 | } |
nothing calls this directly
no test coverage detected