|
|
|
class RDbView : public RDbRowSet;
Generates rowsets from an SQL query. The query is prepared and evaluated using the interface to this class, while the rowset is manipulated using the RDbRowset base class.
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...
RDbView - Generates rowsets from an SQL query. The query is prepared and evaluated using t...
Defined in RDbView:
Evaluate()Performs a single step of the view evaluation, and returns when the step is comp...Evaluate(TRequestStatus &)Performs a single step of the view evaluation, returning immediately and signall...EvaluateAll()Use this function to fully evaluate the view. It is equivalent to:Prepare(RDbDatabase &,const TDbQuery &,TAccess)Prepares the view object for evaluating an SQL select-statement.Prepare(RDbDatabase &,const TDbQuery &,const TDbWindow &)Prepares the view object for evaluating an SQL select-statement and specifies th...Prepare(RDbDatabase &,const TDbQuery &,const TDbWindow &,TAccess)Prepares the view object for evaluating an SQL select-statement, specifies the e...Unevaluated()constTests whether any more evaluation can be done to a view.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 the read access policy for the table. |
IMPORT_C TInt Prepare(RDbDatabase &aDatabase, const TDbQuery &aQuery, TAccess anAccess=EUpdatable);
Prepares the view object for evaluating an SQL select-statement.
Following preparation, the rowset object can always provide schema information, but the view may first require evaluation to generate the rowset for navigation.
|
|
| Capability: | Security policy note: | For a secure shared database, the caller must satisfy the read access policy for the table. |
IMPORT_C TInt Prepare(RDbDatabase &aDatabase, const TDbQuery &aQuery, const TDbWindow &aWindow);
Prepares the view object for evaluating an SQL select-statement and specifies the evaluation window shape for the rowset.
The function does not specify the access specification for the rowset updatable access is given.
Following preparation, the rowset object can always provide schema information, but the view may first require evaluation to generate the rowset for navigation.
|
|
| Capability: | Security policy note: | For a secure shared database, the caller must satisfy the read access policy for the table. |
IMPORT_C TInt Prepare(RDbDatabase &aDatabase, const TDbQuery &aQuery, const TDbWindow &aWindow, TAccess anAccess);
Prepares the view object for evaluating an SQL select-statement, specifies the evaluation window shape for the rowset, and sets the access specification for the rowset.
Following preparation, the rowset object can always provide schema information, but the view may first require evaluation to generate the rowset for navigation.
|
|
IMPORT_C TInt EvaluateAll();
Use this function to fully evaluate the view. It is equivalent to:
while (RDbView::Unevaluated()const) { RDbView::Evaluate(); }
|
IMPORT_C TInt Evaluate();
Performs a single step of the view evaluation, and returns when the step is complete. To completely evaluate a view in one
go, RDbView::EvaluateAll() should be used.
|
IMPORT_C void Evaluate(TRequestStatus &aStatus);
Performs a single step of the view evaluation, returning immediately and signalling when the step is complete.
This function is most effectively used when the view evaluation is carried out from an active object.
|
IMPORT_C TBool Unevaluated() const;
Tests whether any more evaluation can be done to a view.
|