Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

result.hxx File Reference

#include <stdexcept>
#include "pqxx/util"

Go to the source code of this file.

Namespaces

namespace  pqxx

Classes

class  pqxx::result
 Query or command result set. More...
class  pqxx::result::tuple
 Reference to one row in a result. More...
class  pqxx::result::field
 Reference to a field in a result set. More...
class  pqxx::result::const_iterator
 Iterator for rows (tuples) in a query result set. More...
class  pqxx::result::const_reverse_iterator
class  pqxx::result::const_fielditerator
class  pqxx::result::const_reverse_fielditerator
class  pqxx::field_streambuf< CHAR, TRAITS >
class  pqxx::basic_fieldstream< CHAR, TRAITS >
 Input stream that gets its data from a result field. More...

Typedefs

typedef basic_fieldstream<
char > 
fieldstream

Functions

template<typename STREAM>
STREAM & operator<< (STREAM &S, const pqxx::result::field &F)
 Write a result field to any type of stream.
template<typename T>
void from_string (const result::field &F, T &Obj)
 Convert a field's string contents to another type.
template<>
PGSTD::string to_string (const result::field &Obj)
 Convert a field to a string.
result::const_iterator operator+ (result::const_iterator::difference_type o, result::const_iterator i)
result::const_reverse_iterator operator+ (result::const_reverse_iterator::difference_type n, const result::const_reverse_iterator &i)
result::const_fielditerator operator+ (result::const_fielditerator::difference_type o, result::const_fielditerator i)


Typedef Documentation

typedef basic_fieldstream<char> pqxx::fieldstream
 


Function Documentation

template<typename T>
void from_string const result::field &  F,
T &  Obj
 

Convert a field's string contents to another type.

result::const_fielditerator operator+ result::const_fielditerator::difference_type  o,
result::const_fielditerator  i
 

result::const_reverse_iterator operator+ result::const_reverse_iterator::difference_type  n,
const result::const_reverse_iterator &  i
 

result::const_iterator operator+ result::const_iterator::difference_type  o,
result::const_iterator  i
 

template<typename STREAM>
STREAM& operator<< STREAM &  S,
const pqxx::result::field F
 

Write a result field to any type of stream.

This can be convenient when writing a field to an output stream. More importantly, it lets you write a field to e.g. a stringstream which you can then use to read, format and convert the field in ways that to() does not support.

Example: parse a field into a variable of the nonstandard "long long" type.

 extern result R;
 long long L;
 stringstream S;

 // Write field's string into S
 S << R[0][0];

 // Parse contents of S into L
 S >> L;

template<>
PGSTD::string to_string const result::field &  Obj  ) 
 

Convert a field to a string.


Generated on Mon Nov 15 11:28:01 2004 for libpqxx by  doxygen 1.3.9.1