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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? select.c

?? Trolltech公司發(fā)布的基于C++圖形開發(fā)環(huán)境
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
/*** 2001 September 15**** The author disclaims copyright to this source code.  In place of** a legal notice, here is a blessing:****    May you do good and not evil.**    May you find forgiveness for yourself and forgive others.**    May you share freely, never taking more than you give.***************************************************************************** This file contains C code routines that are called by the parser** to handle SELECT statements in SQLite.**** $Id: qt/select.c   3.3.4   edited Mar 30 2004 $*/#include "sqliteInt.h"/*** Allocate a new Select structure and return a pointer to that** structure.*/Select *sqliteSelectNew(  ExprList *pEList,     /* which columns to include in the result */  SrcList *pSrc,        /* the FROM clause -- which tables to scan */  Expr *pWhere,         /* the WHERE clause */  ExprList *pGroupBy,   /* the GROUP BY clause */  Expr *pHaving,        /* the HAVING clause */  ExprList *pOrderBy,   /* the ORDER BY clause */  int isDistinct,       /* true if the DISTINCT keyword is present */  int nLimit,           /* LIMIT value.  -1 means not used */  int nOffset           /* OFFSET value.  0 means no offset */){  Select *pNew;  pNew = sqliteMalloc( sizeof(*pNew) );  if( pNew==0 ){    sqliteExprListDelete(pEList);    sqliteSrcListDelete(pSrc);    sqliteExprDelete(pWhere);    sqliteExprListDelete(pGroupBy);    sqliteExprDelete(pHaving);    sqliteExprListDelete(pOrderBy);  }else{    if( pEList==0 ){      pEList = sqliteExprListAppend(0, sqliteExpr(TK_ALL,0,0,0), 0);    }    pNew->pEList = pEList;    pNew->pSrc = pSrc;    pNew->pWhere = pWhere;    pNew->pGroupBy = pGroupBy;    pNew->pHaving = pHaving;    pNew->pOrderBy = pOrderBy;    pNew->isDistinct = isDistinct;    pNew->op = TK_SELECT;    pNew->nLimit = nLimit;    pNew->nOffset = nOffset;    pNew->iLimit = -1;    pNew->iOffset = -1;  }  return pNew;}/*** Given 1 to 3 identifiers preceeding the JOIN keyword, determine the** type of join.  Return an integer constant that expresses that type** in terms of the following bit values:****     JT_INNER**     JT_OUTER**     JT_NATURAL**     JT_LEFT**     JT_RIGHT**** A full outer join is the combination of JT_LEFT and JT_RIGHT.**** If an illegal or unsupported join type is seen, then still return** a join type, but put an error in the pParse structure.*/int sqliteJoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){  int jointype = 0;  Token *apAll[3];  Token *p;  static struct {    const char *zKeyword;    int nChar;    int code;  } keywords[] = {    { "natural", 7, JT_NATURAL },    { "left",    4, JT_LEFT|JT_OUTER },    { "right",   5, JT_RIGHT|JT_OUTER },    { "full",    4, JT_LEFT|JT_RIGHT|JT_OUTER },    { "outer",   5, JT_OUTER },    { "inner",   5, JT_INNER },    { "cross",   5, JT_INNER },  };  int i, j;  apAll[0] = pA;  apAll[1] = pB;  apAll[2] = pC;  for(i=0; i<3 && apAll[i]; i++){    p = apAll[i];    for(j=0; j<sizeof(keywords)/sizeof(keywords[0]); j++){      if( p->n==keywords[j].nChar           && sqliteStrNICmp(p->z, keywords[j].zKeyword, p->n)==0 ){        jointype |= keywords[j].code;        break;      }    }    if( j>=sizeof(keywords)/sizeof(keywords[0]) ){      jointype |= JT_ERROR;      break;    }  }  if(     (jointype & (JT_INNER|JT_OUTER))==(JT_INNER|JT_OUTER) ||     (jointype & JT_ERROR)!=0  ){    static Token dummy = { 0, 0 };    char *zSp1 = " ", *zSp2 = " ";    if( pB==0 ){ pB = &dummy; zSp1 = 0; }    if( pC==0 ){ pC = &dummy; zSp2 = 0; }    sqliteSetNString(&pParse->zErrMsg, "unknown or unsupported join type: ", 0,       pA->z, pA->n, zSp1, 1, pB->z, pB->n, zSp2, 1, pC->z, pC->n, 0);    pParse->nErr++;    jointype = JT_INNER;  }else if( jointype & JT_RIGHT ){    sqliteErrorMsg(pParse,       "RIGHT and FULL OUTER JOINs are not currently supported");    jointype = JT_INNER;  }  return jointype;}/*** Return the index of a column in a table.  Return -1 if the column** is not contained in the table.*/static int columnIndex(Table *pTab, const char *zCol){  int i;  for(i=0; i<pTab->nCol; i++){    if( sqliteStrICmp(pTab->aCol[i].zName, zCol)==0 ) return i;  }  return -1;}/*** Add a term to the WHERE expression in *ppExpr that requires the** zCol column to be equal in the two tables pTab1 and pTab2.*/static void addWhereTerm(  const char *zCol,        /* Name of the column */  const Table *pTab1,      /* First table */  const Table *pTab2,      /* Second table */  Expr **ppExpr            /* Add the equality term to this expression */){  Token dummy;  Expr *pE1a, *pE1b, *pE1c;  Expr *pE2a, *pE2b, *pE2c;  Expr *pE;  dummy.z = zCol;  dummy.n = strlen(zCol);  dummy.dyn = 0;  pE1a = sqliteExpr(TK_ID, 0, 0, &dummy);  pE2a = sqliteExpr(TK_ID, 0, 0, &dummy);  dummy.z = pTab1->zName;  dummy.n = strlen(dummy.z);  pE1b = sqliteExpr(TK_ID, 0, 0, &dummy);  dummy.z = pTab2->zName;  dummy.n = strlen(dummy.z);  pE2b = sqliteExpr(TK_ID, 0, 0, &dummy);  pE1c = sqliteExpr(TK_DOT, pE1b, pE1a, 0);  pE2c = sqliteExpr(TK_DOT, pE2b, pE2a, 0);  pE = sqliteExpr(TK_EQ, pE1c, pE2c, 0);  ExprSetProperty(pE, EP_FromJoin);  if( *ppExpr ){    *ppExpr = sqliteExpr(TK_AND, *ppExpr, pE, 0);  }else{    *ppExpr = pE;  }}/*** Set the EP_FromJoin property on all terms of the given expression.**** The EP_FromJoin property is used on terms of an expression to tell** the LEFT OUTER JOIN processing logic that this term is part of the** join restriction specified in the ON or USING clause and not a part** of the more general WHERE clause.  These terms are moved over to the** WHERE clause during join processing but we need to remember that they** originated in the ON or USING clause.*/static void setJoinExpr(Expr *p){  while( p ){    ExprSetProperty(p, EP_FromJoin);    setJoinExpr(p->pLeft);    p = p->pRight;  } }/*** This routine processes the join information for a SELECT statement.** ON and USING clauses are converted into extra terms of the WHERE clause.** NATURAL joins also create extra WHERE clause terms.**** This routine returns the number of errors encountered.*/static int sqliteProcessJoin(Parse *pParse, Select *p){  SrcList *pSrc;  int i, j;  pSrc = p->pSrc;  for(i=0; i<pSrc->nSrc-1; i++){    struct SrcList_item *pTerm = &pSrc->a[i];    struct SrcList_item *pOther = &pSrc->a[i+1];    if( pTerm->pTab==0 || pOther->pTab==0 ) continue;    /* When the NATURAL keyword is present, add WHERE clause terms for    ** every column that the two tables have in common.    */    if( pTerm->jointype & JT_NATURAL ){      Table *pTab;      if( pTerm->pOn || pTerm->pUsing ){        sqliteErrorMsg(pParse, "a NATURAL join may not have "           "an ON or USING clause", 0);        return 1;      }      pTab = pTerm->pTab;      for(j=0; j<pTab->nCol; j++){        if( columnIndex(pOther->pTab, pTab->aCol[j].zName)>=0 ){          addWhereTerm(pTab->aCol[j].zName, pTab, pOther->pTab, &p->pWhere);        }      }    }    /* Disallow both ON and USING clauses in the same join    */    if( pTerm->pOn && pTerm->pUsing ){      sqliteErrorMsg(pParse, "cannot have both ON and USING "        "clauses in the same join");      return 1;    }    /* Add the ON clause to the end of the WHERE clause, connected by    ** and AND operator.    */    if( pTerm->pOn ){      setJoinExpr(pTerm->pOn);      if( p->pWhere==0 ){        p->pWhere = pTerm->pOn;      }else{        p->pWhere = sqliteExpr(TK_AND, p->pWhere, pTerm->pOn, 0);      }      pTerm->pOn = 0;    }    /* Create extra terms on the WHERE clause for each column named    ** in the USING clause.  Example: If the two tables to be joined are     ** A and B and the USING clause names X, Y, and Z, then add this    ** to the WHERE clause:    A.X=B.X AND A.Y=B.Y AND A.Z=B.Z    ** Report an error if any column mentioned in the USING clause is    ** not contained in both tables to be joined.    */    if( pTerm->pUsing ){      IdList *pList;      int j;      assert( i<pSrc->nSrc-1 );      pList = pTerm->pUsing;      for(j=0; j<pList->nId; j++){        if( columnIndex(pTerm->pTab, pList->a[j].zName)<0 ||            columnIndex(pOther->pTab, pList->a[j].zName)<0 ){          sqliteErrorMsg(pParse, "cannot join using column %s - column "            "not present in both tables", pList->a[j].zName);          return 1;        }        addWhereTerm(pList->a[j].zName, pTerm->pTab, pOther->pTab, &p->pWhere);      }    }  }  return 0;}/*** Delete the given Select structure and all of its substructures.*/void sqliteSelectDelete(Select *p){  if( p==0 ) return;  sqliteExprListDelete(p->pEList);  sqliteSrcListDelete(p->pSrc);  sqliteExprDelete(p->pWhere);  sqliteExprListDelete(p->pGroupBy);  sqliteExprDelete(p->pHaving);  sqliteExprListDelete(p->pOrderBy);  sqliteSelectDelete(p->pPrior);  sqliteFree(p->zSelect);  sqliteFree(p);}/*** Delete the aggregate information from the parse structure.*/static void sqliteAggregateInfoReset(Parse *pParse){  sqliteFree(pParse->aAgg);  pParse->aAgg = 0;  pParse->nAgg = 0;  pParse->useAgg = 0;}/*** Insert code into "v" that will push the record on the top of the** stack into the sorter.*/static void pushOntoSorter(Parse *pParse, Vdbe *v, ExprList *pOrderBy){  char *zSortOrder;  int i;  zSortOrder = sqliteMalloc( pOrderBy->nExpr + 1 );  if( zSortOrder==0 ) return;  for(i=0; i<pOrderBy->nExpr; i++){    int order = pOrderBy->a[i].sortOrder;    int type;    int c;    if( (order & SQLITE_SO_TYPEMASK)==SQLITE_SO_TEXT ){      type = SQLITE_SO_TEXT;    }else if( (order & SQLITE_SO_TYPEMASK)==SQLITE_SO_NUM ){      type = SQLITE_SO_NUM;    }else if( pParse->db->file_format>=4 ){      type = sqliteExprType(pOrderBy->a[i].pExpr);    }else{      type = SQLITE_SO_NUM;    }    if( (order & SQLITE_SO_DIRMASK)==SQLITE_SO_ASC ){      c = type==SQLITE_SO_TEXT ? 'A' : '+';    }else{      c = type==SQLITE_SO_TEXT ? 'D' : '-';    }    zSortOrder[i] = c;    sqliteExprCode(pParse, pOrderBy->a[i].pExpr);  }  zSortOrder[pOrderBy->nExpr] = 0;  sqliteVdbeOp3(v, OP_SortMakeKey, pOrderBy->nExpr, 0, zSortOrder, P3_DYNAMIC);  sqliteVdbeAddOp(v, OP_SortPut, 0, 0);}/*** This routine adds a P3 argument to the last VDBE opcode that was** inserted. The P3 argument added is a string suitable for the ** OP_MakeKey or OP_MakeIdxKey opcodes.  The string consists of** characters 't' or 'n' depending on whether or not the various** fields of the key to be generated should be treated as numeric** or as text.  See the OP_MakeKey and OP_MakeIdxKey opcode** documentation for additional information about the P3 string.** See also the sqliteAddIdxKeyType() routine.*/void sqliteAddKeyType(Vdbe *v, ExprList *pEList){  int nColumn = pEList->nExpr;  char *zType = sqliteMalloc( nColumn+1 );  int i;  if( zType==0 ) return;  for(i=0; i<nColumn; i++){    zType[i] = sqliteExprType(pEList->a[i].pExpr)==SQLITE_SO_NUM ? 'n' : 't';  }  zType[i] = 0;  sqliteVdbeChangeP3(v, -1, zType, P3_DYNAMIC);}/*** This routine generates the code for the inside of the inner loop** of a SELECT.**** If srcTab and nColumn are both zero, then the pEList expressions** are evaluated in order to get the data for this row.  If nColumn>0** then data is pulled from srcTab and pEList is used only to get the** datatypes for each column.*/static int selectInnerLoop(  Parse *pParse,          /* The parser context */  Select *p,              /* The complete select statement being coded */  ExprList *pEList,       /* List of values being extracted */  int srcTab,             /* Pull data from this table */  int nColumn,            /* Number of columns in the source table */  ExprList *pOrderBy,     /* If not NULL, sort results using this key */  int distinct,           /* If >=0, make sure results are distinct */  int eDest,              /* How to dispose of the results */  int iParm,              /* An argument to the disposal method */  int iContinue,          /* Jump here to continue with next row */  int iBreak              /* Jump here to break out of the inner loop */){  Vdbe *v = pParse->pVdbe;  int i;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av成人动漫在线观看| 国产精品1区二区.| 国产亚洲欧洲997久久综合| 在线这里只有精品| 久草中文综合在线| 亚洲国产日韩精品| 99r国产精品| 国产精品亲子伦对白| 欧美日韩久久一区| 国产91丝袜在线18| 免费一级片91| 亚洲国产精品视频| 国产精品三级av在线播放| 日韩一区二区电影| 欧美日韩在线播放三区四区| 国产999精品久久久久久绿帽| 久久精品999| 亚洲综合自拍偷拍| 中文字幕在线播放不卡一区| 久久久综合视频| 日韩一区二区电影在线| 欧美亚洲国产一卡| 久久99国产精品麻豆| 国产盗摄一区二区三区| 懂色中文一区二区在线播放| 日本aⅴ免费视频一区二区三区| 亚洲男人的天堂一区二区| 欧美精品一区二区三区在线| 欧美一区二区三区电影| 在线观看www91| 在线观看av一区二区| 91黄色免费看| 色婷婷一区二区| av日韩在线网站| 成年人国产精品| 成人va在线观看| 成人动漫一区二区在线| 丁香天五香天堂综合| 粉嫩久久99精品久久久久久夜| 国产剧情一区二区| 国产成人精品一区二| 国产老肥熟一区二区三区| 国产不卡在线视频| 成人app软件下载大全免费| av中文字幕亚洲| 99综合影院在线| 色综合色综合色综合色综合色综合| 成人免费毛片高清视频| 成人一区二区三区| 日韩国产高清在线| 一区二区三区国产豹纹内裤在线| 夜夜爽夜夜爽精品视频| 亚洲美腿欧美偷拍| 亚洲三级在线播放| 中文字幕在线观看一区二区| 欧美激情一区二区三区蜜桃视频| 国产亚洲一区二区三区| 久久免费看少妇高潮| 欧美一级在线视频| 久久久精品中文字幕麻豆发布| 欧美成人艳星乳罩| 精品国产乱码久久久久久牛牛| 欧美一区二区精品在线| 欧美成人一区二区三区片免费| 日韩欧美aaaaaa| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 中文字幕在线观看不卡视频| 国产精品午夜电影| 亚洲私人黄色宅男| 亚洲激情自拍偷拍| 国产精选一区二区三区| 国产精品 欧美精品| 高清成人免费视频| 成人福利在线看| 91视频在线观看免费| 欧美在线你懂得| 欧美一区二区三区四区久久| 欧美tk丨vk视频| 欧美激情综合在线| 亚洲欧美另类在线| 肉肉av福利一精品导航| 精品系列免费在线观看| 国产成人午夜视频| 国产91精品在线观看| 91在线观看高清| 色婷婷久久综合| 69久久99精品久久久久婷婷 | 国产精品66部| 色婷婷激情综合| 91精品久久久久久久91蜜桃| 久久综合久色欧美综合狠狠| 欧美成人欧美edvon| 国产精品久久久久久亚洲毛片| 亚洲图片欧美色图| 国产资源精品在线观看| 91丝袜高跟美女视频| 91蜜桃网址入口| 欧美日韩在线播| 国产日韩欧美精品在线| 亚洲嫩草精品久久| 久久99深爱久久99精品| 91视频一区二区| 日韩一区二区三区视频在线观看| 国产女人水真多18毛片18精品视频| 亚洲综合网站在线观看| 午夜欧美在线一二页| 麻豆国产欧美一区二区三区| 95精品视频在线| 精品裸体舞一区二区三区| 亚洲欧美综合另类在线卡通| 日本特黄久久久高潮| 99久久精品一区二区| 欧美精品v日韩精品v韩国精品v| 日本一区二区综合亚洲| 亚洲黄色av一区| 久久精品久久综合| 91丨九色porny丨蝌蚪| 欧美亚洲精品一区| 国产性色一区二区| 亚洲精品一二三四区| 午夜精品久久久久久久99水蜜桃| 不卡一区中文字幕| 精品久久久久久最新网址| 亚洲永久精品国产| www.日韩大片| 欧美va日韩va| 亚洲码国产岛国毛片在线| 国产一区二区免费视频| 欧美日韩一二三| 精品国产一区二区三区久久影院| 亚洲国产精华液网站w| 久久99精品久久久久久久久久久久| 欧美性猛交xxxx黑人交| 亚洲精品日韩专区silk| 成人av手机在线观看| 亚洲精品国产a| 成人免费观看视频| 69久久夜色精品国产69蝌蚪网| 国产精品久久看| 麻豆免费看一区二区三区| 欧美性色综合网| 亚洲视频一区二区免费在线观看| 九九九精品视频| 欧美电影在线免费观看| 亚洲二区视频在线| www.亚洲人| 亚洲婷婷综合色高清在线| 国产99久久久久久免费看农村| 久久综合网色—综合色88| 免费观看在线综合| 3d动漫精品啪啪1区2区免费| 亚洲自拍偷拍综合| 不卡一区在线观看| 自拍偷拍亚洲综合| 91浏览器在线视频| 亚洲美腿欧美偷拍| 欧美主播一区二区三区| 国产日韩欧美精品在线| 成人免费毛片a| 亚洲人成在线播放网站岛国 | 日本韩国一区二区三区| 国产不卡视频一区二区三区| 欧美一区二区三区免费观看视频| 日韩国产精品久久久| 91精品国产aⅴ一区二区| 国产精品美女视频| av毛片久久久久**hd| 中文字幕高清一区| caoporn国产精品| 亚洲一二三四在线观看| 91精品国产综合久久香蕉的特点| 蜜桃av一区二区| 精品国产不卡一区二区三区| 亚洲一区二区精品3399| 色综合视频一区二区三区高清| 亚洲一区免费观看| 91精品蜜臀在线一区尤物| 国产乱子轮精品视频| 国产精品盗摄一区二区三区| 久草这里只有精品视频| 国产精品成人一区二区艾草| 91福利小视频| 免费高清在线视频一区·| 国产色综合一区| 国产麻豆91精品| 亚洲aaa精品| 精品国产一区二区三区久久久蜜月 | 在线不卡一区二区| 视频在线在亚洲| 久久综合一区二区| 99久久精品国产导航| 亚洲一线二线三线视频| 日韩欧美你懂的| 国产精品一区二区无线| 国产精品天美传媒| 欧美理论片在线| www.欧美色图| 日韩国产欧美视频| 中文字幕在线观看不卡| 欧美日韩精品一区二区三区四区|