#include <d32dbms.h>
class CDbKey : public CBase |
Public Member Enumerations | |
---|---|
enum | anonymous { EUnique, EPrimary } |
Public Member Functions | |
---|---|
CDbKey() | |
~CDbKey() | |
IMPORT_C CDbKey & | AddL(const TDbKeyCol &) |
IMPORT_C void | Clear() |
TDbTextComparison | Comparison() |
TInt | Count() |
TBool | IsPrimary() |
TBool | IsUnique() |
void | MakePrimary() |
void | MakeUnique() |
IMPORT_C CDbKey * | NewL() |
IMPORT_C CDbKey * | NewLC() |
IMPORT_C void | Remove(const TDesC &) |
void | SetComparison(TDbTextComparison) |
const TDbKeyCol & | operator[](TInt) |
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.
IMPORT_C | CDbKey | ( | ) |
Constructs an empty key. It is initialised to non-unique, non-primary and normal text comparison.
TDbTextComparison | Comparison | ( | ) | const [inline] |
Returns the method used to compare Text columns in this key.
Returns: The comparison type used for the key.
TBool | IsPrimary | ( | ) | const [inline] |
Tests whether the key is the primary key.
Returns: ETrue, if the key is unique; EFalse, otherwise.
TBool | IsUnique | ( | ) | const [inline] |
Tests whether the key is unique.
Returns: ETrue, if the key is unique; EFalse, otherwise.
void | MakeUnique | ( | ) | [inline] |
Makes the key unique. This ensures that every key value in the index is distinct from every other.
IMPORT_C CDbKey * | NewL | ( | ) | [static] |
Constructs and returns a pointer to a new empty key.
Returns: A pointer to the key object.
IMPORT_C CDbKey * | NewLC | ( | ) | [static] |
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.
Returns: A pointer to the key object.
IMPORT_C void | Remove | ( | const TDesC & | aColName | ) |
Removes the named column from the key.
Parameter | Description |
---|---|
aColName | The name of the column to remove from the key. |
void | SetComparison | ( | TDbTextComparison | aComparison | ) | [inline] |
Sets the way in which Text columns are compared for the key. All Text columns in the key are compared in the same way.
Parameter | Description |
---|---|
aComparison | The comparison type to use. |