class RDbTable : public RDbRowSet |
Provides access to table data as a rowset, allowing manipulation of a named table in the database. Additionally, a named index can be used to order the rowset, and to provide fast key-based row retrieval from the table.
There are no special rules to consider when deriving from this class.
Public Member Functions | |
---|---|
IMPORT_C TInt | Open(RDbDatabase &, const TDesC &, TAccess) |
IMPORT_C TBool | SeekL(const TDbSeekKey &, TComparison) |
TInt | SetIndex(const TDesC &) |
TInt | SetNoIndex() |
Private Member Functions | |
---|---|
IMPORT_C TInt | SetIndex(const TDesC *) |
Public Member Enumerations | |
---|---|
enum | TComparison { ELessThan, ELessEqual, EEqualTo, EGreaterEqual, EGreaterThan } |
Inherited Enumerations | |
---|---|
RDbRowSet:TAccess | |
RDbRowSet:TAccuracy | |
RDbRowSet:TDirection | |
RDbRowSet:TPosition |
Inherited Attributes | |
---|---|
RDbRowSet::iCursor |
IMPORT_C TInt | Open | ( | RDbDatabase & | aDatabase, |
const TDesC & | aName, | |||
TAccess | anAccess = EUpdatable | |||
) |
RDbDatabase & aDatabase | |
const TDesC & aName | |
TAccess anAccess = EUpdatable |
IMPORT_C TBool | SeekL | ( | const TDbSeekKey & | aKey, |
TComparison | aComparison = EEqualTo | |||
) |
const TDbSeekKey & aKey | |
TComparison aComparison = EEqualTo |
TInt | SetIndex | ( | const TDesC & | anIndex | ) | [inline] |
Sets the specified index as the active index for this table. The rows will be presented in index order, and this index key will be used for lookup by the SeekL() function.
If successful, the rowset is reset to the beginning.
KErrNone, if successful, otherwise one of the system-wide error codes. Specifically:KErrWrite if the table was created with insert-only access.KErrNotFound if the index does not exist on the table. This can also be one of the DBMS database error codes.
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
const TDesC & anIndex | The name of the index to activate. |
IMPORT_C TInt | SetIndex | ( | const TDesC * | anIndex | ) | [private] |
const TDesC * anIndex |
TInt | SetNoIndex | ( | ) | [inline] |
Sets the ordering to be the underlying ordering of the rows this will usually provide faster navigation of the rowset.
KErrNone, if successful, otherwise one of the system-wide error codes. Specifically:KErrWrite if the table was created with insert-only access. This can also be one of the DBMS database error codes.
capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
Database table seek comparison types.
ELessThan |
Retrieve the last row which is strictly less than the key value. |
ELessEqual |
Retrieve the last row which is equal to or less than the key value. |
EEqualTo |
Retrieve the first row which is equal to the key value. |
EGreaterEqual |
Retrieve the first row which is equal to or greater than the key value. |
EGreaterThan |
Retrieve the first row which is strictly greater than the key value. |