CRdbTable& CRdbTable::SetThis(CTableDefine* pTabDef) { if(m_nThis) Distruction(); m_pTabDef = pTabDef; m_nThis = pTabDef->m_pBaseAttr->nStorageAddr; if(m_nThis) { Construction(pTabDef); uint64 nAddrTable[2]; vquery(m_nThis, (char*)nAddrTable, 16); m_pTableSpace->SetThis(nAddrTable[0]); m_pRowIndex->SetThis(nAddrTable[1]); uint32 nIndexCount = m_nIndexCount; if(nIndexCount) { for(uint32 i=0; i<nIndexCount; ++i) { if(m_pIndexTable[i]) { CIndexDefine * pIndex = m_pTabDef->m_pIndexDefineSet[i]; m_pIndexTable[i]->SetThis(pIndex->m_pBaseAttr->nStorageAddr); } } } } return *this; }
CAbstractIndex& CRdbHashIndex::SetThis(uint64 nThis) { CRdbHashInfo oInfo; m_nThis = nThis; if(nThis) { vquery(nThis, (char*)&oInfo, sizeof(oInfo)); m_oAllocator.SetThis(oInfo.nAddr[0]); m_oHash.SetThis(oInfo.nAddr[1], oInfo.oInfo); } return *this; }
CAbstractIndex& CRdbPrefixIndex::SetThis(uint64 nThis) { uint64 pAddr[2]; m_nThis = nThis; if(nThis) { vquery(nThis, (char*)pAddr, 16); m_oAllocator.SetThis(pAddr[1]); m_oTree.SetThis(pAddr[0]); } return *this; }
CAbstractIndex& CRdbRbTreeIndex::SetThis(uint64 nThis) { m_nThis = nThis; if(m_nThis) { uint64 nHandle[2]; vquery(nThis, (char*)nHandle, 16); m_oSpace.SetThis(nHandle[1]); CBaseRbTreeIndex::SetThis(nHandle[0]); } return *this; }
void CIndexKeyValue::Load(uint64 nThis) { vquery(nThis, (char*)m_pFlag, m_nRecSize);//nFlag+nData }
varargs mixed query(mixed key, mixed space_key) { return vquery( key, space_key ); }