Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

pqxx::result Class Reference

Query or command result set. More...

#include <result.hxx>

List of all members.

Public Types

typedef result_size_type size_type

Public Member Functions

 result ()
 result (const result &rhs)
 ~result ()
resultoperator= (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
 Number of columns in result.

tuple::size_type column_number (const char ColName[]) const
 Number of given column (throws exception if it doesn't exist).

tuple::size_type column_number (const PGSTD::string &Name) const
 Number of given column (throws exception if it doesn't exist).

const char * column_name (tuple::size_type Number) const
 Name of column with this number (throws exception if it doesn't exist).

oid column_type (tuple::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.

oid inserted_oid () const
 If command was INSERT of 1 row, return oid of inserted row.

size_type affected_rows () 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 result_size_type pqxx::result::size_type
 


Constructor & Destructor Documentation

pqxx::result::result  ) 
 

pqxx::result::result const result rhs  ) 
 

pqxx::result::~result  ) 
 


Member Function Documentation

pqxx::result::size_type pqxx::result::affected_rows  )  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::column_name tuple::size_type  Number  )  const
 

Name of column with this number (throws exception if it doesn't exist).

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

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

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

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

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

Type of given column.

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

Type of given column.

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

Type of given column.

tuple::size_type pqxx::result::columns  )  const
 

Number of columns in result.

bool pqxx::result::empty  )  const
 

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

oid pqxx::result::inserted_oid  )  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 Mon Oct 13 13:20:15 2003 for libpqxx by doxygen 1.3.4