Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | 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 <string> 00020 00021 #include "pqxx/libcompiler.h" 00022 00023 #include "pqxx/transaction_base" 00024 00025 /* Methods tested in eg. self-test program test001 are marked with "//[t1]" 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"); //[t6] 00050 00051 virtual ~tablestream() throw () =0; //[t6] 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 // Not allowed: 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 } // namespace pqxx 00094

Generated on Fri Jul 2 21:47:28 2004 for libpqxx by doxygen 1.3.7