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