#include <result.h>
Public Types | |
typedef ResultIterator< T > | iterator |
Iterator type used to iterate through the query results. | |
Public Member Functions | |
Result (CachedConnection *conn, const Query &query, bool preload=true) | |
Result (CachedConnection *conn, bool preload=true) | |
Creates a Result that selects all persistent instances of the class T. | |
iterator | begin () |
Returns an ResultIterator<T> pointing to the first fetched object. | |
iterator | end () |
Returns an ResultIterator<T> representing an end of the fetched list. |
Result is used in the following way:
Result<Person> queryResult(conn, query); queryResult.open(); for (Result<Person>::iterator it = queryResult.begin(); it != queryResult.end(); it++) { cout << it->name << " " << it->age << endl; } queryResult.close();
iopc::Result< T >::Result | ( | CachedConnection * | conn, | |
const Query & | query, | |||
bool | preload = true | |||
) | [inline] |
conn | Connection on which the query will be executed | |
query | The query to be executed | |
preload | If true, open() loads all keys (OIDs or KeyValues) and immediately releases the cursor it uses. |
iopc::Result< T >::Result | ( | CachedConnection * | conn, | |
bool | preload = true | |||
) | [inline] |
Creates a Result that selects all persistent instances of the class T.
conn | Connection on which the query will be executed | |
preload | If true, open() loads all keys (OIDs or KeyValues) and immediately releases the cursor it uses. |