Purpose: Select into a set, all identifiers matching the key

Return TypeFunction nameArguments
hzEcodehdbIndexEnum::Select(hzIntset&,hzAtom&,)

Declared in file: hzDatabase.h
Defined in file : hdbIndex.cpp

Function Logic:

0:START 1:items val 2:unknown 3:Return E_RANGE 4:pS 5:unknown 6:Return hzerr(E_CORRUPT,Bitmap stated as existing could not be retrieved from the map) 7:Result 8:unknown 9:Return hzerr(E_CORRUPT,Index bound bitmap has %d records, copy has %d records,pS->Count(),Result.Count()) 10:Return rc

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 ;
}