Lines Matching defs:affinity

5861 ** numeric affinity to the value.  This means that an attempt is
16099 #define OP_Cast 88 /* synopsis: affinity(r[P1]) */
16107 #define OP_Affinity 96 /* synopsis: affinity(r[P1@P2]) */
17578 char affinity; /* One of the SQLITE_AFF_... values */
17647 ** Column affinity types.
17654 ** when multiple affinity types are concatenated into a string and
17671 ** affinity value.
17676 ** Additional bit values that can be ORed with an affinity without
17677 ** changing the affinity.
17755 char *zColAff; /* String defining the affinity of each column */
18090 char *zColAff; /* String defining the affinity of each column */
18306 char affExpr; /* affinity, or RAISE type */
18386 #define EP_Skip 0x002000 /* Operator does not contribute to affinity */
18915 ** Apply the affinity pDest->affSdst before storing
22368 ** sqlite3StdTypeAffinity[] The affinity associated with each entry
22699 #define MEM_AffMask 0x003f /* Mask of affinity bits */
35690 /* 88 */ "Cast" OpHelp("affinity(r[P1])"),
35698 /* 96 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
81345 ** Cast the datatype of the value in pMem according to the affinity
81346 ** "aff". Casting is different from applying affinity in that a cast
81348 ** affinity even if that results in loss of data. This routine is
82106 u8 affinity, /* Affinity to use */
82135 sqlite3ValueApplyAffinity(*ppVal, affinity, enc);
82161 if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_BLOB ){
82164 sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
82177 if( SQLITE_OK==valueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal,pCtx)
82193 sqlite3ValueApplyAffinity(pVal, affinity, enc);
82217 rc = valueFromFunction(db, pExpr, enc, affinity, &pVal, pCtx);
82261 u8 affinity, /* Affinity to use */
82264 return pExpr ? valueFromExpr(db, pExpr, enc, affinity, ppVal, 0) : 0;
82289 u8 affinity, /* Affinity to use */
82314 sqlite3ValueApplyAffinity(pVal, affinity, ENC(db));
82319 rc = valueFromExpr(db, pExpr, ENC(db), affinity, &pVal, pAlloc);
82347 ** Before any value is appended to the record, the affinity of the
82409 u8 affinity, /* Affinity to use */
82412 return stat4ValueFromExpr(pParse, pExpr, affinity, 0, ppVal);
87679 ** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
89875 }else if( p->pTab->aCol[iIdx].affinity==SQLITE_AFF_REAL ){
90633 ** Processing is determine by the affinity parameter:
90641 ** always preferred, even if the affinity is REAL, because
90652 Mem *pRec, /* The value to apply affinity to */
90653 char affinity, /* The affinity to be applied */
90656 if( affinity>=SQLITE_AFF_NUMERIC ){
90657 assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
90658 || affinity==SQLITE_AFF_NUMERIC );
90666 }else if( affinity==SQLITE_AFF_TEXT ){
90706 u8 affinity,
90709 applyAffinity((Mem *)pVal, affinity, enc);
92338 ** has REAL affinity. Such column values may still be stored as
92356 ** Synopsis: affinity(r[P1])
92395 ** The SQLITE_AFF_MASK portion of P5 must be an affinity character -
92397 ** to coerce both inputs according to this affinity before the
92399 ** affinity is used. Note that the affinity conversions are stored
92439 ** The SQLITE_AFF_MASK portion of P5 must be an affinity character -
92441 ** to coerce both inputs according to this affinity before the
92443 ** affinity is used. Note that the affinity conversions are stored
92488 char affinity; /* Affinity to use for comparison */
92553 affinity = pOp->p5 & SQLITE_AFF_MASK;
92554 if( affinity>=SQLITE_AFF_NUMERIC ){
92565 }else if( affinity==SQLITE_AFF_TEXT ){
93467 ** to implement "strict affinity".
93501 applyAffinity(pIn1, aCol[i].affinity, encoding);
93521 /* When applying REAL affinity, if the result is still an MEM_Int
93563 ** Synopsis: affinity(r[P1@P2])
93568 ** string indicates the column affinity that should be used for the N-th
93572 const char *zAffinity; /* The affinity to be applied */
93584 /* When applying REAL affinity, if the result is still an MEM_Int
93617 ** string indicates the column affinity that should be used for the N-th
93620 ** The mapping from character to affinity is given by the SQLITE_AFF_
93623 ** If P4 is NULL then all index fields have the affinity BLOB.
93647 char *zAffinity; /* The affinity string for the record */
93682 /* Apply the requested affinity to all inputs
95021 newType = pIn3->flags; /* Record the type after applying numeric affinity */
104880 /* FIX ME: Compute pExpr->affinity based on the expected return
105835 ** Return the affinity character for a single column of a table.
105839 return pTab->aCol[iCol].affinity;
105843 ** Return the 'affinity' of the expression pExpr if any.
105847 ** affinity of that column is returned. Otherwise, 0x00 is returned,
105848 ** indicating no affinity for the expression.
105851 ** have an affinity:
106070 ** type affinity of the other operand. This routine returns the
106071 ** type affinity that should be used for the comparison operator.
106077 ** affinity, use that. Otherwise use no affinity.
106085 /* One side is a column, the other is not. Use the columns affinity. */
106092 ** pExpr is a comparison operator. Return the type affinity that should
106114 ** idx_affinity is the affinity of an indexed column. Return true
106115 ** if the index with affinity idx_affinity may be used to implement
108336 ** unchanged by OP_Affinity with the affinity given in the second
108624 /* Check that the affinity that will be used to perform each
108625 ** comparison is the same as the affinity of each column in table
108640 ** other has no affinity and the other side is TEXT. Hence,
108642 ** and for the term on the LHS of the IN to have no affinity. */
108857 ** the SELECT statement returns a column value, then the affinity of that
108859 ** SELECT... statement are columns, then numeric affinity is used
108860 ** if either column has NUMERIC or INTEGER affinity. If neither
108861 ** 'x' nor the SELECT... statement are columns, then numeric affinity
108986 ** that columns affinity when building index keys. If <expr> is not
108987 ** a column, use numeric affinity.
108989 char affinity; /* Affinity of the LHS of the IN */
108994 affinity = sqlite3ExprAffinity(pLeft);
108995 if( affinity<=SQLITE_AFF_NONE ){
108996 affinity = SQLITE_AFF_BLOB;
108997 }else if( affinity==SQLITE_AFF_REAL ){
108998 affinity = SQLITE_AFF_NUMERIC;
109025 sqlite3VdbeAddOp4(v, OP_MakeRecord, r1, 1, r2, &affinity, 1);
109583 if( pCol->affinity>=SQLITE_AFF_TEXT ){
109584 sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1);
109836 ** the type affinity of the argument. This is used for testing of
109955 if( pTab->aCol[pCol->iColumn].affinity==SQLITE_AFF_REAL ){
110026 if( pCol->affinity==SQLITE_AFF_REAL ){
110516 /* If the column has REAL affinity, it may currently be stored as an
110521 if( iCol>=0 && pTab->aCol[iCol].affinity==SQLITE_AFF_REAL ){
118978 char affinity = SQLITE_AFF_BLOB;
119015 affinity = sqlite3StdTypeAffinity[i];
119016 if( affinity<=SQLITE_AFF_TEXT ) szEst = 5;
119049 /* If there is no type specified, columns have the default affinity
119051 pCol->affinity = affinity;
119055 if( affinity==SQLITE_AFF_BLOB ){
119066 pCol->affinity = sqlite3AffinityType(zType, pCol);
119104 ** associated affinity type.
119108 ** found, the corresponding affinity is returned. If zType contains
119625 assert( pCol->affinity-SQLITE_AFF_BLOB >= 0 );
119626 assert( pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType) );
119627 testcase( pCol->affinity==SQLITE_AFF_BLOB );
119628 testcase( pCol->affinity==SQLITE_AFF_TEXT );
119629 testcase( pCol->affinity==SQLITE_AFF_NUMERIC );
119630 testcase( pCol->affinity==SQLITE_AFF_INTEGER );
119631 testcase( pCol->affinity==SQLITE_AFF_REAL );
119633 zType = azType[pCol->affinity - SQLITE_AFF_BLOB];
119635 assert( pCol->affinity==SQLITE_AFF_BLOB
119636 || pCol->affinity==sqlite3AffinityType(zType, 0) );
120154 pCol->affinity = SQLITE_AFF_BLOB;
124688 /* If the column affinity is REAL but the number is an integer, then it
126961 TEST_FUNC(affinity, 1, INLINEFUNC_affinity, 0),
127490 ** apply the affinity of the parent key). If this fails, then there
127493 ** will have INTEGER affinity applied to it, which may not be correct. */
127611 pExpr->affExpr = pCol->affinity;
127704 ** the parent key columns. The affinity of the parent key column should
128382 ** that the affinity and collation sequence associated with the
128656 ** Return a pointer to the column affinity string associated with index
128657 ** pIdx. A column affinity string has one character for each column in
128658 ** the table, according to the affinity of the column:
128660 ** Character Column affinity
128671 ** Memory for the buffer containing the column index affinity string
128677 /* The first time a column affinity string for a particular index is
128681 ** The column affinity string will eventually be deleted by
128696 aff = pTab->aCol[x].affinity;
128716 ** Compute an affinity string for a table. Space is obtained
128727 zColAff[j++] = pTab->aCol[i].affinity;
128738 ** Make changes to the evolving bytecode to do affinity transformations
128744 ** Compute the affinity string for table pTab, if it has not already been
128747 ** If the affinity string is empty (because it was all SQLITE_AFF_BLOB entries
128753 ** an OP_MakeRecord) to the affinity string.
128755 ** A column affinity string has one character per column:
128757 ** Character Column affinity
128896 ** that appropriate affinity has been applied to the regular columns
128903 ** columns. '@' is the no-op affinity and those columns have not
130216 ** record be generated during constraint checks to avoid affinity changes
131531 if( pDestCol->affinity!=pSrcCol->affinity ){
136092 doTypeCheck = pCol->affinity>SQLITE_AFF_BLOB;
136106 pCol->affinity, &pDfltValue);
136157 }else if( !bStrict && pCol->affinity==SQLITE_AFF_TEXT ){
136166 }else if( !bStrict && pCol->affinity>=SQLITE_AFF_NUMERIC ){
140534 char aff /* Default affinity for columns */
140558 pCol->affinity = sqlite3ExprAffinity(p);
140571 if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff;
142406 ** compound must have the same affinity.
142927 int bHasAffBlob; /* At least one column in apExpr[] as affinity BLOB */
143021 ** if argument bIgnoreAffBlob is non-zero and the affinity of pExpr
143066 ** + pExpr is a column with an affinity other than BLOB that matches
143070 ** uses an affinity other than TEXT and one of its immediate
143112 ** Implementation note: Constant propagation is tricky due to affinity
143121 ** is alway true because the comparison uses numeric affinity, but b=123
143122 ** is false because it uses text affinity and '0123' is not the same as '123'.
143140 ** columns with BLOB affinity is only allowed if the constant is used with
147896 ** If column as REAL affinity and the table is an ordinary b-tree table
147914 pCol->affinity, &pValue);
147920 if( pCol->affinity==SQLITE_AFF_REAL && !IsVirtual(pTab) ){
149498 if( pTab->aCol[i].affinity==SQLITE_AFF_REAL ){
151630 char idxaff; /* Must match this affinity, if zCollName!=NULL */
152303 ** Code an OP_Affinity opcode to apply the column affinity string zAff
152322 ** entries at the beginning and end of the affinity string.
152343 ** Before the comparison operation, affinity zAff is to be applied
152345 ** affinity string to SQLITE_AFF_BLOB if either:
152347 ** * the comparison will be performed with no affinity, or
152348 ** * the affinity change in zAff is guaranteed not to change the value.
152658 ** compute the affinity string.
152674 ** copy of the column affinity string of the index allocated using
152676 ** with equality constraints that use BLOB or NONE affinity are set to
152682 ** In the example above, the index on t1(a) has TEXT affinity. But since
152683 ** the right hand side of the equality constraint (t2.b) has BLOB/NONE affinity,
152685 ** a key to search the index. Hence the first byte in the returned affinity
152693 char **pzAff /* OUT: Set to point to affinity string */
152769 /* No affinity ever needs to be (or should be) applied to a value
152772 ** affinity of the comparison has been applied to the value. */
154950 /* If the LHS is not an ordinary column with TEXT affinity, then the
156903 /* Verify the affinity and collating sequence match */
157010 pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
157356 aff = pSrc->pTab->aCol[pTerm->u.x.leftColumn].affinity;
158190 ** Return the affinity for a single column of an index.
159274 char aff; /* Comparison affinity */
159275 char idxaff = 0; /* Indexed columns affinity */