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

Method Format

postgres/parser/sem/tree/create_type.go:123–132  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

121
122// Format implements the NodeFormatter interface.
123func (node *EnumType) Format(ctx *FmtCtx) {
124 ctx.WriteString(" AS ENUM ( ")
125 for i := range node.Labels {
126 if i > 0 {
127 ctx.WriteString(" , ")
128 }
129 lex.EncodeSQLString(&ctx.Buffer, node.Labels[i])
130 }
131 ctx.WriteString(" )")
132}
133
134type RangeTypeOptionType int
135

Callers

nothing calls this directly

Calls 2

EncodeSQLStringFunction · 0.92
WriteStringMethod · 0.80

Tested by

no test coverage detected