aboutsummaryrefslogtreecommitdiff
path: root/src/treeview.c
diff options
context:
space:
mode:
authordrh <>2022-04-15 15:47:14 +0000
committerdrh <>2022-04-15 15:47:14 +0000
commita99e325468d0c46919cf8a88f7c0b5bb8a4987a8 (patch)
tree3d929a2ac23c4e6acd1a1aadd57ed06c39939f28 /src/treeview.c
parent358424aeff71bc8b38053b822091f4c6532ec5b1 (diff)
downloadsqlite-a99e325468d0c46919cf8a88f7c0b5bb8a4987a8.tar.gz
sqlite-a99e325468d0c46919cf8a88f7c0b5bb8a4987a8.zip
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
Diffstat (limited to 'src/treeview.c')
-rw-r--r--src/treeview.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/treeview.c b/src/treeview.c
index 0a3f94267..ff5558aca 100644
--- a/src/treeview.c
+++ b/src/treeview.c
@@ -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);
}
}