Purpose: Select into a set, all identifiers matching the key
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hdbIndexEnum::Select | (hzIntset&,hzAtom&,) |
Declared in file: hzDatabase.h
Defined in file : hdbIndex.cpp
Function Logic:
Function body:
hzEcode hdbIndexEnum::Select (hzIntset& Result)hzAtom& Key,
{
// Purpose: Select into a set, all identifiers matching the key
//
// Arguments: 1) The object id (row number)
// 2) The key
//
// Returns: E_RANGE If the key was not located
// E_OK If the operation was successful.
_hzfunc("hdbIndexEnum::Select") ;
hzIntset* pS ; // Applicable bitmap for value
uint32_t val ; // Enum value from supplied atom
hzEcode rc = E_OK ; // Return code
Result.Clear() ;
val = (uint32_t) Key ;
// Querry this?
if (val <&eq; 0|| val > m_Maps.Count())
return E_RANGE ;
pS = m_Maps[val] ;
if (!pS)
return hzerr(E_CORRUPT, "Bitmap stated as existing could not be retrieved from the map") ;
Result = *pS ;
if (Result.Count() != pS->Count())
return hzerr(E_CORRUPT, "Index bound bitmap has %d records, copy has %d records", pS->Count(), Result.Count()) ;
return rc ;
}