(p *PrettyCfg)
| 2423 | } |
| 2424 | |
| 2425 | func (node *DeclareCursor) docTable(p *PrettyCfg) []pretty.TableRow { |
| 2426 | optionsRow := pretty.Nil |
| 2427 | if node.Binary { |
| 2428 | optionsRow = pretty.ConcatSpace(optionsRow, pretty.Keyword("BINARY")) |
| 2429 | } |
| 2430 | if node.Sensitivity != UnspecifiedSensitivity { |
| 2431 | optionsRow = pretty.ConcatSpace(optionsRow, pretty.Keyword(node.Sensitivity.String())) |
| 2432 | } |
| 2433 | if node.Scroll != UnspecifiedScroll { |
| 2434 | optionsRow = pretty.ConcatSpace(optionsRow, pretty.Keyword(node.Scroll.String())) |
| 2435 | } |
| 2436 | cursorRow := pretty.Nil |
| 2437 | if node.Hold { |
| 2438 | cursorRow = pretty.ConcatSpace(cursorRow, pretty.Keyword("WITH HOLD")) |
| 2439 | } |
| 2440 | return []pretty.TableRow{ |
| 2441 | p.row("DECLARE", pretty.ConcatLine(p.Doc(&node.Name), optionsRow)), |
| 2442 | p.row("CURSOR", cursorRow), |
| 2443 | p.row("FOR", node.Select.doc(p)), |
| 2444 | } |
| 2445 | } |
| 2446 | |
| 2447 | func (node *DeclareCursor) doc(p *PrettyCfg) pretty.Doc { |
| 2448 | return p.rlTable(node.docTable(p)...) |
no test coverage detected