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

Method docTable

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

Source from the content-addressed store, hash-verified

491}
492
493func (node *Limit) docTable(p *PrettyCfg) []pretty.TableRow {
494 if node == nil {
495 return nil
496 }
497 res := make([]pretty.TableRow, 0, 2)
498 if node.Count != nil {
499 e := node.Count
500 if p.Simplify {
501 e = StripParens(e)
502 }
503 res = append(res, p.row("LIMIT", p.Doc(e)))
504 } else if node.LimitAll {
505 res = append(res, p.row("LIMIT", pretty.Keyword("ALL")))
506 }
507 if node.Offset != nil {
508 e := node.Offset
509 if p.Simplify {
510 e = StripParens(e)
511 }
512 res = append(res, p.row("OFFSET", p.Doc(e)))
513 }
514 return res
515}
516
517func (node *OrderBy) doc(p *PrettyCfg) pretty.Doc {
518 return p.unrow(node.docRow(p))

Callers 1

docMethod · 0.95

Calls 4

KeywordFunction · 0.92
StripParensFunction · 0.85
rowMethod · 0.80
DocMethod · 0.80

Tested by

no test coverage detected