|
|
|
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.
RDbRowSet - An abstract base class that provides functionality which is shared between SQL v...
RDbTable - Provides access to table data as a rowset, allowing manipulation of a named tabl...
Defined in RDbTable:
EEqualToRetrieve the first row which is equal to the key value. EGreaterEqualRetrieve the first row which is equal to or greater than the key value. EGreaterThanRetrieve the first row which is strictly greater than the key value. ELessEqualRetrieve the last row which is equal to or less than the key value. ELessThanRetrieve the last row which is strictly less than the key value. Open(RDbDatabase &,const TDesC &,TAccess)Opens the named table object on a database with the specified access.SeekL(const TDbSeekKey &,TComparison)Finds a row in a table based on a key in the active index.SetIndex(const TDesC &)Sets the specified index as the active index for this table. The rows will be pr...SetNoIndex()Sets the ordering to be the underlying ordering of the rows — this will ...TComparisonDatabase table seek comparison types. Inherited from RDbRowSet:
AtBeginning()constTests whether the cursor is at the beginning of the rowset.AtEnd()constTests whether the cursor is at the end of the rowset.AtRow()constTests whether the cursor is on a row.BeginningL()Positions the cursor at the beginning of the rowset.Bookmark()constGets the bookmark for the current cursor position. Bookmarks cannot be extracted...Cancel()Cancels the update or insertion of a row, or recovers the rowset if RDbRowSet::P...Close()Closes the rowset and releases any owned resources. It is safe to close a rowset...ColCount()constReturns the number of columns which are defined in this rowset.ColDef(TDbColNo)constReturns the definition of a column in the rowset.ColDes(TDbColNo)constExtracts a Text column value. The column type must match the default descriptor ...ColDes16(TDbColNo)constExtracts a column as Unicode text.ColDes8(TDbColNo)constExtracts any column type, except Long columns, as binary data. Can handle any ty...ColInt(TDbColNo)constExtracts a signed integer column value. The type should fit within a TInt.ColInt16(TDbColNo)constExtracts a TInt16 or TInt8 column value.ColInt32(TDbColNo)constExtracts a TInt32, TInt16 or TInt8 column value.ColInt64(TDbColNo)constExtracts a TInt64 column value.ColInt8(TDbColNo)constExtracts a TInt8 column value.ColLength(TDbColNo)constGets the length of a column value. As compared with RDbRowSet::ColSize(TDbColNo)...ColReal(TDbColNo)constExtracts a TReal64 column value.ColReal32(TDbColNo)constExtracts a TReal32 column value.ColReal64(TDbColNo)constExtracts a TReal64 column value.ColSetL()constReturns the entire column set for the rowset. This can be used to discover colum...ColSize(TDbColNo)constGets the size in bytes of a column value. This can be used for all column types,...ColTime(TDbColNo)constExtracts a TTime column value.ColType(TDbColNo)constReturns the type of a column in the rowset.ColUint(TDbColNo)constExtracts an unsigned integer column value.ColUint16(TDbColNo)constExtracts a Uint16, Uint8 or Bit column value.ColUint32(TDbColNo)constExtracts a Uint32, Uint16, Uint8 or Bit column value.ColUint8(TDbColNo)constExtracts a Uint8 or Bit column value.CountL(TAccuracy)constReturns the number of rows available in a rowset.DeleteL()Deletes the current row in a rowset. The rowset must not currently be updating o...EBackwardsSearch from the current row backwards through the set. EBeginningMove to the position before the first row in the rowset. EEndMove to the position after the last row in the rowset. EEnsureTake the time, if necessary, to return the exact value. EFirstMove to the first row in the rowset. EForwardsSearch from the current row forwards through the set. EInsertOnlyInserting new rows is the only valid operation on the rowset. ELastMove to the last row in the rowset. ENextMove to the next row in the rowset. EPreviousMove to the previous row in the rowset. EQuickReturn any immediately available value. EReadOnlyRow navigation and reading are permitted. EUpdatableAll operations can be performed on the rowset. EndL()Positions the cursor at the end of the rowset.FindL(TDirection,TDbQuery)Searches through a rowset for a row which fulfils an SQL search-condition. The s...FirstL()Positions the cursor on the first row in the rowset. If there are no rows, the c...GetL()Gets the current row data for access using the column extractor functions. The c...GotoL(TPosition)Moves the cursor to a specified position.GotoL(const TDbBookmark &)Goes to a previously bookmarked position in a rowset.InsertCopyL()Inserts a copy of the current row into the rowset. All auto-increment columns wi...InsertL()Inserts a new row into the rowset. All auto-increment columns will be initialise...IsColNull(TDbColNo)constTests whether a column has the NULL value.IsEmptyL()constTests whether there are any rows in the rowset. This is often faster than testin...LastL()Positions the cursor on the last row in the rowset. If there are no rows, the cu...MatchL(const RDbRowConstraint &)Tests whether the current row in the rowset matches a previously compiled row co...NextL()Moves the cursor to the next row in the rowset. If there are no more rows, the c...PreviousL()Moves the cursor to the previous row in the rowset. If there are no more rows, t...PutL()Completes the update or insertion of a row.Reset()Resets the rowset.SetColL(TDbColNo,TInt)Sets a signed integer column value. The type should fit into a TInt.SetColL(TDbColNo,TInt32)Sets a TInt32, TInt16 or TInt8 column value.SetColL(TDbColNo,TInt64)Sets a TInt64 column value.SetColL(TDbColNo,TReal32)Sets a TReal32 column value.SetColL(TDbColNo,TReal64)Sets a TReal64 column value.SetColL(TDbColNo,TTime)Sets a TTime column value.SetColL(TDbColNo,TUint)Sets a signed integer column value. The type should fit into a TInt.SetColL(TDbColNo,TUint32)Sets a TUint32, TUint16, TUint8 or Bit column value.SetColL(TDbColNo,const TDesC16 &)Set a column value from Unicode text.SetColL(TDbColNo,const TDesC8 &)Sets a column value from an 8 bit descriptor. This function can also set the val...SetColNullL(TDbColNo)Use this function to set the value of a column to NULL.TAccessSpecifies which operations can be performed on a rowset. TAccuracySpecifies whether the RDbRowSet::CountL(TAccuracy)const function should ensure t...TDirectionSpecifies the direction to search through the rowset when using the RDbRowSet::F...TPositionSpecifies where the rowset should navigate to in the RDbRowSet::GotoL(TPosition)...UpdateL()Prepares the current row for update. If no client-begun transaction is in progre...iCursor| Capability: | Security policy note: | For a secure shared database, the caller must satisfy either the read or the write access policy for the table. |
IMPORT_C TInt Open(RDbDatabase &aDatabase, const TDesC &aName, TAccess anAccess=EUpdatable);
Opens the named table object on a database with the specified access.
If successful, the rowset is positioned to the beginning.
|
|
| Capability: | Security policy note: | For a secure shared database, the caller must satisfy the read access policy for the table. |
inline TInt SetIndex(const TDesC &anIndex);
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 RDbTable::SeekL(const TDbSeekKey &,TComparison) function.
If successful, the rowset is reset to the beginning.
|
|
| Capability: | Security policy note: | For a secure shared database, the caller must satisfy the read access policy for the table. |
inline TInt SetNoIndex();
Sets the ordering to be the underlying ordering of the rows — this will usually provide faster navigation of the rowset.
|
| Capability: | Security policy note: | For a secure shared database, the caller must satisfy the read access policy for the table. |
IMPORT_C TBool SeekL(const TDbSeekKey &aKey, TComparison aComparison=EEqualTo);
Finds a row in a table based on a key in the active index.
This function cannot be called while the rowset is currently updating or inserting a row. The currently active index on the table must have a key definition which matches the types in the key value.
Less columns can be added to the key than are present in the index definition: the keys will only be compared up to the columns present further columns in the index are not considered.
If successful the cursor is positioned to the row which was found, otherwise the cursor is left on an invalid row.
The underlying Store database can leave with KErrWrite, if the table was created with insert-only access.
The function can also leave with one of the DBMS database error codes.
|
|
TComparison
Database table seek comparison types.
|