pqxx::basic_fieldstream< CHAR, TRAITS > Class Template Reference
Input stream that gets its data from a result field.
More...
#include <result.hxx>
List of all members.
Detailed Description
template<typename CHAR = char, typename TRAITS = PGSTD::char_traits<CHAR>>
class pqxx::basic_fieldstream< CHAR, TRAITS >
Input stream that gets its data from a result field.
Use this class exactly as you would any other istream to read data from a field. All formatting and streaming operations of std::istream are supported. What you'll typically want to use, however, is the fieldstream typedef (which defines a basic_fieldstream for char). This is similar to how e.g. std::ifstream relates to std::basic_ifstream.
When reading bools, ints, floats etc. from a field, bear in mind that bools are represented as 'f' or 't' (for false or true, respectively), and that all other non-string types are rendered in the default C locale. If there is any chance of your program running in a different locale, you'll need to set the locale to "C" explicitly while parsing fields.
This class has only been tested for the char type (and its default traits).
Member Typedef Documentation
Constructor & Destructor Documentation
The documentation for this class was generated from the following file:
Generated on Mon May 10 13:19:11 2004 for libpqxx by
1.3.6-20040222