Render a single level of the graph that has iEqpId as its parent. Called ** recursively to render sublevels. */
| 12040 | ** recursively to render sublevels. |
| 12041 | */ |
| 12042 | static void eqp_render_level(ShellState *p, int iEqpId){ |
| 12043 | EQPGraphRow *pRow, *pNext; |
| 12044 | int n = strlen30(p->sGraph.zPrefix); |
| 12045 | char *z; |
| 12046 | for(pRow = eqp_next_row(p, iEqpId, 0); pRow; pRow = pNext){ |
| 12047 | pNext = eqp_next_row(p, iEqpId, pRow); |
| 12048 | z = pRow->zText; |
| 12049 | utf8_printf(p->out, "%s%s%s\n", p->sGraph.zPrefix, |
| 12050 | pNext ? "|--" : "`--", z); |
| 12051 | if( n<(int)sizeof(p->sGraph.zPrefix)-7 ){ |
| 12052 | memcpy(&p->sGraph.zPrefix[n], pNext ? "| " : " ", 4); |
| 12053 | eqp_render_level(p, pRow->iEqpId); |
| 12054 | p->sGraph.zPrefix[n] = 0; |
| 12055 | } |
| 12056 | } |
| 12057 | } |
| 12058 | |
| 12059 | /* |
| 12060 | ** Display and reset the EXPLAIN QUERY PLAN data |
no test coverage detected