Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: d32dbms.h
Link against: edbms.lib

Class TDbKeyCol

TDbKeyCol

Support

Supported from 5.0

Description

Defines a key column in an index.

The data members are public as this is really a structure to group the attributes of the key column together. Two non-default constructors are provided for convenience.

Defined in TDbKeyCol:
EAsc, EDesc, TDbKeyCol(), TOrder, iLength, iName, iOrder


Construction


TDbKeyCol()

TDbKeyCol();

Description

Constructs an uninitialised object — default constructor. It is necessary because there are also non-default constructors in this class.


TDbKeyCol()

TDbKeyCol(const TDesC& aName,TInt aLength,TOrder anOrder=EAsc);
TDbKeyCol(const TDesC& aName,TOrder anOrder=EAsc);

Description

Constructs an object with the given name, ordering and optional truncation length.

Parameters

const TDesC& aName

The column name.

TInt aLength

If present, this specifies a limit on how many characters of a Text or LongText column are used for the key. This should only be used for the last key column in an index. It is required for keys on LongText columns.

TOrder anOrder

The ordering for the key column. By default this is ascending order.

[Top]


Data members

Description

All the data members are public:


iLength

TInt iLength

Description

The ordering of the key.


iName

TDbColNameC iName

Description

The column name for the key.


iOrder

TOrder iOrder

Description

The maximum number of characters used to index Text or LongText columns. If equal to KDbUndefinedLength (the default), all the characters in the defined column will be used.

[Top]


Enumerations


Enum TOrder

TOrder

Description

Specifies whether a key column in an index should be sorted in ascending or descending order.

EAsc

Use ascending order.

EDesc

Use descending order.