亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? select.c

?? Trolltech公司發布的基于C++圖形開發環境
?? C
?? 第 1 頁 / 共 5 頁
字號:
    return 0;  }  pTab->zName = zTabName ? sqliteStrDup(zTabName) : 0;  pEList = pSelect->pEList;  pTab->nCol = pEList->nExpr;  assert( pTab->nCol>0 );  pTab->aCol = aCol = sqliteMalloc( sizeof(pTab->aCol[0])*pTab->nCol );  for(i=0; i<pTab->nCol; i++){    Expr *p, *pR;    if( pEList->a[i].zName ){      aCol[i].zName = sqliteStrDup(pEList->a[i].zName);    }else if( (p=pEList->a[i].pExpr)->op==TK_DOT                && (pR=p->pRight)!=0 && pR->token.z && pR->token.z[0] ){      int cnt;      sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, 0);      for(j=cnt=0; j<i; j++){        if( sqliteStrICmp(aCol[j].zName, aCol[i].zName)==0 ){          int n;          char zBuf[30];          sprintf(zBuf,"_%d",++cnt);          n = strlen(zBuf);          sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, zBuf, n,0);          j = -1;        }      }    }else if( p->span.z && p->span.z[0] ){      sqliteSetNString(&pTab->aCol[i].zName, p->span.z, p->span.n, 0);    }else{      char zBuf[30];      sprintf(zBuf, "column%d", i+1);      pTab->aCol[i].zName = sqliteStrDup(zBuf);    }  }  pTab->iPKey = -1;  return pTab;}/*** For the given SELECT statement, do three things.****    (1)  Fill in the pTabList->a[].pTab fields in the SrcList that **         defines the set of tables that should be scanned.  For views,**         fill pTabList->a[].pSelect with a copy of the SELECT statement**         that implements the view.  A copy is made of the view's SELECT**         statement so that we can freely modify or delete that statement**         without worrying about messing up the presistent representation**         of the view.****    (2)  Add terms to the WHERE clause to accomodate the NATURAL keyword**         on joins and the ON and USING clause of joins.****    (3)  Scan the list of columns in the result set (pEList) looking**         for instances of the "*" operator or the TABLE.* operator.**         If found, expand each "*" to be every column in every table**         and TABLE.* to be every column in TABLE.**** Return 0 on success.  If there are problems, leave an error message** in pParse and return non-zero.*/static int fillInColumnList(Parse *pParse, Select *p){  int i, j, k, rc;  SrcList *pTabList;  ExprList *pEList;  Table *pTab;  if( p==0 || p->pSrc==0 ) return 1;  pTabList = p->pSrc;  pEList = p->pEList;  /* Look up every table in the table list.  */  for(i=0; i<pTabList->nSrc; i++){    if( pTabList->a[i].pTab ){      /* This routine has run before!  No need to continue */      return 0;    }    if( pTabList->a[i].zName==0 ){      /* A sub-query in the FROM clause of a SELECT */      assert( pTabList->a[i].pSelect!=0 );      if( pTabList->a[i].zAlias==0 ){        char zFakeName[60];        sprintf(zFakeName, "sqlite_subquery_%p_",           (void*)pTabList->a[i].pSelect);        sqliteSetString(&pTabList->a[i].zAlias, zFakeName, 0);      }      pTabList->a[i].pTab = pTab =         sqliteResultSetOfSelect(pParse, pTabList->a[i].zAlias,                                        pTabList->a[i].pSelect);      if( pTab==0 ){        return 1;      }      /* The isTransient flag indicates that the Table structure has been      ** dynamically allocated and may be freed at any time.  In other words,      ** pTab is not pointing to a persistent table structure that defines      ** part of the schema. */      pTab->isTransient = 1;    }else{      /* An ordinary table or view name in the FROM clause */      pTabList->a[i].pTab = pTab =         sqliteLocateTable(pParse,pTabList->a[i].zName,pTabList->a[i].zDatabase);      if( pTab==0 ){        return 1;      }      if( pTab->pSelect ){        /* We reach here if the named table is a really a view */        if( sqliteViewGetColumnNames(pParse, pTab) ){          return 1;        }        /* If pTabList->a[i].pSelect!=0 it means we are dealing with a        ** view within a view.  The SELECT structure has already been        ** copied by the outer view so we can skip the copy step here        ** in the inner view.        */        if( pTabList->a[i].pSelect==0 ){          pTabList->a[i].pSelect = sqliteSelectDup(pTab->pSelect);        }      }    }  }  /* Process NATURAL keywords, and ON and USING clauses of joins.  */  if( sqliteProcessJoin(pParse, p) ) return 1;  /* For every "*" that occurs in the column list, insert the names of  ** all columns in all tables.  And for every TABLE.* insert the names  ** of all columns in TABLE.  The parser inserted a special expression  ** with the TK_ALL operator for each "*" that it found in the column list.  ** The following code just has to locate the TK_ALL expressions and expand  ** each one to the list of all columns in all tables.  **  ** The first loop just checks to see if there are any "*" operators  ** that need expanding.  */  for(k=0; k<pEList->nExpr; k++){    Expr *pE = pEList->a[k].pExpr;    if( pE->op==TK_ALL ) break;    if( pE->op==TK_DOT && pE->pRight && pE->pRight->op==TK_ALL         && pE->pLeft && pE->pLeft->op==TK_ID ) break;  }  rc = 0;  if( k<pEList->nExpr ){    /*    ** If we get here it means the result set contains one or more "*"    ** operators that need to be expanded.  Loop through each expression    ** in the result set and expand them one by one.    */    struct ExprList_item *a = pEList->a;    ExprList *pNew = 0;    for(k=0; k<pEList->nExpr; k++){      Expr *pE = a[k].pExpr;      if( pE->op!=TK_ALL &&           (pE->op!=TK_DOT || pE->pRight==0 || pE->pRight->op!=TK_ALL) ){        /* This particular expression does not need to be expanded.        */        pNew = sqliteExprListAppend(pNew, a[k].pExpr, 0);        pNew->a[pNew->nExpr-1].zName = a[k].zName;        a[k].pExpr = 0;        a[k].zName = 0;      }else{        /* This expression is a "*" or a "TABLE.*" and needs to be        ** expanded. */        int tableSeen = 0;      /* Set to 1 when TABLE matches */        Token *pName;           /* text of name of TABLE */        if( pE->op==TK_DOT && pE->pLeft ){          pName = &pE->pLeft->token;        }else{          pName = 0;        }        for(i=0; i<pTabList->nSrc; i++){          Table *pTab = pTabList->a[i].pTab;          char *zTabName = pTabList->a[i].zAlias;          if( zTabName==0 || zTabName[0]==0 ){             zTabName = pTab->zName;          }          if( pName && (zTabName==0 || zTabName[0]==0 ||                  sqliteStrNICmp(pName->z, zTabName, pName->n)!=0 ||                 zTabName[pName->n]!=0) ){            continue;          }          tableSeen = 1;          for(j=0; j<pTab->nCol; j++){            Expr *pExpr, *pLeft, *pRight;            char *zName = pTab->aCol[j].zName;            if( i>0 && (pTabList->a[i-1].jointype & JT_NATURAL)!=0 &&                columnIndex(pTabList->a[i-1].pTab, zName)>=0 ){              /* In a NATURAL join, omit the join columns from the               ** table on the right */              continue;            }            if( i>0 && sqliteIdListIndex(pTabList->a[i-1].pUsing, zName)>=0 ){              /* In a join with a USING clause, omit columns in the              ** using clause from the table on the right. */              continue;            }            pRight = sqliteExpr(TK_ID, 0, 0, 0);            if( pRight==0 ) break;            pRight->token.z = zName;            pRight->token.n = strlen(zName);            pRight->token.dyn = 0;            if( zTabName && pTabList->nSrc>1 ){              pLeft = sqliteExpr(TK_ID, 0, 0, 0);              pExpr = sqliteExpr(TK_DOT, pLeft, pRight, 0);              if( pExpr==0 ) break;              pLeft->token.z = zTabName;              pLeft->token.n = strlen(zTabName);              pLeft->token.dyn = 0;              sqliteSetString((char**)&pExpr->span.z, zTabName, ".", zName, 0);              pExpr->span.n = strlen(pExpr->span.z);              pExpr->span.dyn = 1;              pExpr->token.z = 0;              pExpr->token.n = 0;              pExpr->token.dyn = 0;            }else{              pExpr = pRight;              pExpr->span = pExpr->token;            }            pNew = sqliteExprListAppend(pNew, pExpr, 0);          }        }        if( !tableSeen ){          if( pName ){            sqliteErrorMsg(pParse, "no such table: %T", pName);          }else{            sqliteErrorMsg(pParse, "no tables specified");          }          rc = 1;        }      }    }    sqliteExprListDelete(pEList);    p->pEList = pNew;  }  return rc;}/*** This routine recursively unlinks the Select.pSrc.a[].pTab pointers** in a select structure.  It just sets the pointers to NULL.  This** routine is recursive in the sense that if the Select.pSrc.a[].pSelect** pointer is not NULL, this routine is called recursively on that pointer.**** This routine is called on the Select structure that defines a** VIEW in order to undo any bindings to tables.  This is necessary** because those tables might be DROPed by a subsequent SQL command.** If the bindings are not removed, then the Select.pSrc->a[].pTab field** will be left pointing to a deallocated Table structure after the** DROP and a coredump will occur the next time the VIEW is used.*/void sqliteSelectUnbind(Select *p){  int i;  SrcList *pSrc = p->pSrc;  Table *pTab;  if( p==0 ) return;  for(i=0; i<pSrc->nSrc; i++){    if( (pTab = pSrc->a[i].pTab)!=0 ){      if( pTab->isTransient ){        sqliteDeleteTable(0, pTab);      }      pSrc->a[i].pTab = 0;      if( pSrc->a[i].pSelect ){        sqliteSelectUnbind(pSrc->a[i].pSelect);      }    }  }}/*** This routine associates entries in an ORDER BY expression list with** columns in a result.  For each ORDER BY expression, the opcode of** the top-level node is changed to TK_COLUMN and the iColumn value of** the top-level node is filled in with column number and the iTable** value of the top-level node is filled with iTable parameter.**** If there are prior SELECT clauses, they are processed first.  A match** in an earlier SELECT takes precedence over a later SELECT.**** Any entry that does not match is flagged as an error.  The number** of errors is returned.**** This routine does NOT correctly initialize the Expr.dataType  field** of the ORDER BY expressions.  The multiSelectSortOrder() routine** must be called to do that after the individual select statements** have all been analyzed.  This routine is unable to compute Expr.dataType** because it must be called before the individual select statements** have been analyzed.*/static int matchOrderbyToColumn(  Parse *pParse,          /* A place to leave error messages */  Select *pSelect,        /* Match to result columns of this SELECT */  ExprList *pOrderBy,     /* The ORDER BY values to match against columns */  int iTable,             /* Insert this value in iTable */  int mustComplete        /* If TRUE all ORDER BYs must match */){  int nErr = 0;  int i, j;  ExprList *pEList;  if( pSelect==0 || pOrderBy==0 ) return 1;  if( mustComplete ){    for(i=0; i<pOrderBy->nExpr; i++){ pOrderBy->a[i].done = 0; }  }  if( fillInColumnList(pParse, pSelect) ){    return 1;  }  if( pSelect->pPrior ){    if( matchOrderbyToColumn(pParse, pSelect->pPrior, pOrderBy, iTable, 0) ){      return 1;    }  }  pEList = pSelect->pEList;  for(i=0; i<pOrderBy->nExpr; i++){    Expr *pE = pOrderBy->a[i].pExpr;    int iCol = -1;    if( pOrderBy->a[i].done ) continue;    if( sqliteExprIsInteger(pE, &iCol) ){      if( iCol<=0 || iCol>pEList->nExpr ){        sqliteErrorMsg(pParse,          "ORDER BY position %d should be between 1 and %d",          iCol, pEList->nExpr);        nErr++;        break;      }      if( !mustComplete ) continue;      iCol--;    }    for(j=0; iCol<0 && j<pEList->nExpr; j++){      if( pEList->a[j].zName && (pE->op==TK_ID || pE->op==TK_STRING) ){        char *zName, *zLabel;        zName = pEList->a[j].zName;        assert( pE->token.z );        zLabel = sqliteStrNDup(pE->token.z, pE->token.n);        sqliteDequote(zLabel);        if( sqliteStrICmp(zName, zLabel)==0 ){           iCol = j;        }        sqliteFree(zLabel);      }      if( iCol<0 && sqliteExprCompare(pE, pEList->a[j].pExpr) ){        iCol = j;      }    }    if( iCol>=0 ){      pE->op = TK_COLUMN;      pE->iColumn = iCol;      pE->iTable = iTable;      pOrderBy->a[i].done = 1;    }    if( iCol<0 && mustComplete ){      sqliteErrorMsg(pParse,        "ORDER BY term number %d does not match any result column", i+1);      nErr++;      break;    }  }  return nErr;  }/*** Get a VDBE for the given parser context.  Create a new one if necessary.** If an error occurs, return NULL and leave a message in pParse.*/Vdbe *sqliteGetVdbe(Parse *pParse){  Vdbe *v = pParse->pVdbe;  if( v==0 ){    v = pParse->pVdbe = sqliteVdbeCreate(pParse->db);  }  return v;}/*** This routine sets the Expr.dataType field on all elements of** the pOrderBy expression list.  The pOrderBy list will have been** set up by matchOrderbyToColumn().  Hence each expression has** a TK_COLUMN as its root node.  The Expr.iColumn refers to a ** column in the result set.   The datatype is set to SQLITE_SO_TEXT** if the corresponding column in p and every SELECT to the left of** p has a datatype of SQLITE_SO_TEXT.  If the cooressponding column** in p or any of the left SELECTs is SQLITE_SO_NUM, then the datatype** of the order-by expression is set to SQLITE_SO_NUM.**** Examples:****     CREATE TABLE one(a INTEGER, b TEXT);**     CREATE TABLE two(c VARCHAR(5), d FLOAT);****     SELECT b, b FROM one UNION SELECT d, c FROM two ORDER BY 1, 2;**** The primary sort key will use SQLITE_SO_NUM because the "d" in** the second SELECT is numeric.  The 1st column of the first SELECT

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美的一区二区| 精品一区二区三区蜜桃| 亚洲另类春色校园小说| 日韩成人伦理电影在线观看| 国产精品综合一区二区三区| 欧洲精品中文字幕| 中文字幕免费观看一区| 日本不卡视频在线观看| 欧美中文字幕一区二区三区 | 国产精品国产三级国产aⅴ入口| 一区二区欧美在线观看| 国产精品中文字幕欧美| 欧美日韩国产欧美日美国产精品| 国产精品国产自产拍高清av王其| 日本成人在线视频网站| 91福利视频久久久久| 国产精品女人毛片| 国内精品伊人久久久久av影院| 欧美午夜不卡在线观看免费| 国产精品激情偷乱一区二区∴| 国产精品亚洲一区二区三区妖精| 欧美成人a视频| 日韩电影在线观看一区| 欧美高清www午色夜在线视频| 亚洲精品福利视频网站| 99麻豆久久久国产精品免费优播| 国产亚洲女人久久久久毛片| 精品在线视频一区| 91精品婷婷国产综合久久性色| 午夜精品在线视频一区| 欧美日韩在线亚洲一区蜜芽| 一区二区在线观看免费视频播放| 91在线小视频| 尤物av一区二区| 欧美午夜理伦三级在线观看| 一级精品视频在线观看宜春院| 色视频成人在线观看免| 一个色综合av| 欧美精品精品一区| 毛片基地黄久久久久久天堂| 欧美v日韩v国产v| 国产精品亚洲第一区在线暖暖韩国| 欧美电影免费提供在线观看| 九色综合狠狠综合久久| 久久久久免费观看| 成人在线一区二区三区| 1区2区3区国产精品| 91福利社在线观看| 日本一区中文字幕| 国产亚洲午夜高清国产拍精品| 国产一区二区精品久久91| 国产色产综合产在线视频| 99精品久久只有精品| 亚洲在线中文字幕| 日韩精品一区二区三区swag| 丁香激情综合国产| 亚洲资源中文字幕| 精品国产a毛片| 99久久99久久综合| 日本sm残虐另类| 国产亚洲一二三区| 欧美午夜影院一区| 国产在线观看免费一区| 亚洲精品国产视频| 欧美大度的电影原声| 成人av网站免费观看| 亚洲1区2区3区4区| 国产欧美日韩一区二区三区在线观看| 99视频超级精品| 日本大胆欧美人术艺术动态| 欧美国产日韩a欧美在线观看 | 狂野欧美性猛交blacked| 久久综合久久综合九色| 色播五月激情综合网| 日本不卡免费在线视频| 亚洲欧美在线高清| 精品国产凹凸成av人导航| 日本国产一区二区| 国产精品18久久久| 日日摸夜夜添夜夜添国产精品| 国产日产欧产精品推荐色| 欧美日韩国产高清一区二区三区| 国产激情偷乱视频一区二区三区| 亚洲丰满少妇videoshd| 日本一区二区三区四区在线视频| 欧美日本国产视频| 91色婷婷久久久久合中文| 久久国产福利国产秒拍| 亚洲国产婷婷综合在线精品| 欧美国产精品一区二区| 日韩亚洲欧美一区二区三区| 色综合 综合色| 成人精品免费看| 国产在线精品国自产拍免费| 日本不卡免费在线视频| 亚洲福利视频三区| 亚洲乱码精品一二三四区日韩在线| 精品欧美一区二区在线观看| 欧美日韩综合在线| 色94色欧美sute亚洲13| 成人av一区二区三区| 国产精品亚洲午夜一区二区三区| 奇米精品一区二区三区四区| 亚洲国产视频在线| 亚洲自拍与偷拍| 亚洲另类一区二区| 亚洲欧美日韩电影| 1024精品合集| 欧美激情一区三区| 国产精品福利一区二区| 久久久99久久| 国产亚洲精品中文字幕| 欧美精品一区二区三区蜜臀| 日韩一级完整毛片| 欧美成人激情免费网| 日韩你懂的在线播放| 欧美成人综合网站| 精品国产乱码久久久久久久| 日韩你懂的在线播放| 久久婷婷综合激情| 久久久久久久国产精品影院| 精品成a人在线观看| 久久久欧美精品sm网站| 精品粉嫩aⅴ一区二区三区四区| 欧美电影免费观看高清完整版在线| 日韩午夜av电影| 久久午夜羞羞影院免费观看| 欧美激情一区二区三区蜜桃视频| 欧美国产一区在线| 亚洲免费观看高清完整版在线观看 | 91精品久久久久久久久99蜜臂| 成人综合在线网站| 成人小视频免费在线观看| 成人国产亚洲欧美成人综合网 | 丝袜亚洲另类欧美| 麻豆高清免费国产一区| 国产精品一区一区| av中文字幕亚洲| 欧美日韩一级片在线观看| 在线综合视频播放| 精品国产乱码久久| 中文字幕中文字幕中文字幕亚洲无线 | 91福利社在线观看| 777久久久精品| 日韩一区二区精品葵司在线| 久久亚洲欧美国产精品乐播| 国产精品久久国产精麻豆99网站| 久久久九九九九| 自拍偷拍亚洲综合| 日韩制服丝袜av| 成人午夜电影久久影院| 欧美中文字幕一区二区三区| 精品国产污网站| 亚洲视频免费在线观看| 蜜臀av一区二区| av中文字幕一区| 欧美刺激脚交jootjob| 中文字幕一区二区5566日韩| 日韩激情一区二区| 成人教育av在线| 欧美一级搡bbbb搡bbbb| 国产精品国产自产拍高清av王其| 三级欧美韩日大片在线看| 成人免费va视频| 欧美videofree性高清杂交| 亚洲精品高清视频在线观看| 国产真实精品久久二三区| 欧美揉bbbbb揉bbbbb| 国产精品免费av| 国内一区二区视频| 337p亚洲精品色噜噜噜| 亚洲天堂中文字幕| 国内精品伊人久久久久av影院 | 亚洲精品免费播放| 国产乱码精品一区二区三区av| 欧美系列日韩一区| 亚洲欧洲无码一区二区三区| 久久精品国产免费| 欧美午夜片在线看| 亚洲日本免费电影| 成人中文字幕电影| 久久久久久久久久久久久久久99| 日韩精品欧美成人高清一区二区| 99热这里都是精品| 国产日本一区二区| 国内成人自拍视频| 欧美电影免费观看高清完整版在线| 亚洲黄色小说网站| 99久久精品久久久久久清纯| 国产精品网曝门| 粉嫩绯色av一区二区在线观看| 精品国产自在久精品国产| 日韩国产欧美三级| 欧美日韩的一区二区| 亚洲制服欧美中文字幕中文字幕| av高清不卡在线| 亚洲欧美综合网| 91国偷自产一区二区三区成为亚洲经典| 国产欧美日韩卡一| 成人国产免费视频|