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

tablestream.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/tablestream.h
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::TableStream class.
00008  *   pqxx::TableStream provides optimized batch access to a database table
00009  *
00010  * Copyright (c) 2001-2003, Jeroen T. Vermeulen <jtv@xs4all.nl>
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef PQXX_TABLESTREAM_H
00015 #define PQXX_TABLESTREAM_H
00016 
00017 #include <string>
00018 
00019 #include "pqxx/compiler.h"
00020 
00021 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
00022  */
00023 
00024 
00025 namespace pqxx
00026 {
00027 
00028 // TODO: Async access to help hide network latencies
00029 // TODO: Binary COPY
00030 
00031 class TransactionItf;
00032 
00033 
00035 
00043 class PQXX_LIBEXPORT TableStream
00044 {
00045 public:
00046   TableStream(TransactionItf &Trans, 
00047               const PGSTD::string &Name, 
00048               const PGSTD::string &Null=PGSTD::string());                       //[t6]
00049   virtual ~TableStream() =0;                                            //[t6]
00050 
00051   PGSTD::string Name() const { return m_Name; }                         //[t10]
00052 
00053 protected:
00054   TransactionItf &Trans() const throw () { return m_Trans; }
00055   PGSTD::string NullStr() const { return m_Null; }
00056 
00057 private:
00058   TransactionItf &m_Trans;
00059   PGSTD::string m_Name;
00060   PGSTD::string m_Null;
00061 
00062   // Not allowed:
00063   TableStream();
00064   TableStream(const TableStream &);
00065   TableStream &operator=(const TableStream &);
00066 };
00067 
00068 
00069 }
00070 
00071 #endif
00072 

Generated on Fri Feb 28 19:23:32 2003 for libpqxx by doxygen1.3-rc3