Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 27 | |
| 28 | // Format implements the NodeFormatter interface. |
| 29 | func (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. |
| 48 | type SetClusterSetting struct { |
nothing calls this directly
no test coverage detected