(p *PrettyCfg)
| 491 | } |
| 492 | |
| 493 | func (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 | |
| 517 | func (node *OrderBy) doc(p *PrettyCfg) pretty.Doc { |
| 518 | return p.unrow(node.docRow(p)) |
no test coverage detected