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

Method doc

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

Source from the content-addressed store, hash-verified

764}
765
766func (node *WindowFrameBound) doc(p *PrettyCfg) pretty.Doc {
767 switch node.BoundType {
768 case UnboundedPreceding:
769 return pretty.Keyword("UNBOUNDED PRECEDING")
770 case OffsetPreceding:
771 return pretty.ConcatSpace(p.Doc(node.OffsetExpr), pretty.Keyword("PRECEDING"))
772 case CurrentRow:
773 return pretty.Keyword("CURRENT ROW")
774 case OffsetFollowing:
775 return pretty.ConcatSpace(p.Doc(node.OffsetExpr), pretty.Keyword("FOLLOWING"))
776 case UnboundedFollowing:
777 return pretty.Keyword("UNBOUNDED FOLLOWING")
778 default:
779 panic(errors.AssertionFailedf("unexpected type %d", errors.Safe(node.BoundType)))
780 }
781}
782
783func (node *LockingClause) doc(p *PrettyCfg) pretty.Doc {
784 return p.rlTable(node.docTable(p)...)

Callers

nothing calls this directly

Calls 3

KeywordFunction · 0.92
ConcatSpaceFunction · 0.92
DocMethod · 0.80

Tested by

no test coverage detected