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

pqxx::CachedResult Class Reference

#include <cachedresult.h>

List of all members.

Public Types

typedef Result::size_type size_type
typedef size_type blocknum
typedef Result::Tuple Tuple

Public Methods

 CachedResult (pqxx::TransactionItf &, const char Query[], PGSTD::string BaseName="query", size_type Granularity=100)
 Granularity must be at least 2.

const Tuple operator[] (size_type i) const
const Tuple at (size_type i) const
size_type size () const
void clear ()


Detailed Description

Cached result set. Chunks of result data are transparently fetched on-demand and stored in an internal cache for reuse. Functionality is similar to that of Result, with certain restrictions and different performance characteristics. A CachedResult must live in the context of a transaction, so that it can fetch further rows as they are needed.

The class uses a Cursor internally to fetch results. Data are not fetched row-by-row, but in chunks of configurable size. For internal computational reasons, these chunks (called "blocks" here) must be at least 2 rows large.

The maximum size of a query result accessed through a CachedResult is one less than the maximum size of a reqular PostgreSQL query result.


Member Typedef Documentation

typedef size_type pqxx::CachedResult::blocknum
 

typedef Result::size_type pqxx::CachedResult::size_type
 

typedef Result::Tuple pqxx::CachedResult::Tuple
 


Constructor & Destructor Documentation

pqxx::CachedResult::CachedResult pqxx::TransactionItf  ,
const char    Query[],
PGSTD::string    BaseName = "query",
size_type    Granularity = 100
[explicit]
 

Granularity must be at least 2.


Member Function Documentation

const Tuple pqxx::CachedResult::at size_type    i const
 

void pqxx::CachedResult::clear  
 

const Tuple pqxx::CachedResult::operator[] size_type    i const
 

size_type pqxx::CachedResult::size   const
 


The documentation for this class was generated from the following files:
Generated on Sun Dec 1 20:39:57 2002 for libpqxx by doxygen1.3-rc1