Lines Matching refs:pVal

15415   int *pVal;  in getDigits()  local
15423 pVal = va_arg(ap, int*); in getDigits()
15435 *pVal = val; in getDigits()
64109 static SQLITE_NOINLINE const void *valueToText(sqlite3_value* pVal, u8 enc){
64110 assert( pVal!=0 );
64111 assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
64113 assert( (pVal->flags & MEM_RowSet)==0 );
64114 assert( (pVal->flags & (MEM_Null))==0 );
64115 if( pVal->flags & (MEM_Blob|MEM_Str) ){
64116 pVal->flags |= MEM_Str;
64117 if( pVal->flags & MEM_Zero ){
64118 sqlite3VdbeMemExpandBlob(pVal);
64120 if( pVal->enc != (enc & ~SQLITE_UTF16_ALIGNED) ){
64121 sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
64123 if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&SQLITE_PTR_TO_INT(pVal->z)) ){
64124 assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
64125 if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
64129 sqlite3VdbeMemNulTerminate(pVal); /* IMP: R-31275-44060 */
64131 sqlite3VdbeMemStringify(pVal, enc, 0);
64132 assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );
64134 assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
64135 || pVal->db->mallocFailed );
64136 if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){
64137 return pVal->z;
64153 SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
64154 if( !pVal ) return 0;
64155 assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
64157 assert( (pVal->flags & MEM_RowSet)==0 );
64158 if( (pVal->flags&(MEM_Str|MEM_Term))==(MEM_Str|MEM_Term) && pVal->enc==enc ){
64159 return pVal->z;
64161 if( pVal->flags&MEM_Null ){
64164 return valueToText(pVal, enc);
64275 sqlite3_value *pVal = 0; /* New value */
64306 pVal = valueNew(db, pCtx);
64307 if( pVal==0 ){
64314 ctx.pOut = pVal;
64319 sqlite3ErrorMsg(pCtx->pParse, "%s", sqlite3_value_text(pVal));
64321 sqlite3ValueApplyAffinity(pVal, aff, SQLITE_UTF8);
64323 rc = sqlite3VdbeChangeEncoding(pVal, enc);
64324 if( rc==SQLITE_OK && sqlite3VdbeMemTooBig(pVal) ){
64333 pVal = 0;
64342 *ppVal = pVal;
64369 sqlite3_value *pVal = 0;
64410 pVal = valueNew(db, pCtx);
64411 if( pVal==0 ) goto no_mem;
64413 sqlite3VdbeMemSetInt64(pVal, (i64)pExpr->u.iValue*negInt);
64417 sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC);
64420 sqlite3ValueApplyAffinity(pVal, SQLITE_AFF_NUMERIC, SQLITE_UTF8);
64422 sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
64424 if( pVal->flags & (MEM_Int|MEM_Real) ) pVal->flags &= ~MEM_Str;
64426 rc = sqlite3VdbeChangeEncoding(pVal, enc);
64430 if( SQLITE_OK==sqlite3ValueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal)
64431 && pVal!=0
64433 sqlite3VdbeMemNumerify(pVal);
64434 if( pVal->flags & MEM_Real ){
64435 pVal->u.r = -pVal->u.r;
64436 }else if( pVal->u.i==SMALLEST_INT64 ){
64437 pVal->u.r = -(double)SMALLEST_INT64;
64438 MemSetTypeFlag(pVal, MEM_Real);
64440 pVal->u.i = -pVal->u.i;
64442 sqlite3ValueApplyAffinity(pVal, affinity, enc);
64445 pVal = valueNew(db, pCtx);
64446 if( pVal==0 ) goto no_mem;
64453 pVal = valueNew(db, pCtx);
64454 if( !pVal ) goto no_mem;
64458 sqlite3VdbeMemSetStr(pVal, sqlite3HexToBlob(db, zVal, nVal), nVal/2,
64465 rc = valueFromFunction(db, pExpr, enc, affinity, &pVal, pCtx);
64469 *ppVal = pVal;
64477 if( pCtx==0 ) sqlite3ValueFree(pVal);
64479 assert( pCtx==0 ); sqlite3ValueFree(pVal);
64586 sqlite3_value *pVal = 0;
64593 pVal = valueNew(db, pAlloc);
64594 if( pVal ){
64595 sqlite3VdbeMemSetNull((Mem*)pVal);
64604 pVal = valueNew(db, pAlloc);
64605 if( pVal ){
64606 rc = sqlite3VdbeMemCopy((Mem*)pVal, &v->aVar[iBindVar-1]);
64608 sqlite3ValueApplyAffinity(pVal, affinity, ENC(db));
64610 pVal->db = pParse->db;
64614 rc = valueFromExpr(db, pExpr, ENC(db), affinity, &pVal, pAlloc);
64617 assert( pVal==0 || pVal->db==db );
64618 *ppVal = pVal;
64662 sqlite3_value *pVal = 0;
64670 rc = stat4ValueFromExpr(pParse, pExpr, affinity, &alloc, &pVal);
64671 assert( pVal==0 || pVal->db==pParse->db );
64672 *pbOk = (pVal!=0);
64789 SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
64790 Mem *p = (Mem*)pVal;
64791 if( (p->flags & MEM_Blob)!=0 || sqlite3ValueText(pVal, enc) ){
69127 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value *pVal){
69128 Mem *p = (Mem*)pVal;
69134 return sqlite3_value_text(pVal);
69137 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value *pVal){
69138 return sqlite3ValueBytes(pVal, SQLITE_UTF8);
69140 SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value *pVal){
69141 return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
69143 SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value *pVal){
69144 return sqlite3VdbeRealValue((Mem*)pVal);
69146 SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value *pVal){
69147 return (int)sqlite3VdbeIntValue((Mem*)pVal);
69149 SQLITE_API sqlite_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value *pVal){
69150 return sqlite3VdbeIntValue((Mem*)pVal);
69152 SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value *pVal){
69153 return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
69156 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value* pVal){
69157 return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
69159 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value *pVal){
69160 return sqlite3ValueText(pVal, SQLITE_UTF16BE);
69162 SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value *pVal){
69163 return sqlite3ValueText(pVal, SQLITE_UTF16LE);
69170 SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value* pVal){
69205 return aType[pVal->flags&MEM_AffMask];
71070 SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value *pVal){
71071 int eType = sqlite3_value_type(pVal);
71073 Mem *pMem = (Mem*)pVal;
71075 eType = sqlite3_value_type(pVal);
71085 sqlite3_value *pVal,
71089 applyAffinity((Mem *)pVal, affinity, enc);
79669 Mem *pVal /* Memory cell containing record */
79680 getVarint32((const u8*)&pVal->z[1], t);
79707 nReq = pVal->n + sizeof(SorterRecord);
79708 nPMA = pVal->n + sqlite3VarintLen(pVal->n);
79761 memcpy(SRVAL(pNew), pVal->z, pVal->n);
79762 pNew->nVal = pVal->n;
80611 Mem *pVal, /* Value to compare to current sorter key */
80639 *pRes = sqlite3VdbeRecordCompare(pVal->n, pVal->z, r2);
87938 sqlite3_value *pVal = 0;
87940 rc = sqlite3ValueFromExpr(db, pDflt, SQLITE_UTF8, SQLITE_AFF_NONE, &pVal);
87946 if( !pVal ){
87950 sqlite3ValueFree(pVal);
116843 sqlite3_value *pVal = 0;
116869 pVal = sqlite3VdbeGetBoundValue(pReprepare, iCol, SQLITE_AFF_NONE);
116870 if( pVal && sqlite3_value_type(pVal)==SQLITE_TEXT ){
116871 z = (char *)sqlite3_value_text(pVal);
116910 sqlite3ValueFree(pVal);
118492 sqlite3_value *pVal = 0; /* Value extracted from record */
118508 rc = sqlite3Stat4Column(db, p->aSample[i].p, p->aSample[i].n, nEq, &pVal);
118510 int res = sqlite3MemCompare(p1, pVal, pColl);
118514 int res = sqlite3MemCompare(p2, pVal, pColl);
118540 sqlite3ValueFree(pVal);
127899 sqlite3_value *pVal;
127907 pVal = sqlite3ValueNew(0);
127908 sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
127909 zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
127915 sqlite3ValueFree(pVal);
130967 sqlite3_value *pVal;
130979 pVal = sqlite3ValueNew(0);
130980 sqlite3ValueSetStr(pVal, -1, zFilename, SQLITE_UTF16NATIVE, SQLITE_STATIC);
130981 zFilename8 = sqlite3ValueText(pVal, SQLITE_UTF8);
130992 sqlite3ValueFree(pVal);
133461 static void fts3GetDeltaVarint(char **pp, sqlite3_int64 *pVal){
133464 *pVal += iVal;
133479 sqlite3_int64 *pVal
133492 *pVal = iVal;
135370 sqlite3_int64 *pVal /* IN/OUT: Integer value */
135378 *pVal -= iVal;
135380 *pVal += iVal;
136127 static sqlite3_int64 fts3DocidRange(sqlite3_value *pVal, i64 iDefault){
136128 if( pVal ){
136129 int eType = sqlite3_value_numeric_type(pVal);
136131 return sqlite3_value_int64(pVal);
136526 sqlite3_value *pVal, /* argv[0] passed to function */
136530 if( sqlite3_value_type(pVal)!=SQLITE_BLOB
136531 || sqlite3_value_bytes(pVal)!=sizeof(Fts3Cursor *)
136538 memcpy(&pRet, sqlite3_value_blob(pVal), sizeof(Fts3Cursor *));
148259 static int fts3SpecialInsert(Fts3Table *p, sqlite3_value *pVal){
148261 const char *zVal = (const char *)sqlite3_value_text(pVal);
148262 int nVal = sqlite3_value_bytes(pVal);