RDbView Class Reference

#include <d32dbms.h>

class RDbView : public RDbRowSet

Inherits from

Public Member Functions
IMPORT_C TIntEvaluate()
IMPORT_C voidEvaluate(TRequestStatus &)
IMPORT_C TIntEvaluateAll()
IMPORT_C TIntPrepare(RDbDatabase &, const TDbQuery &, TAccess)
IMPORT_C TIntPrepare(RDbDatabase &, const TDbQuery &, const TDbWindow &)
IMPORT_C TIntPrepare(RDbDatabase &, const TDbQuery &, const TDbWindow &, TAccess)
IMPORT_C TBoolUnevaluated()
Inherited Attributes
RDbRowSet::iCursor
Inherited Enumerations
RDbRowSet:TAccess
RDbRowSet:TAccuracy
RDbRowSet:TDirection
RDbRowSet:TPosition
Inherited Functions
RDbRowSet::AtBeginning()const
RDbRowSet::AtEnd()const
RDbRowSet::AtRow()const
RDbRowSet::BeginningL()
RDbRowSet::Bookmark()const
RDbRowSet::Cancel()
RDbRowSet::Close()
RDbRowSet::ColCount()const
RDbRowSet::ColDef(TDbColNo)const
RDbRowSet::ColDes(TDbColNo)const
RDbRowSet::ColDes16(TDbColNo)const
RDbRowSet::ColDes8(TDbColNo)const
RDbRowSet::ColInt(TDbColNo)const
RDbRowSet::ColInt16(TDbColNo)const
RDbRowSet::ColInt32(TDbColNo)const
RDbRowSet::ColInt64(TDbColNo)const
RDbRowSet::ColInt8(TDbColNo)const
RDbRowSet::ColLength(TDbColNo)const
RDbRowSet::ColReal(TDbColNo)const
RDbRowSet::ColReal32(TDbColNo)const
RDbRowSet::ColReal64(TDbColNo)const
RDbRowSet::ColSetL()const
RDbRowSet::ColSize(TDbColNo)const
RDbRowSet::ColTime(TDbColNo)const
RDbRowSet::ColType(TDbColNo)const
RDbRowSet::ColUint(TDbColNo)const
RDbRowSet::ColUint16(TDbColNo)const
RDbRowSet::ColUint32(TDbColNo)const
RDbRowSet::ColUint8(TDbColNo)const
RDbRowSet::CountL(TAccuracy)const
RDbRowSet::DeleteL()
RDbRowSet::EndL()
RDbRowSet::FindL(TDirection,TDbQuery)
RDbRowSet::FirstL()
RDbRowSet::GetL()
RDbRowSet::GotoL(TPosition)
RDbRowSet::GotoL(const TDbBookmark &)
RDbRowSet::InsertCopyL()
RDbRowSet::InsertL()
RDbRowSet::IsColNull(TDbColNo)const
RDbRowSet::IsEmptyL()const
RDbRowSet::LastL()
RDbRowSet::MatchL(const RDbRowConstraint &)
RDbRowSet::NextL()
RDbRowSet::PreviousL()
RDbRowSet::PutL()
RDbRowSet::Reset()
RDbRowSet::SetColL(TDbColNo,TInt)
RDbRowSet::SetColL(TDbColNo,TInt32)
RDbRowSet::SetColL(TDbColNo,TInt64)
RDbRowSet::SetColL(TDbColNo,TReal32)
RDbRowSet::SetColL(TDbColNo,TReal64)
RDbRowSet::SetColL(TDbColNo,TTime)
RDbRowSet::SetColL(TDbColNo,TUint)
RDbRowSet::SetColL(TDbColNo,TUint32)
RDbRowSet::SetColL(TDbColNo,const TDesC16 &)
RDbRowSet::SetColL(TDbColNo,const TDesC8 &)
RDbRowSet::SetColNullL(TDbColNo)
RDbRowSet::UpdateL()

Detailed Description

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.

Member Function Documentation

Evaluate ( )

IMPORT_C TIntEvaluate()

Performs a single step of the view evaluation, and returns when the step is complete. To completely evaluate a view in one go, EvaluateAll() should be used.

Returns: 0, evaluation is complete.> 0, more evaluation can be done. < 0, an error code, see the class overview for more information.

Evaluate ( TRequestStatus & )

IMPORT_C voidEvaluate(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.

ParameterDescription
aStatusThe request status used to contain completion information for the function. On completion, the status value should be interpreted as follows: 0, evaluation is complete.> 0, more evaluation can be done. < 0, an error code, see the class overview for more information.

EvaluateAll ( )

IMPORT_C TIntEvaluateAll()

Use this function to fully evaluate the view. It is equivalent to:

while (Unevaluated()) { Evaluate(); }

Returns: KErrNone, if successful, otherwise one of the system wide error codes.

Prepare ( RDbDatabase &, const TDbQuery &, TAccess )

IMPORT_C TIntPrepare(RDbDatabase &aDatabase,
const TDbQuery &aQuery,
TAccessanAccess = 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
Note For a secure shared database, the caller must satisfy the read access policy for the table.
ParameterDescription
aDatabaseThe database on which to execute the query.
aQueryThe SQL query and the text comparison mode for the constraint.
anAccessThe access specification for the rowset. By default, updatable access is given.

Returns: KErrNone, if successful, otherwise one of the other system-wide error codes. Specifically: KErrNotFound if The table does not exist in the database or a column name in the SQL query does not exist.KErrNotSupported if a sort-specification in the SQL query cannot be provided by an index.KErrArgument if an invalid or unrecognised SQL syntax was used.KErrGeneral if there is a column type mismatch in a predicate in the SQL query or if a date-literal in the SQL query was invalid.KErrOverflow if a number-literal in the SQL query for an integral column was too large (did not fit in a 32-bit integral representation). This can also be one of the DBMS database error codes..

Prepare ( RDbDatabase &, const TDbQuery &, const TDbWindow & )

IMPORT_C TIntPrepare(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
Note For a secure shared database, the caller must satisfy the read access policy for the table.
ParameterDescription
aDatabaseThe database on which to execute the query.
aQueryThe SQL query and the text comparison mode for the constraint.
aWindowThe desired evaluation window shape for the rowset. If this parameter is omitted, an alternative overload is called e.g. no pre-evaluation window is requested.

Returns: KErrNone, if successful, otherwise one of the other system-wide error codes. Specifically: KErrNotFound if The table does not exist in the database or a column name in the SQL query does not exist.KErrNotSupported if a sort-specification in the SQL query cannot be provided by an index.KErrArgument if an invalid or unrecognised SQL syntax was used.KErrGeneral if there is a column type mismatch in a predicate in the SQL query or if a date-literal in the SQL query was invalid.KErrOverflow if a number-literal in the SQL query for an integral column was too large (did not fit in a 32-bit integral representation). This can also be one of the DBMS database error codes.

Prepare ( RDbDatabase &, const TDbQuery &, const TDbWindow &, TAccess )

IMPORT_C TIntPrepare(RDbDatabase &aDatabase,
const TDbQuery &aQuery,
const TDbWindow &aWindow,
TAccessanAccess
)

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.

capability
Note For a secure shared database, the caller must satisfy the read access policy for the table.
ParameterDescription
aDatabaseThe database on which to execute the query.
aQueryThe SQL query and the text comparison mode for the constraint.
aWindowThe desired evaluation window shape for the rowset. If this parameter is omitted, an alternative overload is called e.g. no pre-evaluation window is requested.
anAccessThe access specification for the rowset. If omitted, updatable access is given.

Returns: KErrNone, if successful, otherwise one of the other system-wide error codes. Specifically:KErrNotFound if The table does not exist in the database or a column name in the SQL query does not exist.KErrNotSupported if a sort-specification in the SQL query cannot be provided by an index.KErrArgument if an invalid or unrecognised SQL syntax was used.KErrGeneral if there is a column type mismatch in a predicate in the SQL query or if a date-literal in the SQL query was invalid.KErrOverflow if a number-literal in the SQL query for an integral column was too large (did not fit in a 32-bit integral representation). This can also be one of the DBMS database error codes.

Unevaluated ( )

IMPORT_C TBoolUnevaluated()const

Tests whether any more evaluation can be done to a view.

Returns: ETrue, if the view can be further evaluated; EFalse, if evaluation will have no effect.