EbIndexDef

EbIndexDef allows applications to construct or query about an index definition in Ebase. In ebase, an index can be defined based on multiple fields. Applications cannot modify the index definition if the definition already exists in ebase.

[ ebase_lib | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index


Class Summary

class EbIndexDef
{
public:
void AddField(const char * fieldName);
void SetIndexFlag(EbUint32 flag) ;
EbUint32 NumberOfFields() ;
const char * GetFieldName(EbUint32 fieldIndex);
EbUint32 GetFieldId(EbUint32 fieldIndex);
EbUint32 GetIndexFlag() ;
EbBoolean Equal(EbIndexDef *def);
protected:
}; // EbIndexDef

Back to the top of EbIndexDef


void AddField(const char * fieldName);

Add one field. This function will NOT take over the field name.

It is an error to add a field which already exists in the def.

Parameters :

in fieldName
The new field name.

Exceptions :
EBE_INVALID_INDEX
Too many fields; Or field does not exist.
EBE_ACCESS_VIOLATION

    void AddField(const char * fieldName);

Back to the top of EbIndexDef


void SetIndexFlag(EbUint32 flag) ;

Set the index flag. A different index flag imply different sorting method. By default, the flag is 0.

Parameters :

in flag

    void SetIndexFlag(EbUint32 flag)                      
;

Function is currently defined inline.


Back to the top of EbIndexDef


EbUint32 NumberOfFields() ;

Number of fields included in the def.

Return value : Number of fields.

    EbUint32 NumberOfFields()                           
;

Function is currently defined inline.


Back to the top of EbIndexDef


const char * GetFieldName(EbUint32 fieldIndex);

Get field name. The caller needs to copy the return string to make a separate copy. Parameters :
in fieldId
Must be in the range [0, numFields-1].

Exceptions :
EBE_INVALID_FIELD
Field index is out of range

    const char * GetFieldName(EbUint32 fieldIndex); 

Back to the top of EbIndexDef


EbUint32 GetFieldId(EbUint32 fieldIndex);

Get the field id in the ebase def.

Exceptions : EBE_INVALID_FIELD

    EbUint32 GetFieldId(EbUint32 fieldIndex);

Back to the top of EbIndexDef


EbUint32 GetIndexFlag() ;

Get index flag.

    EbUint32 GetIndexFlag()                      
;

Function is currently defined inline.


Back to the top of EbIndexDef


EbBoolean Equal(EbIndexDef *def);

Check if two index def are equivalent. Two index definitions are equivalent if they belong to the same database, have the same flag, have the same number of fields and the same fields in exactly the same order.

    EbBoolean Equal(EbIndexDef *def);

Back to the top of EbIndexDef


All Members

public:
void AddField(const char * fieldName);
void SetIndexFlag(EbUint32 flag) ;
EbUint32 NumberOfFields() ;
const char * GetFieldName(EbUint32 fieldIndex);
EbUint32 GetFieldId(EbUint32 fieldIndex);
EbUint32 GetIndexFlag() ;
EbBoolean Equal(EbIndexDef *def);
protected:

Back to the top of EbIndexDef


Ancestors

Class does not inherit from any other class.

Back to the top of EbIndexDef


Descendants

Class is not inherited by any others.

Back to the top of EbIndexDef


Generated from source by the Cocoon utilities on Tue Aug 14 12:00:07 2001 .

Report problems to jkotula@vitalimages.com