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

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

?? expr.c

?? 新版輕量級嵌入式數據庫
?? C
?? 第 1 頁 / 共 5 頁
字號:
  int i, j;            /* Loop counters */  int cnt = 0;         /* Number of matching column names */  int cntTab = 0;      /* Number of matching table names */  sqlite3 *db = pParse->db;  /* The database */  struct SrcList_item *pItem;       /* Use for looping over pSrcList items */  struct SrcList_item *pMatch = 0;  /* The matching pSrcList item */  NameContext *pTopNC = pNC;        /* First namecontext in the list */  assert( pColumnToken && pColumnToken->z ); /* The Z in X.Y.Z cannot be NULL */  zDb = sqlite3NameFromToken(pDbToken);  zTab = sqlite3NameFromToken(pTableToken);  zCol = sqlite3NameFromToken(pColumnToken);  if( sqlite3MallocFailed() ){    goto lookupname_end;  }  pExpr->iTable = -1;  while( pNC && cnt==0 ){    ExprList *pEList;    SrcList *pSrcList = pNC->pSrcList;    if( pSrcList ){      for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){        Table *pTab;        int iDb;        Column *pCol;          pTab = pItem->pTab;        assert( pTab!=0 );        iDb = sqlite3SchemaToIndex(db, pTab->pSchema);        assert( pTab->nCol>0 );        if( zTab ){          if( pItem->zAlias ){            char *zTabName = pItem->zAlias;            if( sqlite3StrICmp(zTabName, zTab)!=0 ) continue;          }else{            char *zTabName = pTab->zName;            if( zTabName==0 || sqlite3StrICmp(zTabName, zTab)!=0 ) continue;            if( zDb!=0 && sqlite3StrICmp(db->aDb[iDb].zName, zDb)!=0 ){              continue;            }          }        }        if( 0==(cntTab++) ){          pExpr->iTable = pItem->iCursor;          pExpr->pSchema = pTab->pSchema;          pMatch = pItem;        }        for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){            const char *zColl = pTab->aCol[j].zColl;            IdList *pUsing;            cnt++;            pExpr->iTable = pItem->iCursor;            pMatch = pItem;            pExpr->pSchema = pTab->pSchema;            /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */            pExpr->iColumn = j==pTab->iPKey ? -1 : j;            pExpr->affinity = pTab->aCol[j].affinity;            pExpr->pColl = sqlite3FindCollSeq(db, ENC(db), zColl,-1, 0);            if( pItem->jointype & JT_NATURAL ){              /* If this match occurred in the left table of a natural join,              ** then skip the right table to avoid a duplicate match */              pItem++;              i++;            }            if( (pUsing = pItem->pUsing)!=0 ){              /* If this match occurs on a column that is in the USING clause              ** of a join, skip the search of the right table of the join              ** to avoid a duplicate match there. */              int k;              for(k=0; k<pUsing->nId; k++){                if( sqlite3StrICmp(pUsing->a[k].zName, zCol)==0 ){                  pItem++;                  i++;                  break;                }              }            }            break;          }        }      }    }#ifndef SQLITE_OMIT_TRIGGER    /* If we have not already resolved the name, then maybe     ** it is a new.* or old.* trigger argument reference    */    if( zDb==0 && zTab!=0 && cnt==0 && pParse->trigStack!=0 ){      TriggerStack *pTriggerStack = pParse->trigStack;      Table *pTab = 0;      if( pTriggerStack->newIdx != -1 && sqlite3StrICmp("new", zTab) == 0 ){        pExpr->iTable = pTriggerStack->newIdx;        assert( pTriggerStack->pTab );        pTab = pTriggerStack->pTab;      }else if( pTriggerStack->oldIdx != -1 && sqlite3StrICmp("old", zTab)==0 ){        pExpr->iTable = pTriggerStack->oldIdx;        assert( pTriggerStack->pTab );        pTab = pTriggerStack->pTab;      }      if( pTab ){         int iCol;        Column *pCol = pTab->aCol;        pExpr->pSchema = pTab->pSchema;        cntTab++;        for(iCol=0; iCol < pTab->nCol; iCol++, pCol++) {          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){            const char *zColl = pTab->aCol[iCol].zColl;            cnt++;            pExpr->iColumn = iCol==pTab->iPKey ? -1 : iCol;            pExpr->affinity = pTab->aCol[iCol].affinity;            pExpr->pColl = sqlite3FindCollSeq(db, ENC(db), zColl,-1, 0);            pExpr->pTab = pTab;            break;          }        }      }    }#endif /* !defined(SQLITE_OMIT_TRIGGER) */    /*    ** Perhaps the name is a reference to the ROWID    */    if( cnt==0 && cntTab==1 && sqlite3IsRowid(zCol) ){      cnt = 1;      pExpr->iColumn = -1;      pExpr->affinity = SQLITE_AFF_INTEGER;    }    /*    ** If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z    ** might refer to an result-set alias.  This happens, for example, when    ** we are resolving names in the WHERE clause of the following command:    **    **     SELECT a+b AS x FROM table WHERE x<10;    **    ** In cases like this, replace pExpr with a copy of the expression that    ** forms the result set entry ("a+b" in the example) and return immediately.    ** Note that the expression in the result set should have already been    ** resolved by the time the WHERE clause is resolved.    */    if( cnt==0 && (pEList = pNC->pEList)!=0 && zTab==0 ){      for(j=0; j<pEList->nExpr; j++){        char *zAs = pEList->a[j].zName;        if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){          assert( pExpr->pLeft==0 && pExpr->pRight==0 );          pExpr->op = TK_AS;          pExpr->iColumn = j;          pExpr->pLeft = sqlite3ExprDup(pEList->a[j].pExpr);          cnt = 1;          assert( zTab==0 && zDb==0 );          goto lookupname_end_2;        }      }     }    /* Advance to the next name context.  The loop will exit when either    ** we have a match (cnt>0) or when we run out of name contexts.    */    if( cnt==0 ){      pNC = pNC->pNext;    }  }  /*  ** If X and Y are NULL (in other words if only the column name Z is  ** supplied) and the value of Z is enclosed in double-quotes, then  ** Z is a string literal if it doesn't match any column names.  In that  ** case, we need to return right away and not make any changes to  ** pExpr.  **  ** Because no reference was made to outer contexts, the pNC->nRef  ** fields are not changed in any context.  */  if( cnt==0 && zTab==0 && pColumnToken->z[0]=='"' ){    sqliteFree(zCol);    return 0;  }  /*  ** cnt==0 means there was not match.  cnt>1 means there were two or  ** more matches.  Either way, we have an error.  */  if( cnt!=1 ){    char *z = 0;    char *zErr;    zErr = cnt==0 ? "no such column: %s" : "ambiguous column name: %s";    if( zDb ){      sqlite3SetString(&z, zDb, ".", zTab, ".", zCol, (char*)0);    }else if( zTab ){      sqlite3SetString(&z, zTab, ".", zCol, (char*)0);    }else{      z = sqliteStrDup(zCol);    }    sqlite3ErrorMsg(pParse, zErr, z);    sqliteFree(z);    pTopNC->nErr++;  }  /* If a column from a table in pSrcList is referenced, then record  ** this fact in the pSrcList.a[].colUsed bitmask.  Column 0 causes  ** bit 0 to be set.  Column 1 sets bit 1.  And so forth.  If the  ** column number is greater than the number of bits in the bitmask  ** then set the high-order bit of the bitmask.  */  if( pExpr->iColumn>=0 && pMatch!=0 ){    int n = pExpr->iColumn;    if( n>=sizeof(Bitmask)*8 ){      n = sizeof(Bitmask)*8-1;    }    assert( pMatch->iCursor==pExpr->iTable );    pMatch->colUsed |= 1<<n;  }lookupname_end:  /* Clean up and return  */  sqliteFree(zDb);  sqliteFree(zTab);  sqlite3ExprDelete(pExpr->pLeft);  pExpr->pLeft = 0;  sqlite3ExprDelete(pExpr->pRight);  pExpr->pRight = 0;  pExpr->op = TK_COLUMN;lookupname_end_2:  sqliteFree(zCol);  if( cnt==1 ){    assert( pNC!=0 );    sqlite3AuthRead(pParse, pExpr, pNC->pSrcList);    if( pMatch && !pMatch->pSelect ){      pExpr->pTab = pMatch->pTab;    }    /* Increment the nRef value on all name contexts from TopNC up to    ** the point where the name matched. */    for(;;){      assert( pTopNC!=0 );      pTopNC->nRef++;      if( pTopNC==pNC ) break;      pTopNC = pTopNC->pNext;    }    return 0;  } else {    return 1;  }}/*** This routine is designed as an xFunc for walkExprTree().**** Resolve symbolic names into TK_COLUMN operators for the current** node in the expression tree.  Return 0 to continue the search down** the tree or 2 to abort the tree walk.**** This routine also does error checking and name resolution for** function names.  The operator for aggregate functions is changed** to TK_AGG_FUNCTION.*/static int nameResolverStep(void *pArg, Expr *pExpr){  NameContext *pNC = (NameContext*)pArg;  Parse *pParse;  if( pExpr==0 ) return 1;  assert( pNC!=0 );  pParse = pNC->pParse;  if( ExprHasAnyProperty(pExpr, EP_Resolved) ) return 1;  ExprSetProperty(pExpr, EP_Resolved);#ifndef NDEBUG  if( pNC->pSrcList && pNC->pSrcList->nAlloc>0 ){    SrcList *pSrcList = pNC->pSrcList;    int i;    for(i=0; i<pNC->pSrcList->nSrc; i++){      assert( pSrcList->a[i].iCursor>=0 && pSrcList->a[i].iCursor<pParse->nTab);    }  }#endif  switch( pExpr->op ){    /* Double-quoted strings (ex: "abc") are used as identifiers if    ** possible.  Otherwise they remain as strings.  Single-quoted    ** strings (ex: 'abc') are always string literals.    */    case TK_STRING: {      if( pExpr->token.z[0]=='\'' ) break;      /* Fall thru into the TK_ID case if this is a double-quoted string */    }    /* A lone identifier is the name of a column.    */    case TK_ID: {      lookupName(pParse, 0, 0, &pExpr->token, pNC, pExpr);      return 1;    }      /* A table name and column name:     ID.ID    ** Or a database, table and column:  ID.ID.ID    */    case TK_DOT: {      Token *pColumn;      Token *pTable;      Token *pDb;      Expr *pRight;      /* if( pSrcList==0 ) break; */      pRight = pExpr->pRight;      if( pRight->op==TK_ID ){        pDb = 0;        pTable = &pExpr->pLeft->token;        pColumn = &pRight->token;      }else{        assert( pRight->op==TK_DOT );        pDb = &pExpr->pLeft->token;        pTable = &pRight->pLeft->token;        pColumn = &pRight->pRight->token;      }      lookupName(pParse, pDb, pTable, pColumn, pNC, pExpr);      return 1;    }    /* Resolve function names    */    case TK_CONST_FUNC:    case TK_FUNCTION: {      ExprList *pList = pExpr->pList;    /* The argument list */      int n = pList ? pList->nExpr : 0;  /* Number of arguments */      int no_such_func = 0;       /* True if no such function exists */      int wrong_num_args = 0;     /* True if wrong number of arguments */      int is_agg = 0;             /* True if is an aggregate function */      int i;      int nId;                    /* Number of characters in function name */      const char *zId;            /* The function name. */      FuncDef *pDef;              /* Information about the function */      int enc = ENC(pParse->db);  /* The database encoding */      zId = (char*)pExpr->token.z;      nId = pExpr->token.n;      pDef = sqlite3FindFunction(pParse->db, zId, nId, n, enc, 0);      if( pDef==0 ){        pDef = sqlite3FindFunction(pParse->db, zId, nId, -1, enc, 0);        if( pDef==0 ){          no_such_func = 1;        }else{          wrong_num_args = 1;        }      }else{        is_agg = pDef->xFunc==0;      }      if( is_agg && !pNC->allowAgg ){        sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);        pNC->nErr++;        is_agg = 0;      }else if( no_such_func ){        sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);        pNC->nErr++;      }else if( wrong_num_args ){        sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",             nId, zId);        pNC->nErr++;      }      if( is_agg ){        pExpr->op = TK_AGG_FUNCTION;        pNC->hasAgg = 1;      }      if( is_agg ) pNC->allowAgg = 0;      for(i=0; pNC->nErr==0 && i<n; i++){        walkExprTree(pList->a[i].pExpr, nameResolverStep, pNC);      }      if( is_agg ) pNC->allowAgg = 1;      /* FIX ME:  Compute pExpr->affinity based on the expected return      ** type of the function       */      return is_agg;    }#ifndef SQLITE_OMIT_SUBQUERY    case TK_SELECT:    case TK_EXISTS:#endif    case TK_IN: {      if( pExpr->pSelect ){        int nRef = pNC->nRef;#ifndef SQLITE_OMIT_CHECK        if( pNC->isCheck ){          sqlite3ErrorMsg(pParse,"subqueries prohibited in CHECK constraints");        }#endif        sqlite3SelectResolve(pParse, pExpr->pSelect, pNC);        assert( pNC->nRef>=nRef );        if( nRef!=pNC->nRef ){          ExprSetProperty(pExpr, EP_VarSelect);        }      }      break;    }#ifndef SQLITE_OMIT_CHECK    case TK_VARIABLE: {      if( pNC->isCheck ){        sqlite3ErrorMsg(pParse,"parameters prohibited in CHECK constraints");      }      break;    }#endif  }  return 0;}/*** This routine walks an expression tree and resolves references to** table columns.  Nodes of the form ID.ID or ID resolve into an** index to the table in the table list and a column offset.  The 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲mv在线观看| 国产欧美一区二区精品秋霞影院| 亚洲国产wwwccc36天堂| 欧美日韩精品系列| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩欧美在线不卡| 国产精品资源在线看| 国产精品久久久久久久久免费樱桃 | 欧美色图免费看| 亚洲18色成人| 精品福利一区二区三区免费视频| 国产91高潮流白浆在线麻豆| 亚洲女爱视频在线| 欧美日韩美少妇| 国产乱子轮精品视频| 国产精品久久久久一区二区三区 | 丁香亚洲综合激情啪啪综合| 亚洲色图清纯唯美| 欧美日韩电影一区| 国产成人综合精品三级| 亚洲在线中文字幕| 国产嫩草影院久久久久| 欧美三级蜜桃2在线观看| 国内外成人在线| 伊人开心综合网| 精品av综合导航| 色哟哟在线观看一区二区三区| 人禽交欧美网站| 亚洲女与黑人做爰| 精品欧美久久久| 欧美自拍丝袜亚洲| 国产精品综合av一区二区国产馆| 亚洲精品写真福利| 久久综合中文字幕| 欧美日韩一区不卡| a美女胸又www黄视频久久| 蜜桃91丨九色丨蝌蚪91桃色| 国产精品福利一区二区三区| 91精品国产综合久久久久久| 丁香激情综合五月| 蜜臀久久久久久久| 一区二区国产视频| 国产婷婷色一区二区三区四区 | 日韩欧美亚洲国产精品字幕久久久| 福利视频网站一区二区三区| 亚洲第一激情av| 亚洲丝袜精品丝袜在线| 久久久久久久久一| 制服丝袜日韩国产| 欧美最新大片在线看| 成人激情午夜影院| 国产在线播放一区二区三区| 日韩黄色一级片| 一区二区三区av电影| 最近日韩中文字幕| 久久久精品tv| 精品久久一区二区三区| 欧美嫩在线观看| 在线欧美日韩精品| 一本大道久久a久久精品综合| 国产一区二区精品在线观看| 久久精品噜噜噜成人av农村| 天天操天天色综合| 丝袜亚洲另类欧美| 日韩专区在线视频| 国产综合色产在线精品 | 久久超级碰视频| 欧美bbbbb| 蜜乳av一区二区| 日韩成人免费在线| 日本亚洲天堂网| 午夜久久久影院| 亚洲高清视频的网址| 亚洲一区二区三区视频在线 | 久久综合色一综合色88| 日韩亚洲欧美在线| 日韩一级片在线播放| 欧美一区二区三区精品| 91精品国产手机| 精品欧美一区二区久久| 久久婷婷成人综合色| 国产日韩欧美亚洲| 国产精品久久久久影院色老大| 国产精品萝li| 亚洲激情在线激情| 亚洲成av人综合在线观看| 亚洲成av人在线观看| 日本不卡在线视频| 九九国产精品视频| 国产精品资源在线看| 91在线视频18| 欧美怡红院视频| 日韩精品一区在线观看| 国产女同性恋一区二区| 亚洲乱码国产乱码精品精小说 | 国产性色一区二区| 中文字幕一区二区三区乱码在线 | 一区二区在线免费观看| 日韩av一级电影| 国产精品一区二区在线观看不卡 | a级高清视频欧美日韩| 色综合久久久久综合体桃花网| 欧美午夜在线观看| 日韩欧美一区二区视频| 欧美激情一区二区三区| 亚洲一二三区不卡| 国产自产v一区二区三区c| 不卡的av电影| 欧美二区乱c少妇| 亚洲国产成人在线| 激情综合五月婷婷| 99国产麻豆精品| 日韩精品一区二区三区在线观看 | 国产一区二区三区四区五区美女| 不卡一卡二卡三乱码免费网站| 欧美日韩午夜精品| 精品国产成人在线影院| 一区二区三区在线免费| 久久av资源网| 在线观看日韩av先锋影音电影院| 日韩精品在线一区| 亚洲视频 欧洲视频| 国内精品久久久久影院薰衣草 | 欧美一级日韩一级| 国产精品毛片无遮挡高清| 亚洲成a人在线观看| 国产伦精品一区二区三区免费迷 | 欧美视频在线不卡| 亚洲国产成人私人影院tom| 日韩成人av影视| 色婷婷激情一区二区三区| 日韩欧美中文字幕公布| 亚洲黄色免费电影| 国产91精品一区二区麻豆网站 | 精品国产乱码久久久久久闺蜜| 亚洲视频小说图片| 国产91丝袜在线18| 精品福利视频一区二区三区| 香蕉乱码成人久久天堂爱免费| 成人激情免费电影网址| 精品日韩在线一区| 日欧美一区二区| 欧美视频日韩视频| 亚洲欧美二区三区| 99久久国产综合精品女不卡| 久久一日本道色综合| 日本免费新一区视频 | 欧美一级日韩不卡播放免费| 亚洲自拍偷拍欧美| 色婷婷国产精品| 国产精品视频线看| 国产成人精品综合在线观看| 日韩女优电影在线观看| 青青青爽久久午夜综合久久午夜| 91成人免费在线视频| 专区另类欧美日韩| 99视频有精品| 中文字幕在线不卡| 波多野结衣亚洲| 国产精品色眯眯| 成年人国产精品| 亚洲欧洲日产国产综合网| eeuss鲁一区二区三区| 国产精品色哟哟网站| 成人福利视频网站| 亚洲欧美综合在线精品| eeuss鲁片一区二区三区在线看| 中文字幕一区免费在线观看| 成人黄色av电影| 亚洲欧美一区二区三区国产精品| 成人av综合一区| 亚洲精品乱码久久久久久黑人| 91理论电影在线观看| 一区二区成人在线观看| 欧美日韩中文国产| 日本va欧美va精品| 久久久久国色av免费看影院| 福利视频网站一区二区三区| 亚洲欧洲一区二区在线播放| 91在线视频播放地址| 亚洲国产成人av网| 亚洲精品在线一区二区| 国产成人综合网站| 一区二区在线观看不卡| 6080yy午夜一二三区久久| 精品在线免费观看| 国产精品人成在线观看免费 | 欧美日本高清视频在线观看| 奇米在线7777在线精品| 久久精品欧美日韩精品| 一本大道av一区二区在线播放| 亚洲一区二区高清| 337p粉嫩大胆噜噜噜噜噜91av| 国产成人av电影在线播放| 亚洲日本一区二区| 欧美一区在线视频| 国产91精品入口| 亚洲一级二级三级| 国产午夜精品久久| 欧美日韩在线亚洲一区蜜芽|