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

pqxx::result::tuple Class Reference

Reference to one row in a result. More...

#include <result.hxx>

Inheritance diagram for pqxx::result::tuple:

pqxx::result::const_iterator pqxx::result::const_reverse_iterator List of all members.

Public Types

typedef unsigned int size_type
typedef signed int difference_type
typedef const_fielditerator const_iterator
typedef field reference
typedef const_fielditerator pointer
typedef const_reverse_fielditerator const_reverse_iterator

Public Member Functions

 tuple (const result *r, result::size_type i) throw ()
 ~tuple () throw ()
bool operator== (const tuple &) const throw ()
bool operator!= (const tuple &rhs) const throw ()
const_iterator begin () const throw ()
const_iterator end () const throw ()
reference front () const throw ()
reference back () const throw ()
const_reverse_fielditerator rbegin () const
const_reverse_fielditerator rend () const
reference operator[] (size_type i) const throw ()
reference operator[] (int i) const throw ()
reference operator[] (const char[]) const
reference operator[] (const PGSTD::string &s) const
reference at (size_type) const throw (PGSTD::out_of_range)
reference at (int i) const throw (PGSTD::out_of_range)
reference at (const char[]) const
reference at (const PGSTD::string &s) const
size_type size () const throw ()
void swap (tuple &) throw ()
result::size_type rownumber () const throw ()
size_type column_number (const PGSTD::string &ColName) const
 Number of given column (throws exception if it doesn't exist).
size_type column_number (const char ColName[]) const
 Number of given column (throws exception if it doesn't exist).
oid column_type (size_type ColNum) const
 Type of given column.
oid column_type (int ColNum) const
 Type of given column.
oid column_type (const PGSTD::string &ColName) const
 Type of given column.
oid column_type (const char ColName[]) const
 Type of given column.
result::size_type num () const

Protected Member Functions

 tuple ()

Protected Attributes

const resultm_Home
result::size_type m_Index

Friends

class field

Detailed Description

Reference to one row in a result.

A tuple represents one row (also called a tuple) in a query result set. It also acts as a container mapping column numbers or names to field values (see below):

        cout << tuple["date"].c_str() << ": " << tuple["name"].c_str() << endl;

The tuple itself acts like a (non-modifyable) container, complete with its own const_iterator and const_reverse_iterator.


Member Typedef Documentation

typedef const_fielditerator pqxx::result::tuple::const_iterator
 

typedef const_reverse_fielditerator pqxx::result::tuple::const_reverse_iterator
 

typedef signed int pqxx::result::tuple::difference_type
 

Reimplemented in pqxx::result::const_iterator.

typedef const_fielditerator pqxx::result::tuple::pointer
 

Reimplemented in pqxx::result::const_iterator.

typedef field pqxx::result::tuple::reference
 

Reimplemented in pqxx::result::const_iterator.

typedef unsigned int pqxx::result::tuple::size_type
 

Reimplemented in pqxx::result::const_iterator.


Constructor & Destructor Documentation

pqxx::result::tuple::tuple const result r,
result::size_type  i
throw ()
 

pqxx::result::tuple::~tuple  )  throw ()
 

pqxx::result::tuple::tuple  )  [protected]
 


Member Function Documentation

reference pqxx::result::tuple::at const PGSTD::string &  s  )  const
 

pqxx::result::field pqxx::result::tuple::at const   char[]  )  const
 

reference pqxx::result::tuple::at int  i  )  const throw (PGSTD::out_of_range)
 

pqxx::result::field pqxx::result::tuple::at size_type   )  const throw (PGSTD::out_of_range)
 

reference pqxx::result::tuple::back  )  const throw ()
 

const_iterator pqxx::result::tuple::begin  )  const throw ()
 

size_type pqxx::result::tuple::column_number const char  ColName[]  )  const
 

Number of given column (throws exception if it doesn't exist).

size_type pqxx::result::tuple::column_number const PGSTD::string &  ColName  )  const
 

Number of given column (throws exception if it doesn't exist).

oid pqxx::result::tuple::column_type const char  ColName[]  )  const
 

Type of given column.

oid pqxx::result::tuple::column_type const PGSTD::string &  ColName  )  const
 

Type of given column.

oid pqxx::result::tuple::column_type int  ColNum  )  const
 

Type of given column.

oid pqxx::result::tuple::column_type size_type  ColNum  )  const
 

Type of given column.

const_iterator pqxx::result::tuple::end  )  const throw ()
 

reference pqxx::result::tuple::front  )  const throw ()
 

result::size_type pqxx::result::tuple::num  )  const
 

bool pqxx::result::tuple::operator!= const tuple rhs  )  const throw ()
 

bool pqxx::result::tuple::operator== const tuple  )  const throw ()
 

reference pqxx::result::tuple::operator[] const PGSTD::string &  s  )  const
 

pqxx::result::field pqxx::result::tuple::operator[] const   char[]  )  const
 

reference pqxx::result::tuple::operator[] int  i  )  const throw ()
 

reference pqxx::result::tuple::operator[] size_type  i  )  const throw ()
 

result::tuple::const_reverse_iterator pqxx::result::tuple::rbegin  )  const
 

result::tuple::const_reverse_iterator pqxx::result::tuple::rend  )  const
 

result::size_type pqxx::result::tuple::rownumber  )  const throw ()
 

size_type pqxx::result::tuple::size  )  const throw ()
 

void pqxx::result::tuple::swap tuple  )  throw ()
 


Friends And Related Function Documentation

friend class field [friend]
 


Member Data Documentation

const result* pqxx::result::tuple::m_Home [protected]
 

result::size_type pqxx::result::tuple::m_Index [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Nov 15 11:28:04 2004 for libpqxx by  doxygen 1.3.9.1