Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: D32DBMS.H
Link against: edbms.lib

Class TDbKeyCol

class TDbKeyCol;

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.

Members

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


Construction and destruction


TDbKeyCol()

inline TDbKeyCol();

Description

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


TDbKeyCol()

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

Description

Parameters

const TDesC &aName

TOrder anOrder


TDbKeyCol()

IMPORT_C TDbKeyCol(const TDesC &aName, TInt aLength, 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]


Member 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.

[Top]


Member data


iOrder

TOrder iOrder;

Description

The ordering of the key.


iLength

TInt iLength;

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.


iName

TDbColNameC iName;

Description

The column name for the key.