Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:


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(const TDbKeyCol &)

inline TDbKeyCol(const TDbKeyCol &);

Description

TDbKeyCol copy constructor.

Parameters

const TDbKeyCol &

This TDbKeyCol object will be constructed as an exact copy of aSrcKeyCol object.


TDbKeyCol(const TDesC &,TOrder)

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

Description

Parameters

const TDesC16 &aName

TDbKeyCol::TOrder anOrder


TDbKeyCol(const TDesC &,TInt,TOrder)

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 TDesC16 &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.

TDbKeyCol::TOrder anOrder

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

[Top]


Member functions


operator=(const TDbKeyCol &)

inline TDbKeyCol& operator=(const TDbKeyCol &);

Description

TDbKeyCol "=" operator.

Parameters

const TDbKeyCol &

This TDbKeyCol object will be made to be an exact copy of aSrcKeyCol object.

Return value

TDbKeyCol &

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


iLength

TInt iLength;

Description

The ordering of the key.


iName

TDbColNameC iName;

Description

The column name for the key.