Lines Matching defs:pStr

23101 SQLITE_PRIVATE   void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr);
32054 sqlite3_str *pStr = sqlite3_str_new(0);
32056 sqlite3_str_appendf(pStr, "IN flags=0x%x", pExpr->flags);
32057 if( pExpr->iTable ) sqlite3_str_appendf(pStr, " iTable=%d",pExpr->iTable);
32059 sqlite3_str_appendf(pStr, " subrtn(%d,%d)",
32062 z = sqlite3_str_finish(pStr);
82621 DblquoteStr *pStr = sqlite3DbMallocRawNN(db,
82622 sizeof(*pStr)+n+1-sizeof(pStr->z));
82623 if( pStr ){
82624 pStr->pNextStr = p->pDblStr;
82625 p->pDblStr = pStr;
82626 memcpy(pStr->z, z, n+1);
82641 DblquoteStr *pStr;
82644 for(pStr=pVdbe->pDblStr; pStr; pStr=pStr->pNextStr){
82645 if( strcmp(zId, pStr->z)==0 ) return 1;
90769 SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, StrAccum *pStr){
90787 sqlite3_str_appendf(pStr, "%cx[", c);
90789 sqlite3_str_appendf(pStr, "%02X", ((int)pMem->z[i] & 0xFF));
90791 sqlite3_str_appendf(pStr, "|");
90794 sqlite3_str_appendchar(pStr, 1, (z<32||z>126)?'.':z);
90796 sqlite3_str_appendf(pStr,"]");
90798 sqlite3_str_appendf(pStr, "+%dz",pMem->u.nZero);
90815 sqlite3_str_appendf(pStr, " %c%d[", c, pMem->n);
90818 sqlite3_str_appendchar(pStr, 1, (c>=0x20&&c<=0x7f) ? c : '.');
90820 sqlite3_str_appendf(pStr, "]%s", encnames[pMem->enc]);
125770 ** Append to pStr text that is the SQL literal representation of the
125773 SQLITE_PRIVATE void sqlite3QuoteValue(StrAccum *pStr, sqlite3_value *pValue){
125777 assert( pStr!=0 && pStr->nChar==0 );
125784 sqlite3_str_appendf(pStr, "%!.15g", r1);
125785 zVal = sqlite3_str_value(pStr);
125787 sqlite3AtoF(zVal, &r2, pStr->nChar, SQLITE_UTF8);
125789 sqlite3_str_reset(pStr);
125790 sqlite3_str_appendf(pStr, "%!.20e", r1);
125796 sqlite3_str_appendf(pStr, "%lld", sqlite3_value_int64(pValue));
125803 sqlite3StrAccumEnlarge(pStr, nBlob*2 + 4);
125804 if( pStr->accError==0 ){
125805 char *zText = pStr->zText;
125815 pStr->nChar = nBlob*2 + 3;
125821 sqlite3_str_appendf(pStr, "%Q", zArg);
125826 sqlite3_str_append(pStr, "NULL", 4);
151964 ** pStr holds the text of an expression that we are building up one term
151970 StrAccum *pStr, /* The text expression being built */
151980 if( bAnd ) sqlite3_str_append(pStr, " AND ", 5);
151982 if( nTerm>1 ) sqlite3_str_append(pStr, "(", 1);
151984 if( i ) sqlite3_str_append(pStr, ",", 1);
151985 sqlite3_str_appendall(pStr, explainIndexColumnName(pIdx, iTerm+i));
151987 if( nTerm>1 ) sqlite3_str_append(pStr, ")", 1);
151989 sqlite3_str_append(pStr, zOp, 1);
151991 if( nTerm>1 ) sqlite3_str_append(pStr, "(", 1);
151993 if( i ) sqlite3_str_append(pStr, ",", 1);
151994 sqlite3_str_append(pStr, "?", 1);
151996 if( nTerm>1 ) sqlite3_str_append(pStr, ")", 1);
152001 ** function appends text to pStr that describes the subset of table
152013 static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop){
152020 sqlite3_str_append(pStr, " (", 2);
152023 if( i ) sqlite3_str_append(pStr, " AND ", 5);
152024 sqlite3_str_appendf(pStr, i>=nSkip ? "%s=?" : "ANY(%s)", z);
152029 explainAppendTerm(pStr, pIndex, pLoop->u.btree.nBtm, j, i, ">");
152033 explainAppendTerm(pStr, pIndex, pLoop->u.btree.nTop, j, i, "<");
152035 sqlite3_str_append(pStr, ")", 1);
172887 ** Insert a single space character into pStr if the current string
172890 static void addSpaceSeparator(sqlite3_str *pStr){
172891 if( pStr->nChar && sqlite3IsIdChar(pStr->zText[pStr->nChar-1]) ){
172892 sqlite3_str_append(pStr, " ", 1);
172914 sqlite3_str *pStr; /* The normalized SQL string under construction */
172919 pStr = sqlite3_str_new(db);
172920 assert( pStr!=0 ); /* sqlite3_str_new() never returns NULL */
172921 for(i=0; zSql[i] && pStr->accError==0; i+=n){
172933 sqlite3_str_append(pStr, " NULL", 5);
172943 sqlite3_str_append(pStr, "?", 1);
172949 iStartIN = pStr->nChar;
172952 sqlite3_str_append(pStr, "(", 1);
172957 assert( pStr->nChar>=(u32)iStartIN );
172958 pStr->nChar = iStartIN+1;
172959 sqlite3_str_append(pStr, "?,?,?", 5);
172963 sqlite3_str_append(pStr, ")", 1);
172968 j = pStr->nChar;
172976 sqlite3_str_append(pStr, "?", 1);
172982 addSpaceSeparator(pStr);
172983 sqlite3_str_append(pStr, zId, nId);
172985 sqlite3_str_appendf(pStr, "\"%w\"", zId);
172989 addSpaceSeparator(pStr);
172990 sqlite3_str_append(pStr, zSql+i, n);
172992 while( j<pStr->nChar ){
172993 pStr->zText[j] = sqlite3Tolower(pStr->zText[j]);
173003 if( sqlite3IsIdChar(zSql[i]) ) addSpaceSeparator(pStr);
173004 j = pStr->nChar;
173005 sqlite3_str_append(pStr, zSql+i, n);
173006 while( j<pStr->nChar ){
173007 pStr->zText[j] = sqlite3Toupper(pStr->zText[j]);
173014 if( tokenType!=TK_SEMI ) sqlite3_str_append(pStr, ";", 1);
173015 return sqlite3_str_finish(pStr);
196306 StrBuffer *pStr, /* Buffer to append to */
196318 if( pStr->n+nAppend+1>=pStr->nAlloc ){
196319 sqlite3_int64 nAlloc = pStr->nAlloc+(sqlite3_int64)nAppend+100;
196320 char *zNew = sqlite3_realloc64(pStr->z, nAlloc);
196324 pStr->z = zNew;
196325 pStr->nAlloc = nAlloc;
196327 assert( pStr->z!=0 && (pStr->nAlloc >= pStr->n+nAppend+1) );
196330 memcpy(&pStr->z[pStr->n], zAppend, nAppend);
196331 pStr->n += nAppend;
196332 pStr->z[pStr->n] = '\0';
200209 JsonString *pStr;
200211 pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr));
200212 if( pStr ){
200213 if( pStr->zBuf==0 ){
200214 jsonInit(pStr, ctx);
200215 jsonAppendChar(pStr, '[');
200216 }else if( pStr->nUsed>1 ){
200217 jsonAppendChar(pStr, ',');
200219 pStr->pCtx = ctx;
200220 jsonAppendValue(pStr, argv[0]);
200224 JsonString *pStr;
200225 pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0);
200226 if( pStr ){
200227 pStr->pCtx = ctx;
200228 jsonAppendChar(pStr, ']');
200229 if( pStr->bErr ){
200230 if( pStr->bErr==1 ) sqlite3_result_error_nomem(ctx);
200231 assert( pStr->bStatic );
200233 sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed,
200234 pStr->bStatic ? SQLITE_TRANSIENT : sqlite3_free);
200235 pStr->bStatic = 1;
200237 sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, SQLITE_TRANSIENT);
200238 pStr->nUsed--;
200269 JsonString *pStr;
200272 pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0);
200274 /* pStr is always non-NULL since jsonArrayStep() or jsonObjectStep() will
200276 if( NEVER(!pStr) ) return;
200278 z = pStr->zBuf;
200279 for(i=1; i<pStr->nUsed && ((c = z[i])!=',' || inStr || nNest); i++){
200289 if( i<pStr->nUsed ){
200290 pStr->nUsed -= i;
200291 memmove(&z[1], &z[i+1], (size_t)pStr->nUsed-1);
200292 z[pStr->nUsed] = 0;
200294 pStr->nUsed = 1;
200312 JsonString *pStr;
200316 pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr));
200317 if( pStr ){
200318 if( pStr->zBuf==0 ){
200319 jsonInit(pStr, ctx);
200320 jsonAppendChar(pStr, '{');
200321 }else if( pStr->nUsed>1 ){
200322 jsonAppendChar(pStr, ',');
200324 pStr->pCtx = ctx;
200327 jsonAppendString(pStr, z, n);
200328 jsonAppendChar(pStr, ':');
200329 jsonAppendValue(pStr, argv[1]);
200333 JsonString *pStr;
200334 pStr = (JsonString*)sqlite3_aggregate_context(ctx, 0);
200335 if( pStr ){
200336 jsonAppendChar(pStr, '}');
200337 if( pStr->bErr ){
200338 if( pStr->bErr==1 ) sqlite3_result_error_nomem(ctx);
200339 assert( pStr->bStatic );
200341 sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed,
200342 pStr->bStatic ? SQLITE_TRANSIENT : sqlite3_free);
200343 pStr->bStatic = 1;
200345 sqlite3_result_text(ctx, pStr->zBuf, (int)pStr->nUsed, SQLITE_TRANSIENT);
200346 pStr->nUsed--;
200523 ** in pStr.
200526 JsonString *pStr,
200546 jsonPrintf(nn+2, pStr, ".%.*s", nn, z);
200549 /* Append the name of the path for element i to pStr
200553 JsonString *pStr, /* Write the path here */
200559 jsonAppendChar(pStr, '$');
200563 jsonEachComputePath(p, pStr, iUp);
200569 jsonPrintf(30, pStr, "[%d]", pUp->u.iKey);
200573 jsonAppendObjectPathElement(pStr, pNode);