(p *PrettyCfg)
| 681 | } |
| 682 | |
| 683 | func (node *FuncExpr) doc(p *PrettyCfg) pretty.Doc { |
| 684 | d := p.Doc(&node.Func) |
| 685 | |
| 686 | if len(node.Exprs) > 0 { |
| 687 | args := node.Exprs.doc(p) |
| 688 | if node.Type != 0 { |
| 689 | args = pretty.ConcatLine( |
| 690 | pretty.Text(funcTypeName[node.Type]), |
| 691 | args, |
| 692 | ) |
| 693 | } |
| 694 | |
| 695 | if len(node.OrderBy) > 0 { |
| 696 | args = pretty.ConcatSpace(args, node.OrderBy.doc(p)) |
| 697 | } |
| 698 | d = pretty.Concat(d, p.bracket("(", args, ")")) |
| 699 | } else { |
| 700 | d = pretty.Concat(d, pretty.Text("()")) |
| 701 | } |
| 702 | if node.Filter != nil { |
| 703 | d = pretty.Fold(pretty.ConcatSpace, |
| 704 | d, |
| 705 | pretty.Keyword("FILTER"), |
| 706 | p.bracket("(", |
| 707 | p.nestUnder(pretty.Keyword("WHERE"), p.Doc(node.Filter)), |
| 708 | ")")) |
| 709 | } |
| 710 | if window := node.WindowDef; window != nil { |
| 711 | var over pretty.Doc |
| 712 | if window.Name != "" { |
| 713 | over = p.Doc(&window.Name) |
| 714 | } else { |
| 715 | over = p.Doc(window) |
| 716 | } |
| 717 | d = pretty.Fold(pretty.ConcatSpace, |
| 718 | d, |
| 719 | pretty.Keyword("OVER"), |
| 720 | over, |
| 721 | ) |
| 722 | } |
| 723 | return d |
| 724 | } |
| 725 | |
| 726 | func (node *WindowDef) doc(p *PrettyCfg) pretty.Doc { |
| 727 | rows := make([]pretty.TableRow, 0, 4) |
nothing calls this directly
no test coverage detected