#include <cursor.h>
Inheritance diagram for dbAnyCursor:
Public Methods | |
int | getNumberOfRecords () const |
void | remove () |
bool | isEmpty () const |
bool | isUpdateCursor () const |
bool | isLimitReached () const |
int | select (dbQuery &query, dbCursorType aType, void *paramStruct=NULL) |
oid_t * | toArrayOfOid (oid_t *arr) const |
int | select (dbQuery &query, void *paramStruct=NULL) |
int | select (char_t const *condition, dbCursorType aType, void *paramStruct=NULL) |
int | select (char_t const *condition, void *paramStruct=NULL) |
int | select (dbCursorType aType) |
int | select () |
int | selectByKey (char_t const *key, void const *value) |
int | selectByKeyRange (char_t const *key, void const *minValue, void const *maxValue, bool ascent=true) |
void | update () |
void | removeAll () |
void | removeAllSelected () |
void | setSelectionLimit (size_t lim) |
void | unsetSelectionLimit () |
void | setPrefetchMode (bool mode) |
bool | isIncremental () |
bool | hasIncrementalHint () |
void | enableCheckForDuplicates (bool enabled) |
void | reset () |
bool | isLast () const |
bool | isFirst () const |
void | freeze () |
void | unfreeze () |
bool | skip (int n) |
int | seek (oid_t oid) |
dbTableDescriptor * | getTable () |
bool | isInSelection (oid_t oid) |
void | fetch () |
bool | hasNext () const |
bool | hasCurrent () const |
|
Enable or disable duplicates checking (if programmer knows that disjuncts in query do not intersect, then he can disable duplicate checking and avoid bitmap allocation |
|
Fetch current record. You should use this method only if prefetch mode is disabled |
|
Freeze cursor. This method makes it possible to save current state of cursor, close transaction to allow other threads to proceed, and then later restore state of the cursor using unfreeze method and continue traversal through selected records. |
|
Get number of selected records
|
|
Get descriptor of the table.
|
|
Check if there is current record in the selection |
|
Check if cursor has dbIncrementalType.
|
|
Check if there is more records in the selection |
|
Checks whether selection is empty
|
|
Check whether current record is the first one in the selection
|
|
Check if cursor is incremental. Incremental cursor is used only when type is dbCursorIncremental. But even if the type of the cursor is dbCursorIncremental, the cursor may not always be incremental - it depends on a query. Queries containing order by clause except ordering by index key, can not be executed incrementally. In case of incremental cursor, select() returns 0 if no record is selected or 1 if selection is not empty, but precise number of selected records is not reported since it is not known.
|
|
Check if record with specified OID is in selection
|
|
Check whether current record is the last one in the selection
|
|
Checks whether limit for number of selected reacord is reached
|
|
Check whether this cursor can be used for update
|
|
Remove current record |
|
Remove all records in the table |
|
Remove all selected records |
|
Reset cursor |
|
Position cursor on the record with the specified OID
|
|
Select all records from the table with default cursor type
|
|
Select all records from the table
|
|
Execute query with default cursor type.
|
|
Execute query.
|
|
Execute query with default cursor type.
|
|
Execute query.
|
|
Select all records from the table with specfied value of the key
|
|
Select all records from the table with specfied range of the key values
|
|
Set prefetch mode. By default, current record is fetch as soon as it is becomes current. But sometimesyou need only OIDs of selected records. In this case setting prefetchMode to false can help.
|
|
Specify maximal number of records to be selected |
|
Skip specified number of records
|
|
Extract OIDs of selected recrods in array
|
|
Unfreeze cursor. This method starts new transaction and restore state of the cursor |
|
Remove selection limit |
|
Update current record. You should changed value of current record before and then call update method to save changes to the database. |