Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: 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:
EAutoIncrement, ENotNull, IsLong(), TDbCol(), TDbCol(), TDbCol(), anonymous, iAttributes, iMaxLength, iName, iType


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()

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

Description

Parameters

const TDesC &aName

TDbColType aType


TDbCol()

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 TDesC &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


IsLong()

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.