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

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

?? expr.c

?? 嵌入式數據系統軟件!
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*** 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 routines used for analyzing expressions and** for generating VDBE code that evaluates expressions in SQLite.**** $Id: expr.c,v 1.320 2007/12/14 15:12:21 drh Exp $*/#include "sqliteInt.h"#include <ctype.h>/*** Return the 'affinity' of the expression pExpr if any.**** If pExpr is a column, a reference to a column via an 'AS' alias,** or a sub-select with a column as the return value, then the ** affinity of that column is returned. Otherwise, 0x00 is returned,** indicating no affinity for the expression.**** i.e. the WHERE clause expresssions in the following statements all** have an affinity:**** CREATE TABLE t1(a);** SELECT * FROM t1 WHERE a;** SELECT a AS b FROM t1 WHERE b;** SELECT * FROM t1 WHERE (select a from t1);*/char sqlite3ExprAffinity(Expr *pExpr){  int op = pExpr->op;  if( op==TK_SELECT ){    return sqlite3ExprAffinity(pExpr->pSelect->pEList->a[0].pExpr);  }#ifndef SQLITE_OMIT_CAST  if( op==TK_CAST ){    return sqlite3AffinityType(&pExpr->token);  }#endif  return pExpr->affinity;}/*** Set the collating sequence for expression pExpr to be the collating** sequence named by pToken.   Return a pointer to the revised expression.** The collating sequence is marked as "explicit" using the EP_ExpCollate** flag.  An explicit collating sequence will override implicit** collating sequences.*/Expr *sqlite3ExprSetColl(Parse *pParse, Expr *pExpr, Token *pName){  char *zColl = 0;            /* Dequoted name of collation sequence */  CollSeq *pColl;  zColl = sqlite3NameFromToken(pParse->db, pName);  if( pExpr && zColl ){    pColl = sqlite3LocateCollSeq(pParse, zColl, -1);    if( pColl ){      pExpr->pColl = pColl;      pExpr->flags |= EP_ExpCollate;    }  }  sqlite3_free(zColl);  return pExpr;}/*** Return the default collation sequence for the expression pExpr. If** there is no default collation type, return 0.*/CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr){  CollSeq *pColl = 0;  if( pExpr ){    int op;    pColl = pExpr->pColl;    op = pExpr->op;    if( (op==TK_CAST || op==TK_UPLUS) && !pColl ){      return sqlite3ExprCollSeq(pParse, pExpr->pLeft);    }  }  if( sqlite3CheckCollSeq(pParse, pColl) ){     pColl = 0;  }  return pColl;}/*** pExpr is an operand of a comparison operator.  aff2 is the** type affinity of the other operand.  This routine returns the** type affinity that should be used for the comparison operator.*/char sqlite3CompareAffinity(Expr *pExpr, char aff2){  char aff1 = sqlite3ExprAffinity(pExpr);  if( aff1 && aff2 ){    /* Both sides of the comparison are columns. If one has numeric    ** affinity, use that. Otherwise use no affinity.    */    if( sqlite3IsNumericAffinity(aff1) || sqlite3IsNumericAffinity(aff2) ){      return SQLITE_AFF_NUMERIC;    }else{      return SQLITE_AFF_NONE;    }  }else if( !aff1 && !aff2 ){    /* Neither side of the comparison is a column.  Compare the    ** results directly.    */    return SQLITE_AFF_NONE;  }else{    /* One side is a column, the other is not. Use the columns affinity. */    assert( aff1==0 || aff2==0 );    return (aff1 + aff2);  }}/*** pExpr is a comparison operator.  Return the type affinity that should** be applied to both operands prior to doing the comparison.*/static char comparisonAffinity(Expr *pExpr){  char aff;  assert( pExpr->op==TK_EQ || pExpr->op==TK_IN || pExpr->op==TK_LT ||          pExpr->op==TK_GT || pExpr->op==TK_GE || pExpr->op==TK_LE ||          pExpr->op==TK_NE );  assert( pExpr->pLeft );  aff = sqlite3ExprAffinity(pExpr->pLeft);  if( pExpr->pRight ){    aff = sqlite3CompareAffinity(pExpr->pRight, aff);  }  else if( pExpr->pSelect ){    aff = sqlite3CompareAffinity(pExpr->pSelect->pEList->a[0].pExpr, aff);  }  else if( !aff ){    aff = SQLITE_AFF_NONE;  }  return aff;}/*** pExpr is a comparison expression, eg. '=', '<', IN(...) etc.** idx_affinity is the affinity of an indexed column. Return true** if the index with affinity idx_affinity may be used to implement** the comparison in pExpr.*/int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity){  char aff = comparisonAffinity(pExpr);  switch( aff ){    case SQLITE_AFF_NONE:      return 1;    case SQLITE_AFF_TEXT:      return idx_affinity==SQLITE_AFF_TEXT;    default:      return sqlite3IsNumericAffinity(idx_affinity);  }}/*** Return the P1 value that should be used for a binary comparison** opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.** If jumpIfNull is true, then set the low byte of the returned** P1 value to tell the opcode to jump if either expression** evaluates to NULL.*/static int binaryCompareP1(Expr *pExpr1, Expr *pExpr2, int jumpIfNull){  char aff = sqlite3ExprAffinity(pExpr2);  return ((int)sqlite3CompareAffinity(pExpr1, aff))+(jumpIfNull?0x100:0);}/*** Return a pointer to the collation sequence that should be used by** a binary comparison operator comparing pLeft and pRight.**** If the left hand expression has a collating sequence type, then it is** used. Otherwise the collation sequence for the right hand expression** is used, or the default (BINARY) if neither expression has a collating** type.**** Argument pRight (but not pLeft) may be a null pointer. In this case,** it is not considered.*/CollSeq *sqlite3BinaryCompareCollSeq(  Parse *pParse,   Expr *pLeft,   Expr *pRight){  CollSeq *pColl;  assert( pLeft );  if( pLeft->flags & EP_ExpCollate ){    assert( pLeft->pColl );    pColl = pLeft->pColl;  }else if( pRight && pRight->flags & EP_ExpCollate ){    assert( pRight->pColl );    pColl = pRight->pColl;  }else{    pColl = sqlite3ExprCollSeq(pParse, pLeft);    if( !pColl ){      pColl = sqlite3ExprCollSeq(pParse, pRight);    }  }  return pColl;}/*** Generate code for a comparison operator.*/static int codeCompare(  Parse *pParse,    /* The parsing (and code generating) context */  Expr *pLeft,      /* The left operand */  Expr *pRight,     /* The right operand */  int opcode,       /* The comparison opcode */  int dest,         /* Jump here if true.  */  int jumpIfNull    /* If true, jump if either operand is NULL */){  int p1 = binaryCompareP1(pLeft, pRight, jumpIfNull);  CollSeq *p3 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);  return sqlite3VdbeOp3(pParse->pVdbe, opcode, p1, dest, (void*)p3, P3_COLLSEQ);}/*** Construct a new expression node and return a pointer to it.  Memory** for this node is obtained from sqlite3_malloc().  The calling function** is responsible for making sure the node eventually gets freed.*/Expr *sqlite3Expr(  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */  int op,                 /* Expression opcode */  Expr *pLeft,            /* Left operand */  Expr *pRight,           /* Right operand */  const Token *pToken     /* Argument token */){  Expr *pNew;  pNew = sqlite3DbMallocZero(db, sizeof(Expr));  if( pNew==0 ){    /* When malloc fails, delete pLeft and pRight. Expressions passed to     ** this function must always be allocated with sqlite3Expr() for this     ** reason.     */    sqlite3ExprDelete(pLeft);    sqlite3ExprDelete(pRight);    return 0;  }  pNew->op = op;  pNew->pLeft = pLeft;  pNew->pRight = pRight;  pNew->iAgg = -1;  if( pToken ){    assert( pToken->dyn==0 );    pNew->span = pNew->token = *pToken;  }else if( pLeft ){    if( pRight ){      sqlite3ExprSpan(pNew, &pLeft->span, &pRight->span);      if( pRight->flags & EP_ExpCollate ){        pNew->flags |= EP_ExpCollate;        pNew->pColl = pRight->pColl;      }    }    if( pLeft->flags & EP_ExpCollate ){      pNew->flags |= EP_ExpCollate;      pNew->pColl = pLeft->pColl;    }  }  sqlite3ExprSetHeight(pNew);  return pNew;}/*** Works like sqlite3Expr() except that it takes an extra Parse*** argument and notifies the associated connection object if malloc fails.*/Expr *sqlite3PExpr(  Parse *pParse,          /* Parsing context */  int op,                 /* Expression opcode */  Expr *pLeft,            /* Left operand */  Expr *pRight,           /* Right operand */  const Token *pToken     /* Argument token */){  return sqlite3Expr(pParse->db, op, pLeft, pRight, pToken);}/*** When doing a nested parse, you can include terms in an expression** that look like this:   #0 #1 #2 ...  These terms refer to elements** on the stack.  "#0" means the top of the stack.** "#1" means the next down on the stack.  And so forth.**** This routine is called by the parser to deal with on of those terms.** It immediately generates code to store the value in a memory location.** The returns an expression that will code to extract the value from** that memory location as needed.*/Expr *sqlite3RegisterExpr(Parse *pParse, Token *pToken){  Vdbe *v = pParse->pVdbe;  Expr *p;  int depth;  if( pParse->nested==0 ){    sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", pToken);    return sqlite3PExpr(pParse, TK_NULL, 0, 0, 0);  }  if( v==0 ) return 0;  p = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, pToken);  if( p==0 ){    return 0;  /* Malloc failed */  }  depth = atoi((char*)&pToken->z[1]);  p->iTable = pParse->nMem++;  sqlite3VdbeAddOp(v, OP_Dup, depth, 0);  sqlite3VdbeAddOp(v, OP_MemStore, p->iTable, 1);  return p;}/*** Join two expressions using an AND operator.  If either expression is** NULL, then just return the other expression.*/Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){  if( pLeft==0 ){    return pRight;  }else if( pRight==0 ){    return pLeft;  }else{    return sqlite3Expr(db, TK_AND, pLeft, pRight, 0);  }}/*** Set the Expr.span field of the given expression to span all** text between the two given tokens.*/void sqlite3ExprSpan(Expr *pExpr, Token *pLeft, Token *pRight){  assert( pRight!=0 );  assert( pLeft!=0 );  if( pExpr && pRight->z && pLeft->z ){    assert( pLeft->dyn==0 || pLeft->z[pLeft->n]==0 );    if( pLeft->dyn==0 && pRight->dyn==0 ){      pExpr->span.z = pLeft->z;      pExpr->span.n = pRight->n + (pRight->z - pLeft->z);    }else{      pExpr->span.z = 0;    }  }}/*** Construct a new expression node for a function with multiple** arguments.*/Expr *sqlite3ExprFunction(Parse *pParse, ExprList *pList, Token *pToken){  Expr *pNew;  assert( pToken );  pNew = sqlite3DbMallocZero(pParse->db, sizeof(Expr) );  if( pNew==0 ){    sqlite3ExprListDelete(pList); /* Avoid leaking memory when malloc fails */    return 0;  }  pNew->op = TK_FUNCTION;  pNew->pList = pList;  assert( pToken->dyn==0 );  pNew->token = *pToken;  pNew->span = pNew->token;  sqlite3ExprSetHeight(pNew);  return pNew;}/*** Assign a variable number to an expression that encodes a wildcard** in the original SQL statement.  **** Wildcards consisting of a single "?" are assigned the next sequential** variable number.**** Wildcards of the form "?nnn" are assigned the number "nnn".  We make** sure "nnn" is not too be to avoid a denial of service attack when** the SQL statement comes from an external source.**** Wildcards of the form ":aaa" or "$aaa" are assigned the same number** as the previous instance of the same wildcard.  Or if this is the first** instance of the wildcard, the next sequenial variable number is** assigned.*/void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr){  Token *pToken;  sqlite3 *db = pParse->db;  if( pExpr==0 ) return;  pToken = &pExpr->token;  assert( pToken->n>=1 );  assert( pToken->z!=0 );  assert( pToken->z[0]!=0 );  if( pToken->n==1 ){    /* Wildcard of the form "?".  Assign the next variable number */    pExpr->iTable = ++pParse->nVar;  }else if( pToken->z[0]=='?' ){    /* Wildcard of the form "?nnn".  Convert "nnn" to an integer and    ** use it as the variable number */    int i;    pExpr->iTable = i = atoi((char*)&pToken->z[1]);    if( i<1 || i>SQLITE_MAX_VARIABLE_NUMBER ){      sqlite3ErrorMsg(pParse, "variable number must be between ?1 and ?%d",          SQLITE_MAX_VARIABLE_NUMBER);    }    if( i>pParse->nVar ){      pParse->nVar = i;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色2019综合网| 欧美一区二区三区日韩视频| 在线观看www91| 久久精品亚洲精品国产欧美 | 国产日韩欧美在线一区| 亚洲成人777| 99re热视频精品| 精品成a人在线观看| 亚洲大片免费看| 色偷偷久久人人79超碰人人澡| 精品国产91洋老外米糕| 爽好久久久欧美精品| www.亚洲在线| 中文一区二区在线观看| 韩国毛片一区二区三区| 91精品国产欧美一区二区18| 亚洲一级电影视频| 色综合网站在线| 国产精品超碰97尤物18| 国产精品自拍在线| 久久久久免费观看| 国产一区二区在线看| 日韩欧美国产综合| 免播放器亚洲一区| 欧美乱妇23p| 视频在线观看国产精品| 欧美性受xxxx黑人xyx性爽| 亚洲狼人国产精品| 91国偷自产一区二区三区观看| 亚洲三级免费电影| 91视频免费观看| 亚洲女爱视频在线| 欧美系列亚洲系列| 午夜天堂影视香蕉久久| 欧美一区二区成人6969| 秋霞午夜av一区二区三区| 91精品国产aⅴ一区二区| 免费在线观看一区二区三区| 日韩毛片精品高清免费| av一本久道久久综合久久鬼色| 中文字幕av一区二区三区高| 91猫先生在线| 亚洲成a人在线观看| 7878成人国产在线观看| 久久国产尿小便嘘嘘| 国产亚洲污的网站| av激情综合网| 亚洲理论在线观看| 欧美一级午夜免费电影| 国产999精品久久| 亚洲伦在线观看| 在线播放日韩导航| 激情综合亚洲精品| 国产精品视频看| 欧美日韩国产电影| 国产精品一区二区视频| 亚洲欧美自拍偷拍| 欧美老肥妇做.爰bbww视频| 久久66热re国产| 136国产福利精品导航| 欧美日韩一区久久| 国产一区不卡视频| 亚洲精品高清在线| 亚洲精品在线免费播放| av成人动漫在线观看| 天堂资源在线中文精品| 国产精品麻豆99久久久久久| 欧美日韩精品一区二区三区蜜桃 | 日韩欧美在线综合网| 国产99久久精品| 日本亚洲电影天堂| 国产精品不卡一区二区三区| 欧美日韩亚洲不卡| 成人av在线一区二区三区| 亚洲福中文字幕伊人影院| 久久精品人人做| 欧美日韩日日夜夜| 99热99精品| 国产乱码精品一区二区三区五月婷| 一区二区三区精密机械公司| 精品国产91洋老外米糕| 欧美日韩在线亚洲一区蜜芽| 波多野结衣在线aⅴ中文字幕不卡| 天天影视涩香欲综合网| 亚洲女与黑人做爰| 国产精品网站导航| 日韩欧美aaaaaa| 欧美久久久久久蜜桃| 91网址在线看| 福利电影一区二区| 国产在线精品国自产拍免费| 三级欧美在线一区| 亚洲线精品一区二区三区| 国产精品久久毛片av大全日韩| 日韩欧美色综合| 亚洲日本va午夜在线影院| 国产无人区一区二区三区| 日韩欧美成人一区二区| 欧美另类videos死尸| 欧美亚洲另类激情小说| 一本色道**综合亚洲精品蜜桃冫| 国产一区在线看| 国产在线视视频有精品| 精品一区二区三区久久| 免费成人性网站| 免费欧美日韩国产三级电影| 丝袜亚洲另类欧美| 日韩电影免费在线看| 五月天亚洲精品| 日韩二区三区在线观看| 日韩中文字幕av电影| 日韩电影在线免费观看| 美腿丝袜一区二区三区| 青草国产精品久久久久久| 蜜桃传媒麻豆第一区在线观看| 日本不卡免费在线视频| 日韩精彩视频在线观看| 青青国产91久久久久久| 久久精品国产99国产| 国产九色精品成人porny| 国产成人精品在线看| 国产91精品欧美| www.亚洲精品| 在线精品视频免费播放| 67194成人在线观看| 精品久久久久久久久久久久久久久| 欧美成人a∨高清免费观看| 2023国产一二三区日本精品2022| 精品国偷自产国产一区| 国内外精品视频| 国产成人免费网站| 91色在线porny| 欧美日韩精品欧美日韩精品| 欧美成人艳星乳罩| 国产精品每日更新在线播放网址| 国产精品乱人伦一区二区| 一区二区三区在线视频观看58| 天堂va蜜桃一区二区三区漫画版| 久色婷婷小香蕉久久| 粉嫩aⅴ一区二区三区四区五区 | 经典一区二区三区| 成人精品免费视频| 欧美性色黄大片| 欧美精品一区二区三区蜜桃视频| 亚洲欧洲精品天堂一级 | 8x8x8国产精品| 中文字幕乱码一区二区免费| 亚洲激情自拍视频| 久久99九九99精品| 91一区二区三区在线播放| 欧美精品123区| 欧美韩日一区二区三区| 三级一区在线视频先锋| 丰满放荡岳乱妇91ww| 精品1区2区3区| 中文字幕乱码日本亚洲一区二区| 一区二区三区日韩欧美精品| 国产一区二区三区综合| 欧美中文字幕一区| 中文字幕免费一区| 日本免费在线视频不卡一不卡二| 久久综合色一综合色88| 一片黄亚洲嫩模| 国产经典欧美精品| 777午夜精品免费视频| 国产精品成人在线观看| 国产一本一道久久香蕉| 欧美日韩精品一区二区三区四区 | 精品国产91九色蝌蚪| 亚洲午夜免费视频| 成人精品视频网站| 久久综合视频网| 蜜桃视频一区二区| 欧美视频在线观看一区二区| 中文字幕不卡的av| 国产一区二区福利| 精品久久一二三区| 日韩精品视频网站| 在线免费观看日本欧美| 亚洲婷婷综合色高清在线| 国产精品一区一区| 久久亚洲一区二区三区四区| 天天色天天操综合| 欧美精品在线观看播放| 亚洲成人1区2区| 欧美日韩国产高清一区二区| 一区二区三区不卡视频| 色综合视频在线观看| 中文字幕中文乱码欧美一区二区| 国产激情视频一区二区三区欧美| 亚洲精品一区二区精华| 老汉av免费一区二区三区| 91精品国产综合久久蜜臀| 亚洲午夜精品17c| 91官网在线观看| 亚洲一二三四在线| 色综合久久六月婷婷中文字幕| 国产精品高潮久久久久无| 成人精品鲁一区一区二区| 国产精品久久久久久久久免费丝袜 |