(s *ast.SetOperation, opts ast.FormatOptions)
| 628 | } |
| 629 | |
| 630 | func renderSetOperation(s *ast.SetOperation, opts ast.FormatOptions) string { |
| 631 | if s == nil { |
| 632 | return "" |
| 633 | } |
| 634 | f := newNodeFormatter(opts) |
| 635 | sb := f.sb |
| 636 | |
| 637 | if s.Left != nil { |
| 638 | sb.WriteString(FormatStatement(s.Left, opts)) |
| 639 | } |
| 640 | sb.WriteString(f.clauseSep()) |
| 641 | op := s.Operator |
| 642 | if s.All { |
| 643 | op += " ALL" |
| 644 | } |
| 645 | sb.WriteString(f.kw(op)) |
| 646 | sb.WriteString(f.clauseSep()) |
| 647 | if s.Right != nil { |
| 648 | sb.WriteString(FormatStatement(s.Right, opts)) |
| 649 | } |
| 650 | |
| 651 | if opts.AddSemicolon { |
| 652 | sb.WriteString(";") |
| 653 | } |
| 654 | |
| 655 | return f.result() |
| 656 | } |
| 657 | |
| 658 | func renderAlterTable(a *ast.AlterTableStatement, opts ast.FormatOptions) string { //nolint:staticcheck // AlterTableStatement kept for backward compatibility |
| 659 | if a == nil { |
no test coverage detected