Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <D32DBMS.H>
Link against: edbms.lib

Class TDbCol

class TDbCol;

Description

Defines a column in a table or rowset.

The data members are public because this is really a structure to group the attributes of the column together.

Three non-default constructors are provided for convenience.

Members

Defined in TDbCol:


Construction and destruction


TDbCol()

inline TDbCol();

Description

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


TDbCol(const TDbCol &)

inline TDbCol(const TDbCol &);

Description

TDbCol copy constructor.

Parameters

const TDbCol &

This TDbCol object will be constructed as an exact copy of aSrcCol object.


TDbCol(const TDesC &,TDbColType)

IMPORT_C TDbCol(const TDesC &aName, TDbColType aType);

Description

Parameters

const TDesC16 &aName

TDbColType aType


TDbCol(const TDesC &,TDbColType,TInt)

IMPORT_C TDbCol(const TDesC &aName, TDbColType aType, TInt aMaxLength);

Description

Constructs a TDbCol with the given name, optional type and optional maximum length.

Note: The iAttributes member is initialised to 0.

Parameters

const TDesC16 &aName

The column name.

TDbColType aType

The column type.

TInt aMaxLength

If present, this specifies a limit on how many characters may be stored in a Text column, or how many bytes can be stored in a Binary column. By default this is set to KDbDefaultTextColLength for Text (but not LongText) columns and KDbUndefinedLength for other columns.

[Top]


Member functions


operator=(const TDbCol &)

inline TDbCol& operator=(const TDbCol &);

Description

TDbCol "=" operator.

Parameters

const TDbCol &

This TDbCol object will be made to be an exact copy of aSrcCol object.

Return value

TDbCol &


IsLong(TDbColType)

static inline TBool IsLong(TDbColType aType);

Description

Tests if a column is of the Long column type, i.e. one of the EDbColLongXxxx types.

Parameters

TDbColType aType

The column type to test.

Return value

TBool

ETrue if the aType is a Long column type, EFalse otherwise.

[Top]


Member enumerations


Enum anonymous

n/a

Description

ENotNull

EAutoIncrement

[Top]


Member data


iType

TDbColType iType;

Description

The column type.


iMaxLength

TInt iMaxLength;

Description

The maximum length of data that can be stored in a Text or Binary column.


iAttributes

TUint iAttributes;

Description

A set of flags describing other column attributes. This must be one of the anonymous enum values ENotNull or EAutoIncrement.


iName

TDbColNameC iName;

Description

The column name.