Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

pqxxobject::rowconvert Class Reference

Database row conversion. More...

#include <rowconvert.h>

Inheritance diagram for pqxxobject::rowconvert:

pqxxobject::row< Row > List of all members.

Public Types

enum  operation_type { OPERATION_INSERT, OPERATION_UPDATE, OPERATION_DELETE }
 Operation to perform on the database. More...


Public Member Functions

 rowconvert ()
 The constructor.

virtual ~rowconvert ()
 The destructor.

virtual void initialise (pqxx::result::const_iterator row, transaction &tran)=0
 Create a "row object" from a row of a result set.

virtual void insert (transaction &tran)=0
 Insert a row into a table.

virtual void update (transaction &tran)=0
 Update a row from a table.

virtual void erase (transaction &tran)=0
 Remove a row from a table.

virtual void refresh (transaction &tran)=0
 Refresh a row from a table.


Detailed Description

Database row conversion.

This class (function object) represents the operations that may be performed by a single row in a database table. This means all conversions between a "row object" class and a row in a database table (or result set) such as selection, insertion, update and deletion.

This class should be inherited by all row classes.

Definition at line 40 of file rowconvert.h.


Member Enumeration Documentation

enum pqxxobject::rowconvert::operation_type
 

Operation to perform on the database.

Enumeration values:
OPERATION_INSERT  Insert a row into the database table.
OPERATION_UPDATE  Update a row in the database table.
OPERATION_DELETE  Delete a row from the database table.

Definition at line 52 of file rowconvert.h.


Constructor & Destructor Documentation

pqxxobject::rowconvert::rowconvert  )  [inline]
 

The constructor.

Definition at line 44 of file rowconvert.h.

virtual pqxxobject::rowconvert::~rowconvert  )  [inline, virtual]
 

The destructor.

Definition at line 48 of file rowconvert.h.


Member Function Documentation

virtual void pqxxobject::rowconvert::erase transaction tran  )  [pure virtual]
 

Remove a row from a table.

Parameters:
tran the transaction which will be used to execute queries.

virtual void pqxxobject::rowconvert::initialise pqxx::result::const_iterator  row,
transaction tran
[pure virtual]
 

Create a "row object" from a row of a result set.

This method converts a row of a result set into an object.

Parameters:
row an iterator pointing to a row of a result set.
tran the transaction which was used to return row. This is used for recursive initialisation of objects e.g. when contained or derived-from objects must also be initialised.
Returns:
a pointer to a row object, or NULL if the conversion failed.

virtual void pqxxobject::rowconvert::insert transaction tran  )  [pure virtual]
 

Insert a row into a table.

Parameters:
tran the transaction which will be used to execute queries.

virtual void pqxxobject::rowconvert::refresh transaction tran  )  [pure virtual]
 

Refresh a row from a table.

Parameters:
tran the transaction which will be used to execute queries.

virtual void pqxxobject::rowconvert::update transaction tran  )  [pure virtual]
 

Update a row from a table.

Parameters:
tran the transaction which will be used to execute queries.


The documentation for this class was generated from the following file:
Generated on Sat Jan 17 20:58:42 2004 for pqxx-object API Reference by doxygen 1.3.4