tablestream.hxx
/*-------------------------------------------------------------------------
*
* FILE
* pqxx/tablestream.hxx
*
* DESCRIPTION
* definition of the pqxx::tablestream class.
* pqxx::tablestream provides optimized batch access to a database table
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablestream instead.
*
* Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
*
* See COPYING for copyright license. If you did not receive a file called
* COPYING with this source code, please notify the distributor of this mistake,
* or contact the author.
*
*-------------------------------------------------------------------------
*/
#ifndef PQXX_H_TABLESTREAM
#define PQXX_H_TABLESTREAM
#include "pqxx/compiler-public.hxx"
#include "pqxx/compiler-internal-pre.hxx"
#include "pqxx/transaction_base"
namespace pqxx
{
class transaction_base;
class PQXX_LIBEXPORT PQXX_NOVTABLE tablestream :
public internal::transactionfocus
{
public:
explicit tablestream(transaction_base &Trans,
const PGSTD::string &Null=PGSTD::string());
virtual ~tablestream() throw () =0;
virtual void complete() =0;
protected:
const PGSTD::string &NullStr() const { return m_Null; }
bool is_finished() const throw () { return m_Finished; }
void base_close();
template<typename ITER>
static PGSTD::string columnlist(ITER colbegin, ITER colend);
private:
PGSTD::string m_Null;
bool m_Finished;
tablestream();
tablestream(const tablestream &);
tablestream &operator=(const tablestream &);
};
template<typename ITER> inline
PGSTD::string tablestream::columnlist(ITER colbegin, ITER colend)
{
return separated_list(",", colbegin, colend);
}
} // namespace pqxx
#include "pqxx/compiler-internal-post.hxx"
#endif
pqxx::tablestream::is_finished
bool is_finished() const
Definition: tablestream.hxx:38
pqxx::internal::transactionfocus
Definition: transaction_base.hxx:52
pqxx::tablestream::NullStr
const std::string & NullStr() const
Definition: tablestream.hxx:37
pqxx::separated_list
std::string separated_list(const std::string &sep, ITER begin, ITER end, ACCESS access)
Access iterators using ACCESS functor, returning separator-separated list.
Definition: util.hxx:417
pqxx::tablestream::columnlist
static std::string columnlist(ITER colbegin, ITER colend)
Definition: tablestream.hxx:50
pqxx::tablestream
Definition: tablestream.hxx:28
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition: basic_connection.hxx:35
pqxx::transaction_base
Definition: transaction_base.hxx:133