Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 73 | |
| 74 | // Format implements the NodeFormatter interface. |
| 75 | func (node *Backup) Format(ctx *FmtCtx) { |
| 76 | ctx.WriteString("BACKUP ") |
| 77 | if node.Targets != nil { |
| 78 | ctx.FormatNode(node.Targets) |
| 79 | ctx.WriteString(" ") |
| 80 | } |
| 81 | ctx.WriteString("INTO ") |
| 82 | if node.Subdir != nil { |
| 83 | ctx.FormatNode(node.Subdir) |
| 84 | ctx.WriteString(" IN ") |
| 85 | } else if node.AppendToLatest { |
| 86 | ctx.WriteString("LATEST IN ") |
| 87 | } |
| 88 | ctx.FormatURIs(node.To) |
| 89 | if node.AsOf.Expr != nil { |
| 90 | ctx.WriteString(" ") |
| 91 | ctx.FormatNode(&node.AsOf) |
| 92 | } |
| 93 | |
| 94 | if !node.Options.IsDefault() { |
| 95 | ctx.WriteString(" WITH OPTIONS (") |
| 96 | ctx.FormatNode(&node.Options) |
| 97 | ctx.WriteString(")") |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | // Coverage return the coverage (all vs requested). |
| 102 | func (node Backup) Coverage() DescriptorCoverage { |
nothing calls this directly
no test coverage detected