Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | 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::field List of all members.

Public Types

typedef tuple_size_type size_type

Public Member Functions

 tuple (const result *r, result::size_type i) throw ()
 ~tuple () throw ()
field operator[] (size_type) 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 (const char[]) const
field at (const PGSTD::string &s) const
size_type size () const 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 (const PGSTD::string &ColName) const
 Type of given column.

oid column_type (const char ColName[]) const
 Type of given column.


Protected Member Functions

 tuple ()

Protected Attributes

const resultm_Home
result::size_type m_Index

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 fields in a tuple can not currently be iterated over.


Member Typedef Documentation

typedef tuple_size_type pqxx::result::tuple::size_type
 

Reimplemented in pqxx::result::field.


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

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

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

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

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 size_type  ColNum  )  const
 

Type of given column.

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

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

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

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

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

Reimplemented in pqxx::result::field.


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 Thu Feb 19 22:04:39 2004 for libpqxx by doxygen 1.3.5