libpqxx
pqxx::tablewriter Class Reference

#include <tablewriter.hxx>

Inheritance diagram for pqxx::tablewriter:

Public Member Functions

 tablewriter (transaction_base &, const std::string &WName, const std::string &Null=std::string())
 
template<typename ITER >
 tablewriter (transaction_base &, const std::string &WName, ITER begincolumns, ITER endcolumns)
 
template<typename ITER >
 tablewriter (transaction_base &T, const std::string &WName, ITER begincolumns, ITER endcolumns, const std::string &Null)
 
 ~tablewriter () noexcept
 
template<typename IT >
void insert (IT Begin, IT End)
 
template<typename TUPLE >
void insert (const TUPLE &)
 
template<typename IT >
void push_back (IT Begin, IT End)
 
template<typename TUPLE >
void push_back (const TUPLE &)
 
template<typename SIZE >
void reserve (SIZE)
 
template<typename TUPLE >
tablewriteroperator<< (const TUPLE &)
 
tablewriteroperator<< (tablereader &)
 
template<typename IT >
std::string generate (IT Begin, IT End) const
 
template<typename TUPLE >
std::string generate (const TUPLE &) const
 
virtual void complete () override
 
void write_raw_line (const std::string &)
 
- Public Member Functions inherited from pqxx::tablestream
 tablestream (transaction_base &Trans, const std::string &Null=std::string())
 
virtual ~tablestream () noexcept=0
 
- Public Member Functions inherited from pqxx::internal::transactionfocus
 transactionfocus (transaction_base &t)
 
 transactionfocus ()=delete
 
 transactionfocus (const transactionfocus &)=delete
 
transactionfocusoperator= (const transactionfocus &)=delete
 
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname)
 
 namedclass (const std::string &Classname, const std::string &Name)
 
const std::string & name () const noexcept
 Object name, or the empty string if no name was given. More...
 
const std::string & classname () const noexcept
 Class name. More...
 
std::string description () const
 Combination of class name and object name; or just class name. More...
 

Additional Inherited Members

- Protected Member Functions inherited from pqxx::tablestream
const std::string & NullStr () const
 
bool is_finished () const noexcept
 
void base_close ()
 
- Protected Member Functions inherited from pqxx::internal::transactionfocus
void register_me ()
 
void unregister_me () noexcept
 
void reg_pending_error (const std::string &) noexcept
 
bool registered () const noexcept
 
- Static Protected Member Functions inherited from pqxx::tablestream
template<typename ITER >
static std::string columnlist (ITER colbegin, ITER colend)
 
- Protected Attributes inherited from pqxx::internal::transactionfocus
transaction_basem_trans
 

Detailed Description

Deprecated:
Efficiently write data directly to a database table.
Warning
This class does not work reliably with multibyte encodings. Using it with some multi-byte encodings may pose a security risk.

Constructor & Destructor Documentation

◆ tablewriter() [1/3]

pqxx::tablewriter::tablewriter ( transaction_base T,
const std::string &  WName,
const std::string &  Null = std::string() 
)

◆ tablewriter() [2/3]

template<typename ITER >
pqxx::tablewriter::tablewriter ( transaction_base T,
const std::string &  WName,
ITER  begincolumns,
ITER  endcolumns 
)

◆ tablewriter() [3/3]

template<typename ITER >
pqxx::tablewriter::tablewriter ( transaction_base T,
const std::string &  WName,
ITER  begincolumns,
ITER  endcolumns,
const std::string &  Null 
)

◆ ~tablewriter()

Member Function Documentation

◆ complete()

◆ generate() [1/2]

template<typename IT >
std::string pqxx::tablewriter::generate ( IT  Begin,
IT  End 
) const

◆ generate() [2/2]

template<typename TUPLE >
std::string pqxx::tablewriter::generate ( const TUPLE &  T) const

References generate().

◆ insert() [1/2]

template<typename IT >
void pqxx::tablewriter::insert ( IT  Begin,
IT  End 
)

References generate(), and write_raw_line().

Referenced by insert(), operator<<(), and push_back().

◆ insert() [2/2]

template<typename TUPLE >
void pqxx::tablewriter::insert ( const TUPLE &  T)

References insert().

◆ operator<<() [1/2]

template<typename TUPLE >
tablewriter & pqxx::tablewriter::operator<< ( const TUPLE &  T)

References insert().

◆ operator<<() [2/2]

pqxx::tablewriter & pqxx::tablewriter::operator<< ( pqxx::tablereader R)

◆ push_back() [1/2]

template<typename IT >
void pqxx::tablewriter::push_back ( IT  Begin,
IT  End 
)

References insert().

◆ push_back() [2/2]

template<typename TUPLE >
void pqxx::tablewriter::push_back ( const TUPLE &  T)

References insert().

◆ reserve()

template<typename SIZE >
void pqxx::tablewriter::reserve ( SIZE  )

References pqxx::operator<<().

◆ write_raw_line()

void pqxx::tablewriter::write_raw_line ( const std::string &  Line)

The documentation for this class was generated from the following files: