(_planData, _ctx)
| 40 | const DEFAULT_ARROW_SIZE = 2; |
| 41 | |
| 42 | export function nodeExplainTableData(_planData, _ctx) { |
| 43 | let node_info, |
| 44 | display_text = [], |
| 45 | tooltip = [], |
| 46 | node_extra_info = [], |
| 47 | info = _ctx.explainTable; |
| 48 | |
| 49 | // Display: <NODE>[ using <Index> ] [ on <Schema>.<Table>[ as <Alias>]] |
| 50 | |
| 51 | if (/Scan/.test(_planData['Node Type'])) { |
| 52 | display_text.push(_planData['Node Type']); |
| 53 | tooltip.push(_planData['Node Type']); |
| 54 | } else { |
| 55 | display_text.push(_planData['image_text']); |
| 56 | tooltip.push(_planData['image_text']); |
| 57 | } |
| 58 | node_info = tooltip.join(''); |
| 59 | |
| 60 | if (typeof(_planData['Index Name']) !== 'undefined') { |
| 61 | display_text.push(' using '); |
| 62 | tooltip.push(' using '); |
| 63 | display_text.push(_.escape(_planData['Index Name'])); |
| 64 | tooltip.push(_planData['Index Name']); |
| 65 | } |
| 66 | |
| 67 | if (typeof(_planData['Relation Name']) !== 'undefined') { |
| 68 | display_text.push(' on '); |
| 69 | tooltip.push(' on '); |
| 70 | if (typeof(_planData['Schema']) !== 'undefined') { |
| 71 | display_text.push(_.escape(_planData['Schema'])); |
| 72 | tooltip.push(_planData['Schema']); |
| 73 | display_text.push('.'); |
| 74 | tooltip.push('.'); |
| 75 | } |
| 76 | display_text.push(_.escape(_planData['Relation Name'])); |
| 77 | tooltip.push(_planData['Relation Name']); |
| 78 | |
| 79 | if (typeof(_planData['Alias']) !== 'undefined') { |
| 80 | display_text.push(' as '); |
| 81 | tooltip.push(' as '); |
| 82 | display_text.push(_.escape(_planData['Alias'])); |
| 83 | tooltip.push(_.escape(_planData['Alias'])); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | if ( |
| 88 | typeof(_planData['Plan Rows']) !== 'undefined' && |
| 89 | typeof(_planData['Plan Width']) !== 'undefined' |
| 90 | ) { |
| 91 | let cost = [ |
| 92 | ' (cost=', |
| 93 | (typeof(_planData['Startup Cost']) !== 'undefined' ? |
| 94 | _planData['Startup Cost'] : ''), |
| 95 | '..', |
| 96 | (typeof(_planData['Total Cost']) !== 'undefined' ? |
| 97 | _planData['Total Cost'] : ''), |
| 98 | ' rows=', |
| 99 | _planData['Plan Rows'], |
no test coverage detected