|
||
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. The key may be unique or primary, it can ...
Defined in CDbKey
:
AddL(const TDbKeyCol &)
Adds a key column to the end of the key.CDbKey()
Constructs an empty key. It is initialised to non-unique, non-primary and normal...Clear()
Resets the key to its initial empty state. Comparison()const
Returns the method used to compare Text columns in this key.Count()const
EPrimary
EUnique
IsPrimary()const
Tests whether the key is the primary key.IsUnique()const
Tests whether the key is unique.MakePrimary()
MakeUnique()
Makes the key unique. This ensures that every key value in the index is distinct...NewL()
Constructs and returns a pointer to a new empty key.NewLC()
Constructs and returns a new empty key and return a pointer to it, leaving a poi...Remove(const TDesC &)
Removes the named column from the key.SetComparison(TDbTextComparison)
Sets the way in which Text columns are compared for the key. All Text columns in...anonymous
operator[](TInt)const
Returns a key column by its position in the key.~CDbKey()
Frees resources owned by the object. Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C CDbKey();
Constructs an empty key. It is initialised to non-unique, non-primary and normal text comparison.
IMPORT_C static CDbKey* NewL();
Constructs and returns a pointer to a new empty key.
|
IMPORT_C static 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.
|