TDbKeyCol Class Reference

#include <d32dbms.h>

Link against: edbms.lib

class TDbKeyCol
Public Attributes
TInt iLength
TDbColNameC iName
TOrder iOrder
Public Member Enumerations
enumTOrder { EAsc, EDesc }
Public Member Functions
TDbKeyCol()
TDbKeyCol(const TDbKeyCol &)
TDbKeyCol(const TDesC &, TOrder)
TDbKeyCol(const TDesC &, TInt, TOrder)
TDbKeyCol &operator=(const TDbKeyCol &)

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

Member Attribute Documentation

iLength

TInt iLength

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

The column name for the key.

iOrder

TOrder iOrder

The ordering of the key.

Member Enumeration Documentation

Enum TOrder

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

EnumeratorValueDescription
EAsc

Use ascending order.

EDesc

Use descending order.

Constructor & Destructor Documentation

TDbKeyCol ( )

TDbKeyCol()[inline]

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

TDbKeyCol ( const TDbKeyCol & )

TDbKeyCol(const TDbKeyCol &)[inline]

TDbKeyCol copy constructor.

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

TDbKeyCol ( const TDesC &, TOrder )

IMPORT_CTDbKeyCol(const TDesC &aName,
TOrderanOrder = EAsc
)

TDbKeyCol ( const TDesC &, TInt, TOrder )

IMPORT_CTDbKeyCol(const TDesC &aName,
TIntaLength,
TOrderanOrder = EAsc
)

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

ParameterDescription
aNameThe column name.
aLengthIf 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.
anOrderThe ordering for the key column. By default this is ascending order.

Member Function Documentation

operator= ( const TDbKeyCol & )

TDbKeyCol &operator=(const TDbKeyCol &)[inline]

TDbKeyCol "=" operator.

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