#include <d32dbms.h>
class RDbView : public RDbRowSet |
Public Member Functions | |
---|---|
IMPORT_C TInt | Evaluate() |
IMPORT_C void | Evaluate(TRequestStatus &) |
IMPORT_C TInt | EvaluateAll() |
IMPORT_C TInt | Prepare(RDbDatabase &, const TDbQuery &, TAccess) |
IMPORT_C TInt | Prepare(RDbDatabase &, const TDbQuery &, const TDbWindow &) |
IMPORT_C TInt | Prepare(RDbDatabase &, const TDbQuery &, const TDbWindow &, TAccess) |
IMPORT_C TBool | Unevaluated() |
Inherited Attributes | |
---|---|
RDbRowSet::iCursor |
Inherited Enumerations | |
---|---|
RDbRowSet:TAccess | |
RDbRowSet:TAccuracy | |
RDbRowSet:TDirection | |
RDbRowSet:TPosition |
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.
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, 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.
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.
Parameter | Description |
---|---|
aStatus | The 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. |
IMPORT_C TInt | EvaluateAll | ( | ) |
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.
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.
Parameter | Description |
---|---|
aDatabase | The database on which to execute the query. |
aQuery | The SQL query and the text comparison mode for the constraint. |
anAccess | The 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..
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.
Parameter | Description |
---|---|
aDatabase | The database on which to execute the query. |
aQuery | The SQL query and the text comparison mode for the constraint. |
aWindow | The 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.
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.
Parameter | Description |
---|---|
aDatabase | The database on which to execute the query. |
aQuery | The SQL query and the text comparison mode for the constraint. |
aWindow | The 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. |
anAccess | The 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.
IMPORT_C TBool | Unevaluated | ( | ) | 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.