TDbCol Class Reference

#include <d32dbms.h>

Link against: edbms.lib

class TDbCol
Public Attributes
TUint iAttributes
TInt iMaxLength
TDbColNameC iName
TDbColType iType
Public Member Enumerations
enumanonymous { ENotNull, EAutoIncrement }
Public Member Functions
TDbCol()
TDbCol(const TDbCol &)
TDbCol(const TDesC &, TDbColType)
TDbCol(const TDesC &, TDbColType, TInt)
TBool IsLong(TDbColType)
TDbCol &operator=(const TDbCol &)

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

Member Attribute Documentation

iAttributes

TUint iAttributes

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

iMaxLength

TInt iMaxLength

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

iName

The column name.

iType

TDbColType iType

The column type.

Member Enumeration Documentation

Enum anonymous

EnumeratorValueDescription
ENotNull0x01
EAutoIncrement0x02

Constructor & Destructor Documentation

TDbCol ( )

TDbCol()[inline]

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

TDbCol ( const TDbCol & )

TDbCol(const TDbCol &)[inline]

TDbCol copy constructor.

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

TDbCol ( const TDesC &, TDbColType )

IMPORT_CTDbCol(const TDesC &aName,
TDbColTypeaType
)

TDbCol ( const TDesC &, TDbColType, TInt )

IMPORT_CTDbCol(const TDesC &aName,
TDbColTypeaType,
TIntaMaxLength
)

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

Note: The iAttributes member is initialised to 0.

ParameterDescription
aNameThe column name.
aTypeThe column type.
aMaxLengthIf 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.

Member Function Documentation

IsLong ( TDbColType )

TBool IsLong(TDbColTypeaType)[static, inline]

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

ParameterDescription
aTypeThe column type to test.

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

operator= ( const TDbCol & )

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

TDbCol "=" operator.

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