00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
#include <string>
00020 
00021 
#include "pqxx/libcompiler.h"
00022 
00023 
#include "pqxx/transaction_base"
00024 
00025 
00026 
00027 
00028 
00029 
namespace pqxx
00030 {
00031 
class transaction_base;
00032 
00033 
00035 
00043 class PQXX_LIBEXPORT tablestream : 
public internal::transactionfocus
00044 {
00045 
public:
00046   tablestream(
transaction_base &Trans, 
00047               
const PGSTD::string &Name, 
00048               
const PGSTD::string &Null=PGSTD::string(),
00049               
const char Classname[]=
"tablestream");                    
00050 
00051   
virtual ~tablestream() 
throw () =0;                                   
00052 
00054 
00061   
virtual void complete() =0;
00062 
00063 
#ifdef PQXX_DEPRECATED_HEADERS
00064 
00065   PGSTD::string Name()
 const { 
return name(); }
00066 
#endif
00067 
00068 
protected:
00069   const PGSTD::string &NullStr()
 const { 
return m_Null; }
00070   bool is_finished() const throw () { 
return m_Finished; }
00071   
void base_close();
00072 
00074   
template<
typename ITER>
00075   
static PGSTD::string columnlist(ITER colbegin, ITER colend);
00076 
00077 
private:
00078   PGSTD::string m_Null;
00079   
bool m_Finished;
00080 
00081   
00082   tablestream();
00083   tablestream(
const tablestream &);
00084   tablestream &operator=(
const tablestream &);
00085 };
00086 
00087 
00088 
template<
typename ITER> 
inline
00089 PGSTD::string tablestream::columnlist(ITER colbegin, ITER colend)
00090 {
00091   
return separated_list(
",", colbegin, colend);
00092 }
00093 } 
00094