#include <cachedresult.h>
Public Types | |
| typedef result::size_type | size_type |
| typedef size_type | blocknum |
| typedef result::tuple | tuple |
| Tuple type. Currently borrowed from result, but may change in the future. | |
| typedef tuple | Tuple |
Public Member Functions | |
| template<typename TRANSACTION> | |
| cachedresult (TRANSACTION &T, const char Query[], const PGSTD::string &BaseName="query", size_type Granularity=100) | |
| const tuple | operator[] (size_type i) const |
| Access a tuple. Invalid index yields undefined behaviour. | |
| const tuple | at (size_type i) const |
| Access a tuple. Throws exception if index is out of range. | |
| size_type | size () const |
| Number of rows in result set. First call may be slow. | |
| bool | empty () const |
| Is the result set empty, i.e. does it contain no rows? May fetch 1 block. | |
|
|
|
|
|
|
|
|
|
|
|
Tuple type. Currently borrowed from result, but may change in the future.
|
|
||||||||||||||||||||||||
|
Perform query and transparently fetch and cache resulting data.
|
|
|
Access a tuple. Throws exception if index is out of range. If the given index is not the index of an existing row, an out_of_range error will be thrown. Caveat: the tuple contains a reference to a result that may be destroyed by any other operation on the cachedresult, even if its constness is preserved. Therefore only use the returned tuple as a temporary, and do not try to copy-construct it, or keep references or pointers to it.
|
|
|
Is the result set empty, i.e. does it contain no rows? May fetch 1 block.
|
|
|
Access a tuple. Invalid index yields undefined behaviour. Caveat: the tuple contains a reference to a result that may be destroyed by any other operation on the cachedresult, even if its constness is preserved. Therefore only use the returned tuple as a temporary, and do not try to copy-construct it, or keep references or pointers to it.
|
|
|
Number of rows in result set. First call may be slow.
|
1.3.9.1