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

pqxx::tablestream Class Reference

Base class for streaming data to/from database tables. More...

#include <tablestream.hxx>

Inheritance diagram for pqxx::tablestream:

pqxx::tablereader pqxx::tablewriter List of all members.

Public Member Functions

 tablestream (transaction_base &Trans, const PGSTD::string &Name, const PGSTD::string &Null=PGSTD::string())
virtual ~tablestream ()=0
const PGSTD::string & name () const
virtual void complete ()=0
 Finish stream action, check for errors, and detach from transaction.


Protected Member Functions

void register_me ()
transaction_baseTrans () const throw ()
const PGSTD::string & NullStr () const
void RegisterPendingError (const PGSTD::string &) throw ()
bool is_finished () const throw ()
void base_close ()

Detailed Description

Base class for streaming data to/from database tables.

A Tablestream enables optimized batch read or write access to a database table using PostgreSQL's COPY TO STDOUT and COPY FROM STDIN commands, respectively. These capabilities are implemented by its subclasses tablereader and tablewriter. A Tablestream exists in the context of a transaction, and no other streams or queries may be applied to that transaction as long as the stream remains open.


Constructor & Destructor Documentation

pqxx::tablestream::tablestream transaction_base Trans,
const PGSTD::string &  Name,
const PGSTD::string &  Null = PGSTD::string()
 

pqxx::tablestream::~tablestream  )  [pure virtual]
 


Member Function Documentation

void pqxx::tablestream::base_close  )  [protected]
 

virtual void pqxx::tablestream::complete  )  [pure virtual]
 

Finish stream action, check for errors, and detach from transaction.

It is recommended that you call this function before the tablestream's destructor is run. This function will check any final errors which may not become apparent until the transaction is committed otherwise.

As an added benefit, this will free up the transaction while the tablestream object itself still exists.

Implemented in pqxx::tablereader, and pqxx::tablewriter.

bool pqxx::tablestream::is_finished  )  const throw () [protected]
 

const PGSTD::string& pqxx::tablestream::name  )  const
 

const PGSTD::string& pqxx::tablestream::NullStr  )  const [protected]
 

void pqxx::tablestream::register_me  )  [protected]
 

void pqxx::tablestream::RegisterPendingError const PGSTD::string &   )  throw () [protected]
 

transaction_base& pqxx::tablestream::Trans  )  const throw () [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 25 07:22:40 2003 for libpqxx by doxygen 1.3.4