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

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

?? expr.c

?? 調用sqlite開源數據的小程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
  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( sqlite3_malloc_failed ){    goto lookupname_end;  }  pExpr->iTable = -1;  while( pNC && cnt==0 ){    SrcList *pSrcList = pNC->pSrcList;    ExprList *pEList = pNC->pEList;    /* assert( zTab==0 || pEList==0 ); */    if( pSrcList ){      for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){        Table *pTab = pItem->pTab;        Column *pCol;          if( pTab==0 ) continue;        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[pTab->iDb].zName, zDb)!=0 ){              continue;            }          }        }        if( 0==(cntTab++) ){          pExpr->iTable = pItem->iCursor;          pExpr->iDb = pTab->iDb;          pMatch = pItem;        }        for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){            IdList *pUsing;            cnt++;            pExpr->iTable = pItem->iCursor;            pMatch = pItem;            pExpr->iDb = pTab->iDb;            /* 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 = pTab->aCol[j].pColl;            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 j;        Column *pCol = pTab->aCol;        pExpr->iDb = pTab->iDb;        cntTab++;        for(j=0; j < pTab->nCol; j++, pCol++) {          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){            cnt++;            pExpr->iColumn = j==pTab->iPKey ? -1 : j;            pExpr->affinity = pTab->aCol[j].affinity;            pExpr->pColl = pTab->aCol[j].pColl;            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!=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, 0);    }else if( zTab ){      sqlite3SetString(&z, zTab, ".", zCol, 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;  SrcList *pSrcList;  Parse *pParse;  if( pExpr==0 ) return 1;  assert( pNC!=0 );  pSrcList = pNC->pSrcList;  pParse = pNC->pParse;  if( ExprHasAnyProperty(pExpr, EP_Resolved) ) return 1;  ExprSetProperty(pExpr, EP_Resolved);#ifndef NDEBUG  if( pSrcList ){    int i;    for(i=0; i<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 = pParse->db->enc;  /* The database encoding */      zId = 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;        sqlite3SelectResolve(pParse, pExpr->pSelect, pNC);        assert( pNC->nRef>=nRef );        if( nRef!=pNC->nRef ){          ExprSetProperty(pExpr, EP_VarSelect);        }      }    }  }  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 ** Expr.opcode for such nodes is changed to TK_COLUMN.  The Expr.iTable** value is changed to the index of the referenced table in pTabList** plus the "base" value.  The base value will ultimately become the** VDBE cursor number for a cursor that is pointing into the referenced** table.  The Expr.iColumn value is changed to the index of the column ** of the referenced table.  The Expr.iColumn value for the special** ROWID column is -1.  Any INTEGER PRIMARY KEY column is tried as an** alias for ROWID.**** Also resolve function names and check the functions for proper** usage.  Make sure all function names are recognized and all functions** have the correct number of arguments.  Leave an error message** in pParse->zErrMsg if anything is amiss.  Return the number of errors.**** If the expression contains aggregate functions then set the EP_Agg** property on the expression.*/int sqlite3ExprResolveNames(  NameContext *pNC,       /* Namespace to resolve expressions in. */  Expr *pExpr             /* The expression to be analyzed. */){  int savedHasAgg;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲第一激情av| 色综合久久久久综合99| 国产1区2区3区精品美女| 在线观看网站黄不卡| 91精品国产乱码久久蜜臀| 亚洲国产精品v| 久久精品国产久精国产| 色婷婷亚洲一区二区三区| 久久久影视传媒| 五月天亚洲婷婷| 色先锋久久av资源部| 欧美国产精品专区| 国产一区二区影院| 69久久夜色精品国产69蝌蚪网| 国产精品久久久久久久岛一牛影视| 免费欧美日韩国产三级电影| 欧日韩精品视频| 另类综合日韩欧美亚洲| 欧美亚洲一区二区在线| 国产精品乱码久久久久久| 韩国成人在线视频| 日韩精品在线看片z| 亚洲国产日韩a在线播放性色| 99久免费精品视频在线观看| 久久精品在线免费观看| 蜜臀av一级做a爰片久久| 欧美色视频一区| 亚洲激情图片一区| 色综合久久久久久久久| 国产精品美女久久久久aⅴ| 国产综合色在线视频区| 精品成人佐山爱一区二区| 天堂一区二区在线免费观看| 欧美日免费三级在线| 亚洲一区影音先锋| 精品视频在线看| 亚洲大片在线观看| 欧美日韩国产综合视频在线观看| 午夜精品久久久久久久蜜桃app | 欧美一三区三区四区免费在线看| 亚洲一区二区三区不卡国产欧美| 色婷婷精品大视频在线蜜桃视频| 自拍av一区二区三区| 91蝌蚪porny九色| 伊人夜夜躁av伊人久久| 欧美日韩一区在线| 免费观看91视频大全| 日韩精品一区二区三区视频播放 | 成人av电影免费在线播放| 亚洲精品在线网站| 国内精品嫩模私拍在线| 国产欧美日韩精品a在线观看| 国产成人精品在线看| 中文字幕五月欧美| 欧美视频日韩视频| 韩国欧美一区二区| 中文字幕一区三区| 欧美人牲a欧美精品| 国产在线不卡一区| 亚洲三级小视频| 91精品国产美女浴室洗澡无遮挡| 国产精品一区二区视频| 亚洲色欲色欲www| 666欧美在线视频| 国产高清无密码一区二区三区| 一区精品在线播放| 91精品婷婷国产综合久久| 精一区二区三区| 18成人在线视频| 欧美电影影音先锋| 大胆亚洲人体视频| 视频一区欧美日韩| 国产喂奶挤奶一区二区三区| 色av成人天堂桃色av| 男女激情视频一区| 亚洲猫色日本管| 337p日本欧洲亚洲大胆色噜噜| 91在线播放网址| 精品在线一区二区三区| 亚洲人成亚洲人成在线观看图片 | 欧美日韩免费观看一区二区三区 | 欧美国产精品中文字幕| 91精品国产综合久久国产大片| 国产精品一二三| 亚洲不卡在线观看| 中文字幕在线一区免费| 欧美xxxxx裸体时装秀| 一本色道**综合亚洲精品蜜桃冫| 秋霞午夜av一区二区三区| 欧美激情一区三区| 日韩免费在线观看| 91成人网在线| 国产福利一区二区三区视频在线 | 一区二区三区鲁丝不卡| 久久精品亚洲精品国产欧美kt∨| 在线不卡中文字幕| 欧美中文字幕亚洲一区二区va在线| 国产成人午夜电影网| 美女在线一区二区| 亚洲综合在线视频| 国产精品免费视频观看| 久久久国产午夜精品| 欧美videossexotv100| 777久久久精品| 欧美三区在线观看| 91视视频在线直接观看在线看网页在线看| 韩国三级电影一区二区| 久久国产尿小便嘘嘘尿| 秋霞午夜鲁丝一区二区老狼| 日韩电影在线观看电影| 一区二区三区免费| 亚洲乱码国产乱码精品精可以看| 国产精品视频你懂的| 亚洲精品一区二区三区精华液| 91精品在线免费| 日韩欧美亚洲国产另类| 欧美一卡在线观看| 精品欧美一区二区三区精品久久| 国产一区二区三区电影在线观看| 麻豆国产91在线播放| 蜜臀精品一区二区三区在线观看| 琪琪一区二区三区| 久久99久国产精品黄毛片色诱| 麻豆国产欧美日韩综合精品二区| 久久精工是国产品牌吗| 久久99精品国产麻豆婷婷洗澡| 麻豆精品国产91久久久久久| 国产一区二区调教| 国产**成人网毛片九色 | 欧美在线观看18| 色嗨嗨av一区二区三区| 欧美午夜一区二区| 欧美高清视频不卡网| 精品日韩av一区二区| 欧美经典三级视频一区二区三区| 久久久久99精品国产片| 国产拍揄自揄精品视频麻豆| 国产欧美综合在线| 一区二区三区免费观看| 男女激情视频一区| eeuss鲁片一区二区三区| 日本福利一区二区| 欧美一区二区视频网站| 国产亚洲综合性久久久影院| 综合精品久久久| 日韩福利视频导航| 丁香一区二区三区| 在线观看www91| 欧美va在线播放| 一区二区三区免费| 国产在线不卡视频| 色哟哟日韩精品| 日韩视频在线观看一区二区| 国产精品三级视频| 日韩av高清在线观看| 成人午夜免费电影| 在线不卡a资源高清| 欧美国产日本视频| 久久久久久久久99精品| 一区二区三区四区av| 精品一区二区三区免费视频| 91免费视频大全| 久久这里只有精品6| 亚洲自拍偷拍九九九| 国产精品99久久久久久似苏梦涵| 在线观看欧美精品| 欧美激情一区三区| 免费观看在线色综合| 91捆绑美女网站| 中文av一区二区| 极品少妇xxxx偷拍精品少妇| 91黄色小视频| 国产精品久久久久久久久免费丝袜| 美女脱光内衣内裤视频久久网站 | 韩国v欧美v亚洲v日本v| 欧美视频一区在线观看| 国产精品欧美一级免费| 国产综合一区二区| 日韩欧美激情四射| 图片区小说区国产精品视频| 91香蕉国产在线观看软件| 精品va天堂亚洲国产| 婷婷久久综合九色综合绿巨人 | 国产乱人伦偷精品视频不卡| 欧美日韩一级视频| 亚洲精品老司机| 国产v综合v亚洲欧| 久久亚洲私人国产精品va媚药| 亚洲一区二区视频在线| 成人黄色av网站在线| 国产亚洲va综合人人澡精品| 激情综合色综合久久综合| 欧美高清视频一二三区| 婷婷综合久久一区二区三区| 欧美视频中文一区二区三区在线观看 | 国产成人av电影免费在线观看| 精品国偷自产国产一区| 麻豆精品视频在线| 久久久综合九色合综国产精品| 久久www免费人成看片高清|