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

Method doc

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

Source from the content-addressed store, hash-verified

1425}
1426
1427func (node *RangePartition) doc(p *PrettyCfg) pretty.Doc {
1428 // Final layout:
1429 //
1430 // PARTITION name
1431 // VALUES FROM (...)
1432 // TO (...)
1433 // [ .. subpartition ..]
1434 //
1435 title := pretty.ConcatSpace(
1436 pretty.Keyword("PARTITION"),
1437 p.Doc(&node.Name),
1438 )
1439
1440 clauses := make([]pretty.Doc, 2, 3)
1441 clauses[0] = pretty.ConcatSpace(
1442 pretty.Keyword("VALUES FROM"),
1443 p.bracket("(", p.Doc(&node.From), ")"))
1444 clauses[1] = pretty.ConcatSpace(
1445 pretty.Keyword("TO"),
1446 p.bracket("(", p.Doc(&node.To), ")"))
1447
1448 if node.Subpartition != nil {
1449 clauses = append(clauses, p.Doc(node.Subpartition))
1450 }
1451
1452 return p.nestUnder(title, pretty.Group(pretty.Stack(clauses...)))
1453}
1454
1455func (node *ShardedIndexDef) doc(p *PrettyCfg) pretty.Doc {
1456 // Final layout:

Callers

nothing calls this directly

Calls 7

ConcatSpaceFunction · 0.92
KeywordFunction · 0.92
GroupFunction · 0.92
StackFunction · 0.92
DocMethod · 0.80
bracketMethod · 0.80
nestUnderMethod · 0.80

Tested by

no test coverage detected