Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

InsertUpdateTableInfo Struct Reference

Information about a table used when inserting / updating a row in(to) the table. More...

#include <iopcClassObjectImpl.h>

Collaboration diagram for InsertUpdateTableInfo:

Collaboration graph
[legend]
List of all members.

Public Attributes

TableInfotable
BitField attributesToSkip
BitField columnsToSkip

Detailed Description

Information about a table used when inserting / updating a row in(to) the table.

Structs of this type are contained in IopcClassObjectImpl-s (IopcClassObjectImpl::insertUpdateTableList). In one IopcClassObjectImpl there is one InsertUpdateTableInfo for each table into which some data from the represented class should be put.

Because not all the class attributes should be put into this table, there is first bitfield - attributesToSkip. Bits in the field correspond to individual attributes from AttrVector (lexicographic ordering). The attributes whose bit is 0 are skipped when inserting into this table.

Second bitfield, columnsToSkip, is used because the table usually contains greater number of columns than is the number of attributes to be inserted. This bitfield says which table columns should be skipped when inserting row for object of type represented by the IopcClassObjectImpl.

Second bitfield is used only when inserting objects - in advance prepared SQL statement is used (TableInfo::insertSqlStatement). If updating object, the SQL statement is generated dynamically so columnsToSkip are not needed.

Both bitfields are initialized in IopcClassObjectImpl::createInsertUpdateTableBitFields().


Member Data Documentation

TableInfo* InsertUpdateTableInfo::table
 

Information about the table.

BitField InsertUpdateTableInfo::attributesToSkip
 

Attributes to skip, see above.

BitField InsertUpdateTableInfo::columnsToSkip
 

Columns to skip, see above.


The documentation for this struct was generated from the following file:
Generated on Wed Aug 11 22:35:32 2004 for IOPC by Doxygen 1.3.6