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])"),
65560 ** Cast the datatype of the value in pMem according to the affinity
65561 ** "aff". Casting is different from applying affinity in that a cast
65563 ** affinity even if that results in loss of data. This routine is
66143 ** Affinity aff is applied to the result of the function before returning.
66156 u8 aff, /* Affinity to use */
66252 u8 affinity, /* Affinity to use */
66282 sqlite3ValueApplyAffinity(*ppVal, affinity, SQLITE_UTF8);
66308 if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_BLOB ){
66311 sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
66319 if( SQLITE_OK==sqlite3ValueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal)
66331 sqlite3ValueApplyAffinity(pVal, affinity, enc);
66354 rc = valueFromFunction(db, pExpr, enc, affinity, &pVal, pCtx);
66387 u8 affinity, /* Affinity to use */
66390 return valueFromExpr(db, pExpr, enc, affinity, ppVal, 0);
66470 u8 affinity, /* Affinity to use */
66497 sqlite3ValueApplyAffinity(pVal, affinity, ENC(db));
66503 rc = valueFromExpr(db, pExpr, ENC(db), affinity, &pVal, pAlloc);
66527 ** If a value can be extracted, the affinity passed as the 5th argument
66546 u8 affinity, /* Affinity to use */
66559 rc = stat4ValueFromExpr(pParse, pExpr, affinity, &alloc, &pVal);
66578 u8 affinity, /* Affinity to use */
66581 return stat4ValueFromExpr(pParse, pExpr, affinity, 0, ppVal);
70915 ** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
73087 ** Processing is determine by the affinity parameter:
73095 ** always preferred, even if the affinity is REAL, because
73105 Mem *pRec, /* The value to apply affinity to */
73106 char affinity, /* The affinity to be applied */
73109 if( affinity>=SQLITE_AFF_NUMERIC ){
73110 assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
73111 || affinity==SQLITE_AFF_NUMERIC );
73119 }else if( affinity==SQLITE_AFF_TEXT ){
73153 u8 affinity,
73156 applyAffinity((Mem *)pVal, affinity, enc);
74707 ** has REAL affinity. Such column values may still be stored as
74722 ** Synopsis: affinity(r[P1])
74762 ** The SQLITE_AFF_MASK portion of P5 must be an affinity character -
74764 ** to coerce both inputs according to this affinity before the
74766 ** affinity is used. Note that the affinity conversions are stored
74841 char affinity; /* Affinity to use for comparison */
74886 affinity = pOp->p5 & SQLITE_AFF_MASK;
74887 if( affinity>=SQLITE_AFF_NUMERIC ){
74894 }else if( affinity==SQLITE_AFF_TEXT ){
75510 /* Opcode: Affinity P1 P2 * P4 *
75511 ** Synopsis: affinity(r[P1@P2])
75516 ** string indicates the column affinity that should be used for the nth
75520 const char *zAffinity; /* The affinity to be applied */
75521 char cAff; /* A single character of affinity */
75544 ** string indicates the column affinity that should be used for the nth
75547 ** The mapping from character to affinity is given by the SQLITE_AFF_
75550 ** If P4 is NULL then all index fields have the affinity BLOB.
75564 char *zAffinity; /* The affinity string for the record */
75601 /* Apply the requested affinity to all inputs
83840 pExpr->affinity = SQLITE_AFF_INTEGER;
83870 pExpr->affinity = SQLITE_AFF_INTEGER;
84107 pExpr->affinity = SQLITE_AFF_INTEGER;
84252 /* FIX ME: Compute pExpr->affinity based on the expected return
85018 ** Return the 'affinity' of the expression pExpr if any.
85022 ** affinity of that column is returned. Otherwise, 0x00 is returned,
85023 ** indicating no affinity for the expression.
85026 ** have an affinity:
85056 return pExpr->pTab->aCol[j].affinity;
85058 return pExpr->affinity;
85182 ** type affinity of the other operand. This routine returns the
85183 ** type affinity that should be used for the comparison operator.
85189 ** affinity, use that. Otherwise use no affinity.
85202 /* One side is a column, the other is not. Use the columns affinity. */
85209 ** pExpr is a comparison operator. Return the type affinity that should
85231 ** idx_affinity is the affinity of an indexed column. Return true
85232 ** if the index with affinity idx_affinity may be used to implement
86491 ** unchanged by OP_Affinity with the affinity given in the second
86752 /* Check that the affinity that will be used to perform the
86753 ** comparison is the same as the affinity of the column. If
86756 int affinity_ok = sqlite3IndexAffinityOk(pX, pTab->aCol[iCol].affinity);
86886 char affinity; /* Affinity of the LHS of the IN */
86891 affinity = sqlite3ExprAffinity(pLeft);
86899 ** statement returns a column value, then the affinity of that
86901 ** SELECT... statement are columns, then numeric affinity is used
86902 ** if either column has NUMERIC or INTEGER affinity. If neither
86903 ** 'x' nor the SELECT... statement are columns, then numeric affinity
86922 dest.affSdst = (u8)affinity;
86943 ** that columns affinity when building index keys. If <expr> is not
86944 ** a column, use numeric affinity.
86951 if( !affinity ){
86952 affinity = SQLITE_AFF_BLOB;
86988 sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
87084 char affinity; /* Comparison affinity to use */
87099 /* Figure out the affinity to use to create a key from the results
87103 affinity = comparisonAffinity(pExpr);
87137 sqlite3VdbeChangeP5(v, affinity);
87142 sqlite3VdbeChangeP5(v, affinity | SQLITE_JUMPIFNULL);
87180 sqlite3VdbeAddOp4(v, OP_Affinity, r1, 1, 0, &affinity, 1);
87541 ** Record the fact that an affinity change has occurred on iCount
88077 /* If the column has REAL affinity, it may currently be stored as an
88083 && pTab->aCol[pExpr->iColumn].affinity==SQLITE_AFF_REAL
88176 assert( pExpr->affinity==OE_Rollback
88177 || pExpr->affinity==OE_Abort
88178 || pExpr->affinity==OE_Fail
88179 || pExpr->affinity==OE_Ignore
88186 if( pExpr->affinity==OE_Abort ){
88190 if( pExpr->affinity==OE_Ignore ){
88196 pExpr->affinity, pExpr->u.zToken, 0, 0);
93890 /* If there is no type specified, columns have the default affinity
93892 ** be called next to set pCol->affinity correctly.
93894 pCol->affinity = SQLITE_AFF_BLOB;
93914 ** associated affinity type.
93918 ** found, the corresponding affinity is returned. If zType contains
93923 ** Substring | Affinity
94018 pCol->affinity = sqlite3AffinityType(pCol->zType, &pCol->szEst);
94390 assert( pCol->affinity-SQLITE_AFF_BLOB >= 0 );
94391 assert( pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType) );
94392 testcase( pCol->affinity==SQLITE_AFF_BLOB );
94393 testcase( pCol->affinity==SQLITE_AFF_TEXT );
94394 testcase( pCol->affinity==SQLITE_AFF_NUMERIC );
94395 testcase( pCol->affinity==SQLITE_AFF_INTEGER );
94396 testcase( pCol->affinity==SQLITE_AFF_REAL );
94398 zType = azType[pCol->affinity - SQLITE_AFF_BLOB];
94400 assert( pCol->affinity==SQLITE_AFF_BLOB
94401 || pCol->affinity==sqlite3AffinityType(zType, 0) );
98562 /* If the column affinity is REAL but the number is an integer, then it
100749 ** apply the affinity of the parent key). If this fails, then there
100752 ** will have INTEGER affinity applied to it, which may not be correct. */
100866 pExpr->affinity = pCol->affinity;
100872 pExpr->affinity = SQLITE_AFF_INTEGER;
100962 ** the parent key columns. The affinity of the parent key column should
101594 ** that the affinity and collation sequence associated with the
101658 pRaise->affinity = OE_Abort;
101855 ** Return a pointer to the column affinity string associated with index
101856 ** pIdx. A column affinity string has one character for each column in
101857 ** the table, according to the affinity of the column:
101859 ** Character Column affinity
101870 ** Memory for the buffer containing the column index affinity string
101876 /* The first time a column affinity string for a particular index is
101880 ** The column affinity string will eventually be deleted by
101894 pIdx->zColAff[n] = pTab->aCol[x].affinity;
101913 ** Compute the affinity string for table pTab, if it has not already been
101916 ** If the affinity exists (if it is no entirely SQLITE_AFF_BLOB values) and
101920 ** an OP_MakeRecord) to the affinity string.
101922 ** A column affinity string has one character per column:
101924 ** Character Column affinity
101944 zColAff[i] = pTab->aCol[i].affinity;
103714 if( pDestCol->affinity!=pSrcCol->affinity ){
103715 return 0; /* Affinity must be the same on all columns */
110377 pCol->affinity = sqlite3ExprAffinity(p);
110378 if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_BLOB;
115669 pCol->affinity, &pValue);
115674 if( pTab->aCol[i].affinity==SQLITE_AFF_REAL ){
118312 char idxaff; /* Must match this affinity, if zCollName!=NULL */
118834 ** Code an OP_Affinity opcode to apply the column affinity string zAff
118853 ** and end of the affinity string.
118972 ** compute the affinity string.
118988 ** copy of the column affinity string of the index allocated using
118990 ** with equality constraints that use BLOB or NONE affinity are set to
118996 ** In the example above, the index on t1(a) has TEXT affinity. But since
118997 ** the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity,
118999 ** a key to search the index. Hence the first byte in the returned affinity
119007 char **pzAff /* OUT: Set to point to affinity string */
119018 char *zAff; /* Affinity string to return */
119422 char *zStartAff; /* Affinity for start of range constraint */
119423 char cEndAff = 0; /* Affinity for end of range constraint */
119529 ** applied to the operands, set the affinity to apply to pRight to
120272 ** be the name of an indexed column with TEXT affinity. */
121611 /* Verify the affinity and collating sequence match */
121686 pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
121980 aff = pSrc->pTab->aCol[pTerm->u.leftColumn].affinity;
122577 ** Return the affinity for a single column of an index.
122921 u8 aff; /* Column affinity */
128973 ** affinity or the collating sequence to use for comparison. Otherwise,
129229 yygotominor.yy346.pExpr->affinity = OE_Ignore;
129239 yygotominor.yy346.pExpr->affinity = (char)yymsp[-3].minor.yy328;