Lines Matching defs:nKey

14477 /* #define sqliteHashKeysize(E) ((E)->nKey)  // NOT USED */
16294 ** an arbitrary key and no data. These btrees have pKey,nKey set to the
16300 ** the key and passed in the nKey field. The pKey field is zero.
16310 ** nKey the ROWID length of pKey
16325 sqlite3_int64 nKey; /* Size of pKey for indexes. PRIMARY KEY for tabs */
69993 i64 nKey; /* The key for INTKEY tables, or nPayload otherwise */
70054 i64 nKey; /* Size of pKey, or last integer key */
70069 #define BTCF_ValidNKey 0x02 /* True if info.nKey is valid */
70095 ** in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in
71147 if( p->pgnoRoot==pgnoRoot && (isClearTable || p->info.nKey==iRow) ){
71247 ** function saves the current cursor key in variables pCur->nKey and
71252 ** (the rowid) is stored in pCur->nKey and pCur->pKey is left set to
71254 ** set to point to a malloced buffer pCur->nKey bytes in size containing
71265 pCur->nKey = sqlite3BtreeIntegerKey(pCur);
71274 pCur->nKey = sqlite3BtreePayloadSize(pCur);
71275 pKey = sqlite3Malloc( pCur->nKey + 9 + 8 );
71277 rc = sqlite3BtreePayload(pCur, 0, (int)pCur->nKey, pKey);
71279 memset(((u8*)pKey)+pCur->nKey, 0, 9+8);
71293 ** Save the current cursor position in the variables BtCursor.nKey
71406 i64 nKey, /* Integer key for tables. Size of pKey for indices */
71415 assert( nKey==(i64)(int)nKey );
71418 sqlite3VdbeRecordUnpack(pKeyInfo, (int)nKey, pKey, pIdxKey);
71427 rc = sqlite3BtreeTableMoveto(pCur, nKey, bias, pRes);
71451 rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
71795 pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);
71834 ** pIter += getVarint(pIter, (u64*)&pInfo->nKey);
71871 pInfo->nKey = *(i64*)&iKey;
71908 pInfo->nKey = nPayload;
73962 ** 9-byte nKey value
75353 if( a->nKey!=b->nKey ) return 0;
75404 return pCur->info.nKey;
76268 if( pCur->info.nKey==intKey ){
76272 if( pCur->info.nKey<intKey ){
76282 if( pCur->info.nKey+1==intKey ){
76287 if( pCur->info.nKey==intKey ){
76360 pCur->info.nKey = nCellKey;
76618 nCell = (int)pCur->info.nKey;
77550 nHeader += putVarint(&pCell[nHeader], *(u64*)&pX->nKey);
77552 assert( pX->nKey<=0x7fffffff && pX->pKey!=0 );
77553 nSrc = nPayload = (int)pX->nKey;
77610 assert( info.nKey==pX->nKey );
79284 sz = 4 + putVarint(&pCell[4], info.nKey);
79813 ** For a table btree (used for rowid tables), only the pX.nKey value of
79814 ** the key is used. The pX.pKey value must be NULL. The pX.nKey is the
79819 ** key is an arbitrary byte sequence stored in pX.pKey,nKey. The
79823 ** sqlite3BtreeIndexMoveto() to seek cursor pCur to (pKey,nKey) has already
79827 ** smaller then (pKey,nKey). If seekResult>0 then pCur points to a cell
79828 ** that is larger than (pKey,nKey).
79832 ** point for (pKey,nKey) before doing the insertion. For index btrees,
79907 invalidateIncrblobCursors(p, pCur->pgnoRoot, pX->nKey, 0);
79916 assert( pX->nKey==pCur->info.nKey );
79925 if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey ){
79941 rc = sqlite3BtreeTableMoveto(pCur, pX->nKey,
79968 rc = btreeMoveto(pCur, pX->pKey, pX->nKey,
79980 if( pCur->info.nKey==pX->nKey ){
79983 x2.nData = pX->nKey;
79993 assert( pPage->intKey || pX->nKey>=0 || (flags & BTREE_PREFORMAT) );
80006 pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno,
80123 pCur->pKey = sqlite3Malloc( pX->nKey );
80127 memcpy(pCur->pKey, pX->pKey, pX->nKey);
80131 pCur->nKey = pX->nKey;
80367 invalidateIncrblobCursors(p, pCur->pgnoRoot, pCur->info.nKey, 0);
81413 if( keyCanBeEqual ? (info.nKey > maxKey) : (info.nKey >= maxKey) ){
81414 checkAppendMsg(pCheck, "Rowid %lld out of order", info.nKey);
81416 maxKey = info.nKey;
89048 ** Given the nKey-byte encoding of a record in pKey[], populate the
89054 int nKey, /* Size of the binary record */
89070 while( idx<szHdr && d<=(u32)nKey ){
89084 if( d>(u32)nKey && u ){
89219 ** pKey,nKey. The verify that this count is less than or equal to the
89229 int nKey, const void *pKey, /* The record to verify */
89240 assert( nKey>=0 );
89241 assert( szHdr<=(u32)nKey );
92512 ** record in nKey/pKey. Return a pointer to the new UnpackedRecord structure
92517 int nKey,
92525 sqlite3VdbeRecordUnpack(pKeyInfo, nKey, pKey, pRet);
98793 x.nKey = pKey->u.i;
98809 sqlite3VdbePreUpdateHook(p,pC,SQLITE_INSERT,zDb,pTab,x.nKey,pOp->p2,-1);
98822 if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = x.nKey;
98850 zDb, pTab->zName, x.nKey);
99579 x.nKey = pIn2->n;
103144 ** PMA, in sorted order. The next key to be read is cached in nKey/aKey.
103155 int nKey; /* Number of bytes in key */
103508 pReadr->nKey = (int)nRec;
104445 pReadr1->aKey, pReadr1->nKey, pReadr2->aKey, pReadr2->nKey
104696 int nKey = pReader->nKey;
104702 if( (iEof + nKey + sqlite3VarintLen(nKey))>(iStart + pIncr->mxSz) ) break;
104705 vdbePmaWriteVarint(&writer, nKey);
104706 vdbePmaWriteBlob(&writer, pReader->aKey, nKey);
104866 pTask, &bCached, p1->aKey, p1->nKey, p2->aKey, p2->nKey
105488 *pnKey = pReader->nKey;
105502 void *pKey; int nKey; /* Sorter key to copy into pOut */
105506 pKey = vdbeSorterRowkey(pSorter, &nKey);
105507 if( sqlite3VdbeMemClearAndResize(pOut, nKey) ){
105510 pOut->n = nKey;
105512 memcpy(pOut->z, pKey, nKey);
105543 void *pKey; int nKey; /* Sorter key to compare pVal with */
105556 pKey = vdbeSorterRowkey(pSorter, &nKey);
105557 sqlite3VdbeRecordUnpack(pKeyInfo, nKey, pKey, r2);
123619 ** Return true if any of the first nKey entries of index pIdx exactly
123624 ** The first nKey entries of pIdx are guaranteed to be ordinary columns,
123631 static int isDupColumn(Index *pIdx, int nKey, Index *pPk, int iCol){
123633 assert( nKey<=pIdx->nColumn );
123641 for(i=0; i<nKey; i++){
126920 int nKey = pIdx->nKeyCol;
126924 pKey = sqlite3KeyInfoAlloc(pParse->db, nKey, nCol-nKey);
127932 i16 nKey; /* Number of memory cells in the row key */
128174 nKey = nPk; /* OP_Found will use an unpacked key */
128190 nKey = 0; /* Zero tells OP_Found to use a composite key */
128196 nKey = 1; /* OP_DeferredSeek always uses a single rowid */
128226 assert( nKey==nPk ); /* OP_Found will use an unpacked key */
128229 sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey);
128239 assert( nKey==0 ); /* OP_Found will use a composite key */
128243 assert( nKey==1 );
128266 iKey, nKey, count, OE_Default, eOnePass, aiCurOnePass[1]);
142955 int nKey; /* Number of PK columns for table pTab (>=1) */
143650 int nKey; /* Number of sorting key columns, including OP_Sequence */
143656 nKey = nExpr - pSort->nOBSat + bSeq;
143666 pOp->p2 = nKey + nData;
143954 int nKey = 1;
143959 nKey = pPk->nKeyCol;
143961 for(k=0; k<nKey; k++){
143973 pSort->aDefer[nDefer].nKey = nKey;
144333 int nKey;
144339 nKey = pSO->nExpr;
144341 r2 = sqlite3GetTempRange(pParse, nKey+2);
144342 r3 = r2+nKey+1;
144356 for(i=0; i<nKey; i++){
144361 sqlite3VdbeAddOp2(v, OP_Sequence, iParm, r2+nKey);
144362 sqlite3VdbeAddOp3(v, OP_MakeRecord, r2, nKey+2, r1);
144363 sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iParm, r1, r2, nKey+2);
144366 sqlite3ReleaseTempRange(pParse, r2, nKey+2);
144557 int nKey; /* Number of key columns in sorter record */
144567 nKey = pOrderBy->nExpr - pSort->nOBSat;
144568 if( pSort->nOBSat==0 || nKey==1 ){
144574 "USE TEMP B-TREE FOR LAST %d TERMS OF ORDER BY", nKey
144594 nRefKey = MAX(nRefKey, pSort->aDefer[i].nKey);
144621 nKey+1+nColumn+nRefKey);
144637 for(i=0, iCol=nKey+bSeq-1; i<nColumn; i++){
144651 int nKey = pSort->aDefer[i].nKey;
144661 assert( sqlite3PrimaryKeyIndex(pTab)->nKeyCol==nKey );
144662 for(k=0; k<nKey; k++){
144666 sqlite3VdbeAddOp4Int(v, OP_SeekGE, iCsr, iJmp+2, regKey, nKey);
144667 sqlite3VdbeAddOp4Int(v, OP_IdxLE, iCsr, iJmp+3, regKey, nKey);
144695 sqlite3VdbeAddOp3(v, OP_Column, iSortTab, nKey+bSeq, regRow);
149637 int nKey; /* Key columns to be skipped */
149646 nKey = 0;
149651 nKey = pF->pFExpr->pLeft->x.pList->nExpr;
149652 if( ALWAYS(!pF->bOBUnique) ) nKey++;
149656 sqlite3VdbeAddOp3(v, OP_Column, pF->iOBTab, nKey+j, regAgg+j);
149660 int iBaseCol = nKey + nArg + (pF->bOBPayload==0 && pF->bOBUnique==0);
153607 int nKey = 0; /* Number of elements in regKey for WITHOUT ROWID */
153986 nKey = nPk;
154072 nKey = nPk;
154117 sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelBreak, regKey,nKey);
154274 sqlite3VdbeAddOp4Int(v, OP_NotFound,iDataCur,labelContinue,regKey,nKey);
154319 sqlite3VdbeAddOp4Int(v, OP_NotFound,iDataCur,labelContinue,regKey,nKey);
185763 void *pKey; int nKey; /* Key associated with this element */
185769 ** FTS3_HASH_STRING pKey points to a string that is nKey bytes long
185773 ** FTS3_HASH_BINARY pKey points to binary data nKey bytes long.
185785 SQLITE_PRIVATE void *sqlite3Fts3HashInsert(Fts3Hash*, const void *pKey, int nKey, void *pData);
185786 SQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash*, const void *pKey, int nKey);
185815 #define fts3HashKeysize(E) ((E)->nKey)
187396 int nKey;
187409 else if( isFts4 && fts3IsSpecialColumn(z, &nKey, &zVal) ){
187430 if( nKey==pOp->nOpt && !sqlite3_strnicmp(z, pOp->zOpt, pOp->nOpt) ){
193344 int nKey = pKey->n;
193349 assert( nKey==4 );
193351 nKey += 1+sqlite3Fts3ReadInt(&zInput[nKey+1], &nNear);
193359 cNext = zInput[nKey];
193370 *pnConsumed = (int)((zInput - z) + nKey);
194295 static int fts3StrHash(const void *pKey, int nKey){
194298 if( nKey<=0 ) nKey = (int) strlen(z);
194299 while( nKey > 0 ){
194301 nKey--;
194313 static int fts3BinHash(const void *pKey, int nKey){
194316 while( nKey-- > 0 ){
194407 int h = (*xHash)(elem->pKey, elem->nKey) & (new_size-1);
194421 int nKey,
194434 if( (*xCompare)(elem->pKey,elem->nKey,pKey,nKey)==0 ){
194483 int nKey
194491 h = (*xHash)(pKey,nKey);
194493 return fts3FindElementByHash(pH,pKey,nKey, h & (pH->htsize-1));
194498 ** that matches pKey,nKey. Return the data for this element if it is
194501 SQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash *pH, const void *pKey, int nKey){
194504 pElem = sqlite3Fts3HashFindElem(pH, pKey, nKey);
194508 /* Insert an element into the hash table pH. The key is pKey,nKey
194526 int nKey, /* Number of bytes in the key */
194538 hraw = (*xHash)(pKey, nKey);
194541 elem = fts3FindElementByHash(pH,pKey,nKey,h);
194562 new_elem->pKey = fts3HashMalloc( nKey );
194567 memcpy((void*)new_elem->pKey, pKey, nKey);
194571 new_elem->nKey = nKey;
198195 int nKey = fts3HashKeysize(pE);
198196 if( nTerm==0 || (nKey>=nTerm && 0==memcmp(zKey, zTerm, nTerm)) ){
200725 ** * The first key read from the input (arguments zKey and nKey) is
200734 int nKey, /* Number of bytes in nKey */
200774 /* Check that zKey/nKey is larger than the largest key the candidate */
200788 if( fts3TermCmp(zKey, nKey, reader.term.a, reader.term.n)<=0 ){
201515 int nKey = pCsr->nTerm;
201516 rc = fts3IncrmergeLoad(p, iAbsLevel, iIdx-1, zKey, nKey, pWriter);
207672 u32 i, j, k, nKey, sz, n, iEnd, rc;
207703 nKey = i-1;
207709 testcase( nKey==0 );
207710 rawKey = memchr(zKey, '\\', nKey)==0;
207714 nKey = i;
207715 if( nKey==0 ){
207734 if( jsonLabelCompare(zKey, nKey, rawKey, zLabel, sz, rawLabel) ){
207759 jsonBlobAppendNode(&ix, rawKey?JSONB_TEXTRAW:JSONB_TEXT5, nKey, 0);
207763 && jsonBlobMakeEditable(pParse, ix.nBlob+nKey+v.nBlob)
207766 nIns = ix.nBlob + nKey + v.nBlob;
207773 memcpy(&pParse->aBlob[k], zKey, nKey);
207774 k += nKey;
239977 ** The key is Fts5HashEntry.nKey bytes in size. It consists of a single
239980 ** nul-terminator - in this case nKey=6.
240004 int nKey; /* Length of key in bytes */
240115 iHash = fts5HashKey(nNew, (u8*)fts5EntryKey(p), p->nKey);
240199 && p->nKey==nToken+1
240229 p->nKey = nToken+1;
240350 int nMin = MIN(p1->nKey, p2->nKey);
240354 cmp = p1->nKey - p2->nKey;
240400 || (pIter->nKey>=nTerm && 0==memcmp(fts5EntryKey(pIter), pTerm, nTerm))
240439 if( nTerm==p->nKey && memcmp(zKey, pTerm, nTerm)==0 ) break;
240511 int nTerm = p->nKey;