Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 380 | |
| 381 | // Format implements the NodeFormatter interface. |
| 382 | func (o *RestoreOptions) Format(ctx *FmtCtx) { |
| 383 | var addSep bool |
| 384 | maybeAddSep := func() { |
| 385 | if addSep { |
| 386 | ctx.WriteString(", ") |
| 387 | } |
| 388 | addSep = true |
| 389 | } |
| 390 | if o.EncryptionPassphrase != nil { |
| 391 | addSep = true |
| 392 | ctx.WriteString("encryption_passphrase = ") |
| 393 | if ctx.flags.HasFlags(FmtShowPasswords) { |
| 394 | ctx.FormatNode(o.EncryptionPassphrase) |
| 395 | } else { |
| 396 | ctx.WriteString(PasswordSubstitution) |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | if o.DecryptionKMSURI != nil { |
| 401 | maybeAddSep() |
| 402 | ctx.WriteString("kms = ") |
| 403 | ctx.FormatURIs(o.DecryptionKMSURI) |
| 404 | } |
| 405 | |
| 406 | if o.IntoDB != nil { |
| 407 | maybeAddSep() |
| 408 | ctx.WriteString("into_db = ") |
| 409 | ctx.FormatNode(o.IntoDB) |
| 410 | } |
| 411 | |
| 412 | if o.SkipMissingFKs { |
| 413 | maybeAddSep() |
| 414 | ctx.WriteString("skip_missing_foreign_keys") |
| 415 | } |
| 416 | |
| 417 | if o.SkipMissingSequenceOwners { |
| 418 | maybeAddSep() |
| 419 | ctx.WriteString("skip_missing_sequence_owners") |
| 420 | } |
| 421 | |
| 422 | if o.SkipMissingSequences { |
| 423 | maybeAddSep() |
| 424 | ctx.WriteString("skip_missing_sequences") |
| 425 | } |
| 426 | |
| 427 | if o.SkipMissingViews { |
| 428 | maybeAddSep() |
| 429 | ctx.WriteString("skip_missing_views") |
| 430 | } |
| 431 | |
| 432 | if o.SkipMissingUDFs { |
| 433 | maybeAddSep() |
| 434 | ctx.WriteString("skip_missing_udfs") |
| 435 | } |
| 436 | |
| 437 | if o.Detached { |
| 438 | maybeAddSep() |
| 439 | ctx.WriteString("detached") |
nothing calls this directly
no test coverage detected