Location:
D32DBMS.H
Link against: edbms.lib
class CDbKey : public CBase;
Represents the definition of an index. The key may be unique or primary, it can specify the sort of comparison which is made for Text columns, and it has a list of columns which make up the key. The class is used to construct and interrogate index keys.
This class is not intended for user derivation.
CBase
- Base class for all classes to be instantiated on the heap
CDbKey
- Represents the definition of an index
Defined in CDbKey
:
AddL()
, CDbKey()
, Clear()
, Comparison()
, Count()
, EPrimary
, EUnique
, IsPrimary()
, IsUnique()
, MakePrimary()
, MakeUnique()
, NewL()
, NewLC()
, Remove()
, SetComparison()
, anonymous
, operator[]()
, ~CDbKey()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
IMPORT_C CDbKey();
Constructs an empty key. It is initialised to non-unique, non-primary and normal text comparison.
static IMPORT_C CDbKey *NewL();
Constructs and returns a pointer to a new empty key.
|
static IMPORT_C CDbKey *NewLC();
Constructs and returns a new empty key and return a pointer to it, leaving a pointer to the key object on the cleanup stack. This allows the key object and allocated resources to be cleaned up if a subsequent leave occurs.
|
IMPORT_C CDbKey &AddL(const TDbKeyCol &aKeyCol);
Adds a key column to the end of the key.
|
|
IMPORT_C void Remove(const TDesC &aColName);
Removes the named column from the key.
|
inline const TDbKeyCol &operator[](TInt aCol) const;
Returns a key column by its position in the key.
|
|
inline void MakeUnique();
Makes the key unique. This ensures that every key value in the index is distinct from every other.
inline TBool IsUnique() const;
Tests whether the key is unique.
|
inline void SetComparison(TDbTextComparison aComparison);
Sets the way in which Text columns are compared for the key. All Text columns in the key are compared in the same way.
|
inline TDbTextComparison Comparison() const;
Returns the method used to compare Text columns in this key.
|
inline TBool IsPrimary() const;
Tests whether the key is the primary key.
|