libpqxx
The C++ client library for PostgreSQL
|
Input stream that gets its data from a result field. More...
Public Types | |
using | char_type = CHAR |
using | traits_type = TRAITS |
using | int_type = typename traits_type::int_type |
using | pos_type = typename traits_type::pos_type |
using | off_type = typename traits_type::off_type |
Public Member Functions | |
basic_fieldstream (field const &f) | |
Input stream that gets its data from a result field.
int
, use the field's as<...>()
member function. To read a field efficiently just as a string, use its c_str()
or its as<std::string_vview>()
.Works like any other istream to read data from a field. It supports all formatting and streaming operations of std::istream
. For convenience there is a fieldstream alias, which defines a basic_fieldstream for char
. This is similar to how e.g. std::ifstream
relates to std::basic_ifstream
.
This class has only been tested for the char type (and its default traits).