MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / docRow

Method docRow

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

Source from the content-addressed store, hash-verified

796}
797
798func (wf *WindowFrame) docRow(p *PrettyCfg) pretty.TableRow {
799 kw := "RANGE"
800 if wf.Mode == treewindow.ROWS {
801 kw = "ROWS"
802 } else if wf.Mode == treewindow.GROUPS {
803 kw = "GROUPS"
804 }
805 d := p.Doc(wf.Bounds.StartBound)
806 if wf.Bounds.EndBound != nil {
807 d = p.rlTable(
808 p.row("BETWEEN", d),
809 p.row("AND", p.Doc(wf.Bounds.EndBound)),
810 )
811 }
812 if wf.Exclusion != treewindow.NoExclusion {
813 d = pretty.Stack(d, pretty.Keyword(wf.Exclusion.String()))
814 }
815 return p.row(kw, d)
816}
817
818func (node *WindowFrameBound) doc(p *PrettyCfg) pretty.Doc {
819 switch node.BoundType {

Callers

nothing calls this directly

Calls 6

StackFunction · 0.92
KeywordFunction · 0.92
DocMethod · 0.80
rlTableMethod · 0.80
rowMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected