mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Small performance increase in jsonTranslateBlobToText().
FossilOrigin-Name: 3b1dcac2eeaf5f97450919f2a6eed74a4d54fb2b812bdb4a580f79d075e99dfe
This commit is contained in:
@ -2199,9 +2199,12 @@ static u32 jsonTranslateBlobToText(
|
||||
}
|
||||
case JSONB_TEXT:
|
||||
case JSONB_TEXTJ: {
|
||||
jsonAppendChar(pOut, '"');
|
||||
jsonAppendRaw(pOut, (const char*)&pParse->aBlob[i+n], sz);
|
||||
jsonAppendChar(pOut, '"');
|
||||
if( pOut->nUsed+sz+2<=pOut->nAlloc || jsonStringGrow(pOut, sz+2)==0 ){
|
||||
pOut->zBuf[pOut->nUsed] = '"';
|
||||
memcpy(pOut->zBuf+pOut->nUsed+1,(const char*)&pParse->aBlob[i+n],sz);
|
||||
pOut->zBuf[pOut->nUsed+sz+1] = '"';
|
||||
pOut->nUsed += sz+2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case JSONB_TEXT5: {
|
||||
|
Reference in New Issue
Block a user