Location:
D32DBMS.H
Link against: edbms.lib
class CDbColSet : public CBase;
Manages a set of column definitions which describe a table or rowset structure. Column definitions can be added and removed. The set can be iterated over, and ordinals for a column can be looked up.
The class is not intended for user derivation.
CBase
- Base class for all classes to be instantiated on the heap
CDbColSet
- Manages a set of column definitions which describe a table or rowset structure
Defined in CDbColSet
:
AddL()
, CDbColSet()
, Clear()
, Col()
, ColNo()
, Count()
, NewL()
, NewLC()
, Remove()
, operator[]()
, ~CDbColSet()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
static IMPORT_C CDbColSet *NewL();
Constructs a new empty column set and returns a pointer to it.
|
static IMPORT_C CDbColSet *NewLC();
Constructs a new empty column set and returns a pointer to it — placing the pointer onto the cleanup stack. This allows the column set object and allocated resources to be cleaned up if a subsequent leave occurs.
|
inline const TDbCol &operator[](TDbColNo aCol) const;
Returns a column definition by its ordinal number in the set.
Note that using a TDbColSetIter
is another way to iterate through the contents of a CDbColSet.
|
|
IMPORT_C const TDbCol *Col(const TDesC &aColName) const;
Returns a named column definition in the set. If such a column does not exist in the set NULL is returned.
|
|
IMPORT_C TDbColNo ColNo(const TDesC &aColName) const;
Returns the ordinal for a particular column name in this column set. If such a column does not exist in the set the special ordinal KDbNullColNo is returned.
This function is particularly important when accessing data through a rowset. If the set of columns to be returned by a rowset
is not explicitly specified, no assumptions should be made about the ordering of the columns returned. In such a case, in
order to access the column data a column ordinal is required, and this can be obtained by using this function on the column
set returned by RDbRowSet::ColSetL()
.
|
|
inline TInt Count() const;
Returns the number of column definitions in the set.
Note that using a TDbColSetIter
is another way to iterate through the contents of a CDbColSet.
|
IMPORT_C CDbColSet &AddL(const TDbCol &aCol);
Adds a column to the column set.
|
|
IMPORT_C void Remove(const TDesC &aColName);
Removes the named column from the set.
|