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

pqxx::internal::tuple Class Reference

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

#include <result.hxx>

Inheritance diagram for pqxx::internal::tuple:

pqxx::internal::const_tupleiterator List of all members.

Public Types

typedef unsigned int size_type
typedef signed int difference_type
typedef const_fielditerator const_iterator
typedef field const_reference

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 ()
const_reference front () const throw ()
const_reference back () const throw ()
field operator[] (size_type) const throw ()
field operator[] (int i) const throw ()
field operator[] (const char[]) const
field operator[] (const PGSTD::string &s) const
field at (size_type) const throw (PGSTD::out_of_range)
field at (int i) const throw (PGSTD::out_of_range)
field at (const char[]) const
field at (const PGSTD::string &s) const
size_type size () const throw ()
void swap (tuple &rhs) 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, if your compiler supports them, const_reverse_iterator.


Member Typedef Documentation

typedef const_fielditerator pqxx::internal::tuple::const_iterator
 

typedef field pqxx::internal::tuple::const_reference
 

Reimplemented in pqxx::internal::const_tupleiterator.

typedef signed int pqxx::internal::tuple::difference_type
 

Reimplemented in pqxx::internal::const_tupleiterator.

typedef unsigned int pqxx::internal::tuple::size_type
 

Reimplemented in pqxx::internal::const_tupleiterator.


Constructor & Destructor Documentation

pqxx::internal::tuple::tuple const result r,
result_size_type  i
throw ()
 

pqxx::internal::tuple::~tuple  )  throw ()
 

pqxx::internal::tuple::tuple  )  [protected]
 


Member Function Documentation

field pqxx::internal::tuple::at const PGSTD::string &  s  )  const
 

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

field pqxx::internal::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)
 

field pqxx::internal::tuple::back  )  const throw ()
 

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

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

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

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

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

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

Type of given column.

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

Type of given column.

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

Type of given column.

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

Type of given column.

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

field pqxx::internal::tuple::front  )  const throw ()
 

result_size_type pqxx::internal::tuple::num  )  const
 

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

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

field pqxx::internal::tuple::operator[] const PGSTD::string &  s  )  const
 

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

field pqxx::internal::tuple::operator[] int  i  )  const throw ()
 

field pqxx::internal::tuple::operator[] size_type   )  const throw ()
 

result_size_type pqxx::internal::tuple::rownumber  )  const throw ()
 

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

void pqxx::internal::tuple::swap tuple rhs  )  throw ()
 


Friends And Related Function Documentation

friend class field [friend]
 


Member Data Documentation

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

result_size_type pqxx::internal::tuple::m_Index [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Oct 21 19:04:23 2004 for libpqxx by  doxygen 1.3.9.1