Lines Matching refs:nKey

4783   const void *pKey, int nKey     /* The key */
4796 const void *pKey, int nKey /* The new key */
7377 const char *pKey; int nKey; /* Key associated with this element */
7384 SQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const char *pKey, int nKey, void *pData);
7385 SQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const char *pKey, int nKey);
7404 /* #define sqliteHashKeysize(E) ((E)->nKey) // NOT USED */
8078 SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey,
21852 static unsigned int strHash(const char *z, int nKey){
21854 assert( nKey>=0 );
21855 while( nKey > 0 ){
21857 nKey--;
21925 unsigned int h = strHash(elem->pKey, elem->nKey) % new_size;
21939 int nKey, /* Bytes in key (not counting zero terminator) */
21954 if( elem->nKey==nKey && sqlite3StrNICmp(elem->pKey,pKey,nKey)==0 ){
21997 ** that matches pKey,nKey. Return the data for this element if it is
22000 SQLITE_PRIVATE void *sqlite3HashFind(const Hash *pH, const char *pKey, int nKey){
22006 assert( nKey>=0 );
22008 h = strHash(pKey, nKey) % pH->htsize;
22012 elem = findElementGivenHash(pH, pKey, nKey, h);
22016 /* Insert an element into the hash table pH. The key is pKey,nKey
22030 SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, int nKey, void *data){
22037 assert( nKey>=0 );
22039 h = strHash(pKey, nKey) % pH->htsize;
22043 elem = findElementGivenHash(pH,pKey,nKey,h);
22051 assert(nKey==elem->nKey);
22059 new_elem->nKey = nKey;
22065 h = strHash(pKey, nKey) % pH->htsize;
47791 i64 nKey; /* The key for INTKEY tables, or number of bytes in key */
47834 i64 nKey; /* Size of pKey, or last integer key */
47839 u8 validNKey; /* True if info.nKey is valid */
47864 ** in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in
48736 if( p->isIncrblobHandle && (isClearTable || p->info.nKey==iRow) ){
48821 ** Save the current cursor position in the variables BtCursor.nKey
48834 rc = sqlite3BtreeKeySize(pCur, &pCur->nKey);
48838 ** stores the integer key in pCur->nKey. In this case this value is
48840 ** table, then malloc space for and store the pCur->nKey bytes of key
48844 void *pKey = sqlite3Malloc( (int)pCur->nKey );
48846 rc = sqlite3BtreeKey(pCur, 0, (int)pCur->nKey, pKey);
48911 i64 nKey, /* Integer key for tables. Size of pKey for indices */
48921 assert( nKey==(i64)(int)nKey );
48926 sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey);
48930 rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
48952 rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &pCur->skipNext);
49176 n += getVarint(&pCell[n], (u64*)&pInfo->nKey);
49181 pInfo->nKey = nPayload;
49310 assert( (info.nData+(pPage->intKey?0:info.nKey))==info.nPayload );
50675 ** 9-byte nKey value
51932 *pSize = pCur->info.nKey;
52102 u32 nKey;
52114 nKey = (pPage->intKey ? 0 : (int)pCur->info.nKey);
52116 if( NEVER(offset+amt > nKey+pCur->info.nData)
52300 u32 nKey;
52315 nKey = 0;
52317 nKey = (int)pCur->info.nKey;
52320 aPayload += nKey;
52321 nLocal = pCur->info.nLocal - nKey;
52324 assert( nLocal<=nKey );
52699 if( pCur->info.nKey==intKey ){
52703 if( pCur->atLast && pCur->info.nKey<intKey ){
52765 pCur->info.nKey = nCellKey;
52795 nCell = (int)pCur->info.nKey;
53509 const void *pKey, i64 nKey, /* The key */
53544 nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
53547 assert( info.nKey==nKey );
53557 if( NEVER(nKey>0x7fffffff || pKey==0) ){
53560 nPayload += (int)nKey;
53562 nSrc = (int)nKey;
54544 sz = 4 + putVarint(&pCell[4], info.nKey);
54916 ** Insert a new record into the BTree. The key is given by (pKey,nKey)
54921 ** For an INTKEY table, only the nKey value of the key is used. pKey is
54925 ** MovetoUnpacked() to seek cursor pCur to (pKey, nKey) has already
54927 ** number if pCur points at an entry that is smaller than (pKey, nKey), or
54929 ** (pKey, nKey)).
54939 const void *pKey, i64 nKey, /* The key of the new record */
54975 invalidateIncrblobCursors(p, nKey, 0);
54992 rc = btreeMoveto(pCur, pKey, nKey, appendBias, &loc);
54998 assert( pPage->intKey || nKey>=0 );
55002 pCur->pgnoRoot, nKey, nData, pPage->pgno,
55008 rc = fillInCell(pPage, newCell, pKey, nKey, pData, nData, nZero, &szNew);
55104 invalidateIncrblobCursors(p, pCur->info.nKey, 0);
55934 if( !pPage->intKey ) sz += (int)info.nKey;
55937 else if( i==0 ) nMinKey = nMaxKey = info.nKey;
55939 if( info.nKey <= nMaxKey ){
55941 "Rowid %lld out of order (previous was %lld)", info.nKey, nMaxKey);
55943 nMaxKey = info.nKey;
61181 ** Given the nKey-byte encoding of a record in pKey[], populate the
61187 int nKey, /* Size of the binary record */
61203 while( idx<szHdr && u<p->nField && d<=nKey ){
63942 int nKey;
68075 int nKey;
68093 u.bq.nKey = pIn2->n;
68095 rc = sqlite3BtreeInsert(u.bq.pCrsr, u.bq.zKey, u.bq.nKey, "", 0, 0, pOp->p3,
70389 ** variables nKey/aKey. If the iterator is at EOF, pFile==0.
70397 int nKey; /* Number of bytes in key */
70474 pIter->nKey = nRec;
70647 pCsr, 0, p1->aKey, p1->nKey, p2->aKey, p2->nKey, &res
71039 nToWrite = pIter->nKey + sqlite3VarintLen(pIter->nKey);
71109 *pnKey = pIter->nKey;
71123 void *pKey; int nKey; /* Sorter key to copy into pOut */
71125 pKey = vdbeSorterRowkey(pSorter, &nKey);
71126 if( sqlite3VdbeMemGrow(pOut, nKey, 0) ){
71129 pOut->n = nKey;
71131 memcpy(pOut->z, pKey, nKey);
71152 void *pKey; int nKey; /* Sorter key to compare pVal with */
71154 pKey = vdbeSorterRowkey(pSorter, &nKey);
71155 vdbeSorterCompare(pCsr, 1, pVal->z, pVal->n, pKey, nKey, pRes);
78499 int nKey;
78511 nKey = sqlite3_value_bytes(argv[2]);
78513 rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
78518 sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
78519 if( nKey>0 || sqlite3BtreeGetReserve(db->aDb[0].pBt)>0 ){
78520 rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
99102 int nKey;
99104 sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
99105 if( nKey ) db->nextPagesize = 0;
113976 void *pKey; int nKey; /* Key associated with this element */
113982 ** FTS3_HASH_STRING pKey points to a string that is nKey bytes long
113986 ** FTS3_HASH_BINARY pKey points to binary data nKey bytes long.
113998 SQLITE_PRIVATE void *sqlite3Fts3HashInsert(Fts3Hash*, const void *pKey, int nKey, void *pData);
113999 SQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash*, const void *pKey, int nKey);
114028 #define fts3HashKeysize(E) ((E)->nKey)
115196 int nKey;
115209 else if( isFts4 && fts3IsSpecialColumn(z, &nKey, &zVal) ){
115228 if( nKey==pOp->nOpt && !sqlite3_strnicmp(z, pOp->zOpt, pOp->nOpt) ){
119929 int nKey = pKey->n;
119934 assert( nKey==4 );
119937 for(nKey=5; zInput[nKey]>='0' && zInput[nKey]<='9'; nKey++){
119938 nNear = nNear * 10 + (zInput[nKey] - '0');
119947 cNext = zInput[nKey];
119958 *pnConsumed = (int)((zInput - z) + nKey);
120600 static int fts3StrHash(const void *pKey, int nKey){
120603 if( nKey<=0 ) nKey = (int) strlen(z);
120604 while( nKey > 0 ){
120606 nKey--;
120618 static int fts3BinHash(const void *pKey, int nKey){
120621 while( nKey-- > 0 ){
120712 int h = (*xHash)(elem->pKey, elem->nKey) & (new_size-1);
120726 int nKey,
120739 if( (*xCompare)(elem->pKey,elem->nKey,pKey,nKey)==0 ){
120788 int nKey
120796 h = (*xHash)(pKey,nKey);
120798 return fts3FindElementByHash(pH,pKey,nKey, h & (pH->htsize-1));
120803 ** that matches pKey,nKey. Return the data for this element if it is
120806 SQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash *pH, const void *pKey, int nKey){
120809 pElem = sqlite3Fts3HashFindElem(pH, pKey, nKey);
120813 /* Insert an element into the hash table pH. The key is pKey,nKey
120831 int nKey, /* Number of bytes in the key */
120843 hraw = (*xHash)(pKey, nKey);
120846 elem = fts3FindElementByHash(pH,pKey,nKey,h);
120867 new_elem->pKey = fts3HashMalloc( nKey );
120872 memcpy((void*)new_elem->pKey, pKey, nKey);
120876 new_elem->nKey = nKey;
123723 int nKey = fts3HashKeysize(pE);
123724 if( nTerm==0 || (nKey>=nTerm && 0==memcmp(zKey, zTerm, nTerm)) ){