#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) |
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 () |
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 | updateInProgress |
size_t | stmtLimitStart |
size_t | stmtLimitLen |
size_t | nSkipped |
Friends | |
class | dbDatabase |
class | dbHashTable |
class | dbRtreePage |
class | dbBtreePage |
class | dbThickBtreePage |
class | dbSubSql |
class | dbStatement |
class | dbServer |
class | dbAnyContainer |
class | dbCLI |
|
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.
|
|
Checks whether selection is empty
|
|
Check whether current record is the first one in the selection
|
|
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. |