MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Format

Method Format

pkg/sql/sem/tree/set.go:29–45  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

27
28// Format implements the NodeFormatter interface.
29func (node *SetVar) Format(ctx *FmtCtx) {
30 ctx.WriteString("SET ")
31 if node.Name == "" {
32 ctx.WriteString("ROW (")
33 ctx.FormatNode(&node.Values)
34 ctx.WriteString(")")
35 } else {
36 ctx.WithFlags(ctx.flags & ^FmtAnonymize, func() {
37 // Session var names never contain PII and should be distinguished
38 // for feature tracking purposes.
39 ctx.FormatNameP(&node.Name)
40 })
41
42 ctx.WriteString(" = ")
43 ctx.FormatNode(&node.Values)
44 }
45}
46
47// SetClusterSetting represents a SET CLUSTER SETTING statement.
48type SetClusterSetting struct {

Callers

nothing calls this directly

Calls 3

FormatNodeMethod · 0.80
WithFlagsMethod · 0.80
FormatNamePMethod · 0.80

Tested by

no test coverage detected