1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Enhance the IdList object to exist in a single memory allocation (rather than

a separate allocate for the base object and the array of IDs).  Also permit
an IdList object to store an Expr pointer together with each name.

FossilOrigin-Name: 40f3c95871e6f40f287ef2756abafb8fc56dffdd0af69436e5c7d8e95022d94e
This commit is contained in:
drh
2022-04-15 15:47:14 +00:00
parent 358424aeff
commit a99e325468
7 changed files with 65 additions and 41 deletions

View File

@@ -846,7 +846,21 @@ void sqlite3TreeViewBareIdList(
if( zName==0 ) zName = "(null)";
sqlite3TreeViewPush(&pView, moreToFollow);
sqlite3TreeViewLine(pView, 0);
fprintf(stdout, "%s (%d)\n", zName, pList->a[i].idx);
if( pList->eU4==EU4_NONE ){
fprintf(stdout, "%s\n", zName);
}else if( pList->eU4==EU4_IDX ){
fprintf(stdout, "%s (%d)\n", zName, pList->a[i].u4.idx);
}else{
assert( pList->eU4==EU4_EXPR );
if( pList->a[i].u4.pExpr==0 ){
fprintf(stdout, "%s (pExpr=NULL)\n", zName);
}else{
fprintf(stdout, "%s\n", zName);
sqlite3TreeViewPush(&pView, i<pList->nId-1);
sqlite3TreeViewExpr(pView, pList->a[i].u4.pExpr, 0);
sqlite3TreeViewPop(&pView);
}
}
sqlite3TreeViewPop(&pView);
}
}