(p *PrettyCfg)
| 504 | } |
| 505 | |
| 506 | func (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 | |
| 530 | func (node *OrderBy) doc(p *PrettyCfg) pretty.Doc { |
| 531 | return p.unrow(node.docRow(p)) |
no test coverage detected