/ Check-in [5efd854f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In the sqlite3TreeViewExprList() routine, show the "AS" alias name for each expression in the list, if it exists.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5efd854fe21470336ba4140294b6c90ef39af32e103b92c664438d7485c50f9a
User & Date: drh 2017-12-22 19:53:02
Context
2017-12-23
11:51
Add a SELECTTRACE() macro to indicate when column names are assigned to a SELECT statement. This helps with debugging for tickets like [de3403bf5ae5f72e] and [3b4450072511e621]. check-in: 8f194008 user: drh tags: trunk
2017-12-22
19:53
In the sqlite3TreeViewExprList() routine, show the "AS" alias name for each expression in the list, if it exists. check-in: 5efd854f user: drh tags: trunk
00:52
Modify the new sqlite3_vtab_collation() interface so that it takes a pointer to the sqlite3_index_info object passed into xBestIndex rather than an sqlite3 connection pointer, which the xBestIndex method might not have access to. check-in: 5c1fe666 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/treeview.c.

   503    503     if( pList==0 ){
   504    504       sqlite3TreeViewLine(pView, "%s (empty)", zLabel);
   505    505     }else{
   506    506       int i;
   507    507       sqlite3TreeViewLine(pView, "%s", zLabel);
   508    508       for(i=0; i<pList->nExpr; i++){
   509    509         int j = pList->a[i].u.x.iOrderByCol;
   510         -      if( j ){
          510  +      char *zName = pList->a[i].zName;
          511  +      if( j || zName ){
   511    512           sqlite3TreeViewPush(pView, 0);
          513  +      }
          514  +      if( zName ){
          515  +        sqlite3TreeViewLine(pView, "AS %s", zName);
          516  +      }
          517  +      if( j ){
   512    518           sqlite3TreeViewLine(pView, "iOrderByCol=%d", j);
   513    519         }
   514    520         sqlite3TreeViewExpr(pView, pList->a[i].pExpr, i<pList->nExpr-1);
   515         -      if( j ) sqlite3TreeViewPop(pView);
          521  +      if( j || zName ){
          522  +        sqlite3TreeViewPop(pView);
          523  +      }
   516    524       }
   517    525     }
   518    526   }
   519    527   void sqlite3TreeViewExprList(
   520    528     TreeView *pView,
   521    529     const ExprList *pList,
   522    530     u8 moreToFollow,