![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
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()const
Tests whether any more evaluation can be done to a view.Inherited from RDbRowSet
:
AtBeginning()const
Tests whether the cursor is at the beginning of the rowset.AtEnd()const
Tests whether the cursor is at the end of the rowset.AtRow()const
Tests whether the cursor is on a row.BeginningL()
Positions the cursor at the beginning of the rowset.Bookmark()const
Gets 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()const
Returns the number of columns which are defined in this rowset.ColDef(TDbColNo)const
Returns the definition of a column in the rowset.ColDes(TDbColNo)const
Extracts a Text column value. The column type must match the default descriptor ...ColDes16(TDbColNo)const
Extracts a column as Unicode text.ColDes8(TDbColNo)const
Extracts any column type, except Long columns, as binary data. Can handle any ty...ColInt(TDbColNo)const
Extracts a signed integer column value. The type should fit within a TInt.ColInt16(TDbColNo)const
Extracts a TInt16 or TInt8 column value.ColInt32(TDbColNo)const
Extracts a TInt32, TInt16 or TInt8 column value.ColInt64(TDbColNo)const
Extracts a TInt64 column value.ColInt8(TDbColNo)const
Extracts a TInt8 column value.ColLength(TDbColNo)const
Gets the length of a column value. As compared with RDbRowSet::ColSize(TDbColNo)...ColReal(TDbColNo)const
Extracts a TReal64 column value.ColReal32(TDbColNo)const
Extracts a TReal32 column value.ColReal64(TDbColNo)const
Extracts a TReal64 column value.ColSetL()const
Returns the entire column set for the rowset. This can be used to discover colum...ColSize(TDbColNo)const
Gets the size in bytes of a column value. This can be used for all column types,...ColTime(TDbColNo)const
Extracts a TTime column value.ColType(TDbColNo)const
Returns the type of a column in the rowset.ColUint(TDbColNo)const
Extracts an unsigned integer column value.ColUint16(TDbColNo)const
Extracts a Uint16, Uint8 or Bit column value.ColUint32(TDbColNo)const
Extracts a Uint32, Uint16, Uint8 or Bit column value.ColUint8(TDbColNo)const
Extracts a Uint8 or Bit column value.CountL(TAccuracy)const
Returns the number of rows available in a rowset.DeleteL()
Deletes the current row in a rowset. The rowset must not currently be updating o...EBackwards
Search from the current row backwards through the set. EBeginning
Move to the position before the first row in the rowset. EEnd
Move to the position after the last row in the rowset. EEnsure
Take the time, if necessary, to return the exact value. EFirst
Move to the first row in the rowset. EForwards
Search from the current row forwards through the set. EInsertOnly
Inserting new rows is the only valid operation on the rowset. ELast
Move to the last row in the rowset. ENext
Move to the next row in the rowset. EPrevious
Move to the previous row in the rowset. EQuick
Return any immediately available value. EReadOnly
Row navigation and reading are permitted. EUpdatable
All 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)const
Tests whether a column has the NULL value.IsEmptyL()const
Tests 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.TAccess
Specifies which operations can be performed on a rowset. TAccuracy
Specifies whether the RDbRowSet::CountL(TAccuracy)const function should ensure t...TDirection
Specifies the direction to search through the rowset when using the RDbRowSet::F...TPosition
Specifies 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.
|