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

Method maybePrependConstraintName

pkg/sql/sem/tree/pretty.go:1701–1709  ·  view source on GitHub ↗
(constraintName *Name, d pretty.Doc)

Source from the content-addressed store, hash-verified

1699}
1700
1701func (p *PrettyCfg) maybePrependConstraintName(constraintName *Name, d pretty.Doc) pretty.Doc {
1702 if *constraintName != "" {
1703 return pretty.Fold(pretty.ConcatSpace,
1704 pretty.Keyword("CONSTRAINT"),
1705 p.Doc(constraintName),
1706 d)
1707 }
1708 return d
1709}
1710
1711func (node *ColumnTableDef) doc(p *PrettyCfg) pretty.Doc {
1712 return p.unrow(node.docRow(p))

Callers 1

docRowMethod · 0.80

Calls 3

DocMethod · 0.95
FoldFunction · 0.92
KeywordFunction · 0.92

Tested by

no test coverage detected