MCPcopy Create free account
hub / github.com/dolthub/doltgresql / docTable

Method docTable

postgres/parser/sem/tree/pretty.go:506–528  ·  view source on GitHub ↗
(p *PrettyCfg)

Source from the content-addressed store, hash-verified

504}
505
506func (node *Limit) docTable(p *PrettyCfg) []pretty.TableRow {
507 if node == nil {
508 return nil
509 }
510 res := make([]pretty.TableRow, 0, 2)
511 if node.Count != nil {
512 e := node.Count
513 if p.Simplify {
514 e = StripParens(e)
515 }
516 res = append(res, p.row("LIMIT", p.Doc(e)))
517 } else if node.LimitAll {
518 res = append(res, p.row("LIMIT", pretty.Keyword("ALL")))
519 }
520 if node.Offset != nil {
521 e := node.Offset
522 if p.Simplify {
523 e = StripParens(e)
524 }
525 res = append(res, p.row("OFFSET", p.Doc(e)))
526 }
527 return res
528}
529
530func (node *OrderBy) doc(p *PrettyCfg) pretty.Doc {
531 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