class RDbRowSet |
An abstract base class that provides functionality which is shared between SQL view objects and Table objects. This functionality includes most of the cursor navigation, row retrieval and update behaviour of rowsets.
Rowset objects do not provide the data for the rowset on which they operate. It is the responsibility of the derived classes RDbView and RDbTable to specify the data source.
This class is not intended for user derivation.
Private Member Functions | |
---|---|
CDbCursor & | CheckCol(TDbColNo) |
MStreamBuf * | ColSinkL(TDbColNo) |
MStreamBuf * | ColSourceL(TDbColNo) |
TDbColumn | Column(TDbColNo, TDbColType) |
TDbColumnC | ColumnC(TDbColNo, TDbColType) |
Public Member Enumerations | |
---|---|
enum | TAccess { EUpdatable, EReadOnly, EInsertOnly } |
enum | TAccuracy { EEnsure, EQuick } |
enum | TDirection { EForwards, EBackwards } |
enum | TPosition { EFirst, ENext, EPrevious, ELast, EBeginning, EEnd } |
Protected Attributes | |
---|---|
RDbHandle< CDbCursor > | iCursor |
void | BeginningL | ( | ) | [inline] |
Positions the cursor at the beginning of the rowset.
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
TInt | ColInt | ( | TDbColNo | aCol | ) | const [inline] |
Extracts a signed integer column value. The type should fit within a TInt.
The value of column aCol.
TDbColNo aCol | The column ordinal of the column to extract. |
TReal | ColReal | ( | TDbColNo | aCol | ) | const [inline] |
Extracts a TReal64 column value.
The value of column aCol.
TDbColNo aCol | The column ordinal of the column to extract. |
MStreamBuf * | ColSourceL | ( | TDbColNo | aCol | ) | const [private, inline] |
TDbColNo aCol |
TUint | ColUint | ( | TDbColNo | aCol | ) | const [inline] |
Extracts an unsigned integer column value.
The value of column aCol.
TDbColNo aCol | The column ordinal of the column to extract. |
TDbColumn | Column | ( | TDbColNo | aCol, |
TDbColType | aType | |||
) | [private] |
TDbColNo aCol | |
TDbColType aType |
TDbColumnC | ColumnC | ( | TDbColNo | aCol, |
TDbColType | aType | |||
) | const [private] |
TDbColNo aCol | |
TDbColType aType |
IMPORT_C TInt | CountL | ( | TAccuracy | anAccuracy = EEnsure | ) | const |
TAccuracy anAccuracy = EEnsure |
void | EndL | ( | ) | [inline] |
Positions the cursor at the end of the rowset.
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
IMPORT_C TInt | FindL | ( | TDirection | aDirection, |
TDbQuery | aCriteria | |||
) |
TDirection aDirection | |
TDbQuery aCriteria |
TBool | FirstL | ( | ) | [inline] |
Positions the cursor on the first row in the rowset. If there are no rows, the cursor is positioned at the end.
ETrue if the cursor is now at a row, EFalse if it is at the end.
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
IMPORT_C void | GotoL | ( | const TDbBookmark & | aMark | ) |
const TDbBookmark & aMark |
TBool | IsColNull | ( | TDbColNo | aCol | ) | const [inline] |
Tests whether a column has the NULL value.
Columns which have the NULL value can still be extracted with the correct accessor function, in which case numerical columns will return a 0 (or equivalent) value, and text and binary columns will have a zero length.
ETrue if column aCol is NULL, otherwise EFalse.
TDbColNo aCol | The column ordinal for the column to test. |
TBool | LastL | ( | ) | [inline] |
Positions the cursor on the last row in the rowset. If there are no rows, the cursor is positioned at the beginning.
ETrue if the cursor is now at a row, EFalse if it is at the beginning.
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
IMPORT_C TBool | MatchL | ( | const RDbRowConstraint & | aConstraint | ) |
const RDbRowConstraint & aConstraint |
TBool | NextL | ( | ) | [inline] |
Moves the cursor to the next row in the rowset. If there are no more rows, the cursor is positioned to the end.
If the cursor is at the beginning prior to the function, it is equivalent to FirstL().
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
TBool | PreviousL | ( | ) | [inline] |
Moves the cursor to the previous row in the rowset. If there are no more rows, the cursor is positioned to the beginning.
If the cursor is at the end prior to the function, it is equivalent to LastL().
ETrue if the cursor is now at a row, EFalse if it is at the beginning.
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
void | SetColL | ( | TDbColNo | aCol, |
TInt | aValue | |||
) | [inline] |
Sets a signed integer column value. The type should fit into a TInt.
void | SetColL | ( | TDbColNo | aCol, |
TUint | aValue | |||
) | [inline] |
Sets a signed integer column value. The type should fit into a TInt.
Specifies which operations can be performed on a rowset.
EUpdatable |
All operations can be performed on the rowset. |
EReadOnly |
Row navigation and reading are permitted. |
EInsertOnly |
Inserting new rows is the only valid operation on the rowset. |
Specifies whether the CountL() function should ensure that it returns the exact value which may be a non-trivial task.
EEnsure |
Take the time, if necessary, to return the exact value. |
EQuick |
Return any immediately available value. |
Specifies the direction to search through the rowset when using the FindL() function.
EForwards |
Search from the current row forwards through the set. |
EBackwards |
Search from the current row backwards through the set. |
EFirst |
Move to the first row in the rowset. |
ENext |
Move to the next row in the rowset. |
EPrevious |
Move to the previous row in the rowset. |
ELast |
Move to the last row in the rowset. |
EBeginning |
Move to the position before the first row in the rowset. |
EEnd |
Move to the position after the last row in the rowset. |