MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / doc

Method doc

pkg/sql/sem/tree/pretty.go:726–744  ·  view source on GitHub ↗
(p *PrettyCfg)

Source from the content-addressed store, hash-verified

724}
725
726func (node *WindowDef) doc(p *PrettyCfg) pretty.Doc {
727 rows := make([]pretty.TableRow, 0, 4)
728 if node.RefName != "" {
729 rows = append(rows, p.row("", p.Doc(&node.RefName)))
730 }
731 if len(node.Partitions) > 0 {
732 rows = append(rows, p.row("PARTITION BY", p.Doc(&node.Partitions)))
733 }
734 if len(node.OrderBy) > 0 {
735 rows = append(rows, node.OrderBy.docRow(p))
736 }
737 if node.Frame != nil {
738 rows = append(rows, node.Frame.docRow(p))
739 }
740 if len(rows) == 0 {
741 return pretty.Text("()")
742 }
743 return p.bracket("(", p.rlTable(rows...), ")")
744}
745
746func (wf *WindowFrame) docRow(p *PrettyCfg) pretty.TableRow {
747 kw := "RANGE"

Callers

nothing calls this directly

Calls 6

TextFunction · 0.92
rowMethod · 0.80
DocMethod · 0.80
bracketMethod · 0.80
rlTableMethod · 0.80
docRowMethod · 0.45

Tested by

no test coverage detected