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

Method bracketKeyword

pkg/sql/sem/tree/pretty.go:117–132  ·  view source on GitHub ↗
(
	leftKeyword, leftParen string, inner pretty.Doc, rightParen, rightKeyword string,
)

Source from the content-addressed store, hash-verified

115}
116
117func (p *PrettyCfg) bracketKeyword(
118 leftKeyword, leftParen string, inner pretty.Doc, rightParen, rightKeyword string,
119) pretty.Doc {
120 var left, right pretty.Doc
121 if leftKeyword != "" {
122 left = p.keywordWithText("", leftKeyword, leftParen)
123 } else {
124 left = pretty.Text(leftParen)
125 }
126 if rightKeyword != "" {
127 right = p.keywordWithText(rightParen, rightKeyword, "")
128 } else {
129 right = pretty.Text(rightParen)
130 }
131 return p.bracketDoc(left, inner, right)
132}
133
134// Pretty pretty prints stmt with default options.
135func Pretty(stmt NodeFormatter) string {

Callers 11

docRowMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80

Calls 3

keywordWithTextMethod · 0.95
bracketDocMethod · 0.95
TextFunction · 0.92

Tested by

no test coverage detected