MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Format

Method Format

postgres/parser/sem/tree/comment.go:28–37  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

26
27// Format implements the NodeFormatter interface.
28func (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.
40type CommentObject interface {

Callers

nothing calls this directly

Calls 4

EncodeSQLStringWithFlagsFunction · 0.92
WriteStringMethod · 0.80
FormatNodeMethod · 0.80
EncodeFlagsMethod · 0.80

Tested by

no test coverage detected