Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 67 | |
| 68 | // Format implements the NodeFormatter interface. |
| 69 | func (node *SetClusterSetting) Format(ctx *FmtCtx) { |
| 70 | ctx.WriteString("SET CLUSTER SETTING ") |
| 71 | |
| 72 | // Cluster setting names never contain PII and should be distinguished |
| 73 | // for feature tracking purposes. |
| 74 | ctx.WithFlags(ctx.flags & ^FmtAnonymize & ^FmtMarkRedactionNode, func() { |
| 75 | ctx.FormatNameP(&node.Name) |
| 76 | }) |
| 77 | |
| 78 | ctx.WriteString(" = ") |
| 79 | |
| 80 | switch v := node.Value.(type) { |
| 81 | case *DBool, *DInt: |
| 82 | ctx.WithFlags(ctx.flags & ^FmtAnonymize & ^FmtMarkRedactionNode, func() { |
| 83 | ctx.FormatNode(v) |
| 84 | }) |
| 85 | default: |
| 86 | ctx.FormatNode(v) |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // SetTransaction represents a SET TRANSACTION statement. |
| 91 | type SetTransaction struct { |
nothing calls this directly
no test coverage detected