Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

pqxx::result Class Reference

Query or command result set. More...

#include <result.h>

List of all members.

Public Types

typedef result_size_type size_type
typedef tuple Tuple
typedef field Field

Public Member Functions

 result ()
 result (const result &rhs)
 ~result ()
result & operator= (const result &)
const_iterator begin () const
const_iterator end () const
size_type size () const
bool empty () const
size_type capacity () const
const tuple operator[] (size_type i) const
const tuple at (size_type) const
void clear ()
tuple::size_type Columns () const
tuple::size_type ColumnNumber (const char Name[]) const
 Number of given column, or -1 if it does not exist.

tuple::size_type ColumnNumber (const std::string &Name) const
 Number of given column, or -1 if it does not exist.

const char * ColumnName (tuple::size_type Number) const
oid InsertedOid () const
 If command was INSERT of 1 row, return oid of inserted row.

size_type AffectedRows () const
 If command was INSERT, UPDATE, or DELETE, return number of affected rows.


Friends

class result::field
class connection_base
class Cursor


Detailed Description

Query or command result set.

This behaves as a container (as defined by the C++ standard library) and provides random access const iterators to iterate over its tuples. A tuple can also be accessed by indexing a result R by the tuple's zero-based number:

for (result::size_type i=0; i < R.size(); ++i) Process(R[i]);


Member Typedef Documentation

typedef field pqxx::result::Field
 

Deprecated:
For compatibility with old Field class

typedef result_size_type pqxx::result::size_type
 

typedef tuple pqxx::result::Tuple
 

Deprecated:
For compabilitiy with old Tuple class


Constructor & Destructor Documentation

pqxx::result::result (    ) 
 

pqxx::result::result (  const result &    rhs ) 
 

pqxx::result::~result (    ) 
 


Member Function Documentation

pqxx::result::size_type pqxx::result::AffectedRows (    )  const
 

If command was INSERT, UPDATE, or DELETE, return number of affected rows.

const pqxx::result::tuple pqxx::result::at (  size_type    )  const
 

const_iterator pqxx::result::begin (    )  const
 

size_type pqxx::result::capacity (    )  const
 

void pqxx::result::clear (    ) 
 

const char* pqxx::result::ColumnName (  tuple::size_type    Number )  const
 

tuple::size_type pqxx::result::ColumnNumber (  const std::string &    Name )  const
 

Number of given column, or -1 if it does not exist.

tuple::size_type pqxx::result::ColumnNumber (  const char    Name[] )  const
 

Number of given column, or -1 if it does not exist.

tuple::size_type pqxx::result::Columns (    )  const
 

bool pqxx::result::empty (    )  const
 

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

oid pqxx::result::InsertedOid (    )  const
 

If command was INSERT of 1 row, return oid of inserted row.

Returns oid_none otherwise.

pqxx::result & pqxx::result::operator= (  const result &    ) 
 

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

size_type pqxx::result::size (    )  const
 


Friends And Related Function Documentation

friend class connection_base [friend]
 

friend class Cursor [friend]
 

friend class result::field [friend]
 


The documentation for this class was generated from the following files:
Generated on Sat Jun 7 00:49:36 2003 for libpqxx by doxygen1.3-rc3