#include <cursor.h>
Inheritance diagram for dbAnyCursor:
Public Member Functions | |
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 | setIncrementalHint (bool inc) |
bool | isIncremental () |
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 |
Protected Member Functions | |
void | allocateBitmap () |
void | checkForDuplicates () |
bool | isMarked (oid_t oid) |
void | mark (oid_t oid) |
void | setStatementLimit (dbQuery const &q) |
void | truncateSelection () |
bool | add (oid_t oid) |
bool | gotoNext () |
bool | gotoPrev () |
bool | gotoFirst () |
bool | gotoLast () |
void | setCurrent (dbAnyReference const &ref) |
void | setTable (dbTableDescriptor *aTable) |
void | setRecord (void *rec) |
dbAnyCursor (dbTableDescriptor &aTable, dbCursorType aType, byte *rec) | |
Protected Attributes | |
dbDatabase * | db |
dbTableDescriptor * | table |
dbCursorType | type |
dbCursorType | defaultType |
dbSelection | selection |
bool | allRecords |
oid_t | firstId |
oid_t | lastId |
oid_t | currId |
byte * | record |
size_t | limit |
dbGetTie | tie |
void * | paramBase |
int4 * | bitmap |
size_t | bitmapSize |
bool | eliminateDuplicates |
bool | prefetch |
bool | removed |
bool | incremental |
size_t | stmtLimitStart |
size_t | stmtLimitLen |
size_t | nSkipped |
dbAbstractIterator * | iterator |
dbBtreeIterator | btreeIterator |
dbRtreeIterator | rtreeIterator |
dbTableIterator | tableIterator |
Friends | |
class | dbDatabase |
class | dbHashTable |
class | dbRtreePage |
class | dbBtreePage |
class | dbRtreeIterator |
class | dbBtreeIterator |
class | dbTableIterator |
class | dbThickBtreePage |
class | dbSubSql |
class | dbStatement |
class | dbServer |
class | dbAnyContainer |
class | dbCLI |
class | JniResultSet |
|
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 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 incremental hint is set by setIncrementalHint. But default it is not set. Even if incremental hit is set, the cursor must not always be incremental - it depends on query. Cursor for update can not be incremental. Also 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
|
|
Specify whether cursor should be made incremental or not. This is only hint - whether the the cursor will actually be incremental depends on query. Cursor for update can not be incremental. Also queries containing order by clause except ordering by index key, can not be executed incrementally
|
|
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. |