Lines Matching full:affinity
4547 ** numeric affinity to the value. This means that an attempt is
10475 #define OP_Cast 40 /* synopsis: affinity(r[P1]) */
10483 #define OP_Affinity 48 /* synopsis: affinity(r[P1@P2]) */
12052 char affinity; /* One of the SQLITE_AFF_... values */
12087 ** Column affinity types.
12094 ** when multiple affinity types are concatenated into a string and
12110 ** affinity value.
12115 ** Additional bit values that can be ORed with an affinity without
12116 ** changing the affinity.
12190 char *zColAff; /* String defining the affinity of each column */
12424 char *zColAff; /* String defining the affinity of each column */
12622 char affinity; /* The affinity of the column or 0 if not a column */
12676 #define EP_Generic 0x000200 /* Ignore COLLATE or affinity on this tree */
13055 ** Apply the affinity pDest->affSdst before storing
13114 char affSdst; /* Affinity used when eDest==SRT_Set */
15462 #define MEM_AffMask 0x001f /* Mask of affinity bits */
23573 switch( pExpr->affinity ){
26297 /* 40 */ "Cast" OpHelp("affinity(r[P1])"),
26305 /* 48 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
65542 ** Cast the datatype of the value in pMem according to the affinity
65543 ** "aff". Casting is different from applying affinity in that a cast
65545 ** affinity even if that results in loss of data. This routine is
66125 ** Affinity aff is applied to the result of the function before returning.
66138 u8 aff, /* Affinity to use */
66234 u8 affinity, /* Affinity to use */
66264 sqlite3ValueApplyAffinity(*ppVal, affinity, SQLITE_UTF8);
66290 if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_BLOB ){
66293 sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
66301 if( SQLITE_OK==sqlite3ValueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal)
66313 sqlite3ValueApplyAffinity(pVal, affinity, enc);
66336 rc = valueFromFunction(db, pExpr, enc, affinity, &pVal, pCtx);
66369 u8 affinity, /* Affinity to use */
66372 return valueFromExpr(db, pExpr, enc, affinity, ppVal, 0);
66452 u8 affinity, /* Affinity to use */
66479 sqlite3ValueApplyAffinity(pVal, affinity, ENC(db));
66485 rc = valueFromExpr(db, pExpr, ENC(db), affinity, &pVal, pAlloc);
66509 ** If a value can be extracted, the affinity passed as the 5th argument
66528 u8 affinity, /* Affinity to use */
66541 rc = stat4ValueFromExpr(pParse, pExpr, affinity, &alloc, &pVal);
66560 u8 affinity, /* Affinity to use */
66563 return stat4ValueFromExpr(pParse, pExpr, affinity, 0, ppVal);
70897 ** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
73069 ** Processing is determine by the affinity parameter:
73077 ** always preferred, even if the affinity is REAL, because
73087 Mem *pRec, /* The value to apply affinity to */
73088 char affinity, /* The affinity to be applied */
73091 if( affinity>=SQLITE_AFF_NUMERIC ){
73092 assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
73093 || affinity==SQLITE_AFF_NUMERIC );
73101 }else if( affinity==SQLITE_AFF_TEXT ){
73135 u8 affinity,
73138 applyAffinity((Mem *)pVal, affinity, enc);
74689 ** has REAL affinity. Such column values may still be stored as
74704 ** Synopsis: affinity(r[P1])
74744 ** The SQLITE_AFF_MASK portion of P5 must be an affinity character -
74746 ** to coerce both inputs according to this affinity before the
74748 ** affinity is used. Note that the affinity conversions are stored
74823 char affinity; /* Affinity to use for comparison */
74868 affinity = pOp->p5 & SQLITE_AFF_MASK;
74869 if( affinity>=SQLITE_AFF_NUMERIC ){
74876 }else if( affinity==SQLITE_AFF_TEXT ){
75492 /* Opcode: Affinity P1 P2 * P4 *
75493 ** Synopsis: affinity(r[P1@P2])
75498 ** string indicates the column affinity that should be used for the nth
75502 const char *zAffinity; /* The affinity to be applied */
75503 char cAff; /* A single character of affinity */
75526 ** string indicates the column affinity that should be used for the nth
75529 ** The mapping from character to affinity is given by the SQLITE_AFF_
75532 ** If P4 is NULL then all index fields have the affinity BLOB.
75546 char *zAffinity; /* The affinity string for the record */
75583 /* Apply the requested affinity to all inputs
83822 pExpr->affinity = SQLITE_AFF_INTEGER;
83852 pExpr->affinity = SQLITE_AFF_INTEGER;
84089 pExpr->affinity = SQLITE_AFF_INTEGER;
84234 /* FIX ME: Compute pExpr->affinity based on the expected return
85000 ** Return the 'affinity' of the expression pExpr if any.
85004 ** affinity of that column is returned. Otherwise, 0x00 is returned,
85005 ** indicating no affinity for the expression.
85008 ** have an affinity:
85038 return pExpr->pTab->aCol[j].affinity;
85040 return pExpr->affinity;
85164 ** type affinity of the other operand. This routine returns the
85165 ** type affinity that should be used for the comparison operator.
85171 ** affinity, use that. Otherwise use no affinity.
85184 /* One side is a column, the other is not. Use the columns affinity. */
85191 ** pExpr is a comparison operator. Return the type affinity that should
85213 ** idx_affinity is the affinity of an indexed column. Return true
85214 ** if the index with affinity idx_affinity may be used to implement
86473 ** unchanged by OP_Affinity with the affinity given in the second
86734 /* Check that the affinity that will be used to perform the
86735 ** comparison is the same as the affinity of the column. If
86738 int affinity_ok = sqlite3IndexAffinityOk(pX, pTab->aCol[iCol].affinity);
86868 char affinity; /* Affinity of the LHS of the IN */
86873 affinity = sqlite3ExprAffinity(pLeft);
86881 ** statement returns a column value, then the affinity of that
86883 ** SELECT... statement are columns, then numeric affinity is used
86884 ** if either column has NUMERIC or INTEGER affinity. If neither
86885 ** 'x' nor the SELECT... statement are columns, then numeric affinity
86904 dest.affSdst = (u8)affinity;
86925 ** that columns affinity when building index keys. If <expr> is not
86926 ** a column, use numeric affinity.
86933 if( !affinity ){
86934 affinity = SQLITE_AFF_BLOB;
86970 sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
87066 char affinity; /* Comparison affinity to use */
87081 /* Figure out the affinity to use to create a key from the results
87085 affinity = comparisonAffinity(pExpr);
87119 sqlite3VdbeChangeP5(v, affinity);
87124 sqlite3VdbeChangeP5(v, affinity | SQLITE_JUMPIFNULL);
87162 sqlite3VdbeAddOp4(v, OP_Affinity, r1, 1, 0, &affinity, 1);
87523 ** Record the fact that an affinity change has occurred on iCount
88059 /* If the column has REAL affinity, it may currently be stored as an
88065 && pTab->aCol[pExpr->iColumn].affinity==SQLITE_AFF_REAL
88158 assert( pExpr->affinity==OE_Rollback
88159 || pExpr->affinity==OE_Abort
88160 || pExpr->affinity==OE_Fail
88161 || pExpr->affinity==OE_Ignore
88168 if( pExpr->affinity==OE_Abort ){
88172 if( pExpr->affinity==OE_Ignore ){
88178 pExpr->affinity, pExpr->u.zToken, 0, 0);
93872 /* If there is no type specified, columns have the default affinity
93874 ** be called next to set pCol->affinity correctly.
93876 pCol->affinity = SQLITE_AFF_BLOB;
93896 ** associated affinity type.
93900 ** found, the corresponding affinity is returned. If zType contains
93905 ** Substring | Affinity
94000 pCol->affinity = sqlite3AffinityType(pCol->zType, &pCol->szEst);
94372 assert( pCol->affinity-SQLITE_AFF_BLOB >= 0 );
94373 assert( pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType) );
94374 testcase( pCol->affinity==SQLITE_AFF_BLOB );
94375 testcase( pCol->affinity==SQLITE_AFF_TEXT );
94376 testcase( pCol->affinity==SQLITE_AFF_NUMERIC );
94377 testcase( pCol->affinity==SQLITE_AFF_INTEGER );
94378 testcase( pCol->affinity==SQLITE_AFF_REAL );
94380 zType = azType[pCol->affinity - SQLITE_AFF_BLOB];
94382 assert( pCol->affinity==SQLITE_AFF_BLOB
94383 || pCol->affinity==sqlite3AffinityType(zType, 0) );
98544 /* If the column affinity is REAL but the number is an integer, then it
100731 ** apply the affinity of the parent key). If this fails, then there
100734 ** will have INTEGER affinity applied to it, which may not be correct. */
100848 pExpr->affinity = pCol->affinity;
100854 pExpr->affinity = SQLITE_AFF_INTEGER;
100944 ** the parent key columns. The affinity of the parent key column should
101576 ** that the affinity and collation sequence associated with the
101640 pRaise->affinity = OE_Abort;
101837 ** Return a pointer to the column affinity string associated with index
101838 ** pIdx. A column affinity string has one character for each column in
101839 ** the table, according to the affinity of the column:
101841 ** Character Column affinity
101852 ** Memory for the buffer containing the column index affinity string
101858 /* The first time a column affinity string for a particular index is
101862 ** The column affinity string will eventually be deleted by
101876 pIdx->zColAff[n] = pTab->aCol[x].affinity;
101895 ** Compute the affinity string for table pTab, if it has not already been
101898 ** If the affinity exists (if it is no entirely SQLITE_AFF_BLOB values) and
101902 ** an OP_MakeRecord) to the affinity string.
101904 ** A column affinity string has one character per column:
101906 ** Character Column affinity
101926 zColAff[i] = pTab->aCol[i].affinity;
103696 if( pDestCol->affinity!=pSrcCol->affinity ){
103697 return 0; /* Affinity must be the same on all columns */
110359 pCol->affinity = sqlite3ExprAffinity(p);
110360 if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_BLOB;
115651 pCol->affinity, &pValue);
115656 if( pTab->aCol[i].affinity==SQLITE_AFF_REAL ){
118294 char idxaff; /* Must match this affinity, if zCollName!=NULL */
118816 ** Code an OP_Affinity opcode to apply the column affinity string zAff
118835 ** and end of the affinity string.
118954 ** compute the affinity string.
118970 ** copy of the column affinity string of the index allocated using
118972 ** with equality constraints that use BLOB or NONE affinity are set to
118978 ** In the example above, the index on t1(a) has TEXT affinity. But since
118979 ** the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity,
118981 ** a key to search the index. Hence the first byte in the returned affinity
118989 char **pzAff /* OUT: Set to point to affinity string */
119000 char *zAff; /* Affinity string to return */
119404 char *zStartAff; /* Affinity for start of range constraint */
119405 char cEndAff = 0; /* Affinity for end of range constraint */
119511 ** applied to the operands, set the affinity to apply to pRight to
120254 ** be the name of an indexed column with TEXT affinity. */
121593 /* Verify the affinity and collating sequence match */
121668 pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
121962 aff = pSrc->pTab->aCol[pTerm->u.leftColumn].affinity;
122559 ** Return the affinity for a single column of an index.
122903 u8 aff; /* Column affinity */
128955 ** affinity or the collating sequence to use for comparison. Otherwise,
129211 yygotominor.yy346.pExpr->affinity = OE_Ignore;
129221 yygotominor.yy346.pExpr->affinity = (char)yymsp[-3].minor.yy328;