MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / eqp_render_level

Function eqp_render_level

modules/dasSQLITE/sqlite/shell.c:17330–17345  ·  view source on GitHub ↗

Render a single level of the graph that has iEqpId as its parent. Called ** recursively to render sublevels. */

Source from the content-addressed store, hash-verified

17328** recursively to render sublevels.
17329*/
17330static void eqp_render_level(ShellState *p, int iEqpId){
17331 EQPGraphRow *pRow, *pNext;
17332 i64 n = strlen(p->sGraph.zPrefix);
17333 char *z;
17334 for(pRow = eqp_next_row(p, iEqpId, 0); pRow; pRow = pNext){
17335 pNext = eqp_next_row(p, iEqpId, pRow);
17336 z = pRow->zText;
17337 utf8_printf(p->out, "%s%s%s\n", p->sGraph.zPrefix,
17338 pNext ? "|--" : "`--", z);
17339 if( n<(i64)sizeof(p->sGraph.zPrefix)-7 ){
17340 memcpy(&p->sGraph.zPrefix[n], pNext ? "| " : " ", 4);
17341 eqp_render_level(p, pRow->iEqpId);
17342 p->sGraph.zPrefix[n] = 0;
17343 }
17344 }
17345}
17346
17347/*
17348** Display and reset the EXPLAIN QUERY PLAN data

Callers 1

eqp_renderFunction · 0.85

Calls 2

eqp_next_rowFunction · 0.85
utf8_printfFunction · 0.85

Tested by

no test coverage detected