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

tablestream.hxx

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/tablestream.hxx
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::tablestream class.
00008  *   pqxx::tablestream provides optimized batch access to a database table
00009  *   DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablestream instead.
00010  *
00011  * Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl>
00012  *
00013  * See COPYING for copyright license.  If you did not receive a file called
00014  * COPYING with this source code, please notify the distributor of this mistake,
00015  * or contact the author.
00016  *
00017  *-------------------------------------------------------------------------
00018  */
00019 #include "pqxx/libcompiler.h"
00020 
00021 #include "pqxx/transaction_base"
00022 
00023 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
00024  */
00025 
00026 
00027 namespace pqxx
00028 {
00029 class transaction_base;
00030 
00031 
00033 
00042 class PQXX_LIBEXPORT tablestream : public internal::transactionfocus
00043 {
00044 public:
00045   tablestream(transaction_base &Trans, 
00046               const PGSTD::string &Name, 
00047               const PGSTD::string &Null=PGSTD::string(),
00048               const char Classname[]="tablestream");                    //[t6]
00049 
00050   virtual ~tablestream() throw () =0;                                   //[t6]
00051 
00053 
00060   virtual void complete() =0;
00061 
00062 #ifdef PQXX_DEPRECATED_HEADERS
00063 
00064   PGSTD::string Name() const { return name(); }
00065 #endif
00066 
00067 protected:
00068   const PGSTD::string &NullStr() const { return m_Null; }
00069   bool is_finished() const throw () { return m_Finished; }
00070   void base_close();
00071 
00073   template<typename ITER>
00074   static PGSTD::string columnlist(ITER colbegin, ITER colend);
00075 
00076 private:
00077   PGSTD::string m_Null;
00078   bool m_Finished;
00079 
00080   // Not allowed:
00081   tablestream();
00082   tablestream(const tablestream &);
00083   tablestream &operator=(const tablestream &);
00084 };
00085 
00086 
00087 template<typename ITER> inline
00088 PGSTD::string tablestream::columnlist(ITER colbegin, ITER colend)
00089 {
00090   return separated_list(",", colbegin, colend);
00091 }
00092 } // namespace pqxx
00093 

Generated on Mon Nov 15 11:28:00 2004 for libpqxx by  doxygen 1.3.9.1