#include <cursor.h>
Public Methods | |
Cursor (TransactionItf &T, const char Query[], PGSTD::string BaseName="cur", Result_size_type Count=NEXT()) | |
Constructor. Creates a cursor. | |
Result_size_type | SetCount (Result_size_type) |
Set new stride, ie. the number of rows to fetch at a time. | |
Result | Fetch (Result_size_type Count) |
Fetch Count rows of data. | |
void | Move (Result_size_type Count) |
Move forward by Count rows (negative for backwards) through the data set. | |
Cursor & | operator>> (Result &) |
Fetch rows. | |
operator bool () const | |
May there be more rows coming? | |
bool | operator! () const |
Are we done? | |
Cursor & | operator+= (Result_size_type N) |
Move N rows forward. | |
Cursor & | operator-= (Result_size_type N) |
Move N rows backward. | |
Static Public Methods | |
Result_size_type | ALL () |
Constant: "next fetch/move should span as many rows as possible.". | |
Result_size_type | NEXT () |
Constant: "next fetch/move should cover just the next row.". | |
Result_size_type | PRIOR () |
Constant: "next fetch/move should go back one row.". | |
Result_size_type | BACKWARD_ALL () |
Cursor behaves as an output stream generating Result objects. They may be used to fetch rows individually or in blocks, in which case each Result coming out of the stream may contain more than one Tuple.
Postgres does not currently support modification of data through a cursor.
|
Constructor. Creates a cursor.
|
|
Constant: "next fetch/move should span as many rows as possible.". If the number of rows ahead exceeds the largest number your machine can comfortably conceive, this may not actually be all remaining rows in the result set. |
|
If the number of rows behind the cursor exceeds the largest number your machine can comfortably conceive, this may not bring you all the way back to the beginning. |
|
Fetch Count rows of data. The number of rows fetched will not exceed Count, but it may be lower. |
|
Move forward by Count rows (negative for backwards) through the data set.
|
|
Constant: "next fetch/move should cover just the next row.".
|
|
May there be more rows coming?
|
|
Are we done?
|
|
Move N rows forward.
|
|
Move N rows backward.
|
|
Fetch rows. The number of rows retrieved will be no larger than (but may be lower than) the rowcount set using the SetCount() function, or passed to the constructor as the Count argument. The default is 1. This operator lends itself to "while (Cur >> R) { ... }"-style use; the Cursor's conversion to bool tests whether it has arrived at the end of its data set. |
|
Constant: "next fetch/move should go back one row.".
|
|
Set new stride, ie. the number of rows to fetch at a time.
|