class RDbIncremental |
Provides the interface for performing long-running database operations in incremental steps, allowing application programs to remain responsive to other events.
After an operation has begun, a standard interface is used to continue and complete all incremental operations. On successful return from one of the initiating functions, a step value is also returned. This gives the progress indication and is, initially, positive. This value should be passed into subsequent steps in the operation, each of which may decrement the value by some amount, although they are allowed to leave it unchanged. The value reaches zero, if, and only if the operation completes.
While an incremental operation is in progress, the database cannot be used for any other operations such as opening tables or preparing views.
Starting an incremental operation also requires that no rowsets are open on the database and that no commit is pending for data manipulation transactions.
If no explicit transaction has been started by the database, then an automatic transaction is begun when any incremental operation is started and is committed when complete or rolled back if the operation either fails or is abandoned prior to completion.
Public Member Functions | |
---|---|
IMPORT_C TInt | AlterTable(RDbDatabase &, const TDesC &, const CDbColSet &, TInt &) |
IMPORT_C void | Close() |
IMPORT_C TInt | Compact(RDbDatabase &, TInt &) |
IMPORT_C TInt | CreateIndex(RDbDatabase &, const TDesC &, const TDesC &, const CDbKey &, TInt &) |
IMPORT_C TInt | DropIndex(RDbDatabase &, const TDesC &, const TDesC &, TInt &) |
IMPORT_C TInt | DropTable(RDbDatabase &, const TDesC &, TInt &) |
TInt | Execute(RDbDatabase &, const TDesC &, TInt &) |
IMPORT_C TInt | Execute(RDbDatabase &, const TDesC &, TDbTextComparison, TInt &) |
IMPORT_C TInt | Next(TInt &) |
IMPORT_C void | Next(TPckgBuf< TInt > &, TRequestStatus &) |
IMPORT_C TInt | Recover(RDbDatabase &, TInt &) |
IMPORT_C TInt | UpdateStats(RDbDatabase &, TInt &) |
Private Attributes | |
---|---|
RDbHandle< CDbIncremental > | iState |
IMPORT_C TInt | AlterTable | ( | RDbDatabase & | aDatabase, |
const TDesC & | aTable, | |||
const CDbColSet & | aNewDef, | |||
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
const TDesC & aTable | |
const CDbColSet & aNewDef | |
TInt & aStep |
IMPORT_C TInt | Compact | ( | RDbDatabase & | aDatabase, |
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
TInt & aStep |
IMPORT_C TInt | CreateIndex | ( | RDbDatabase & | aDatabase, |
const TDesC & | aName, | |||
const TDesC & | aTable, | |||
const CDbKey & | aKey, | |||
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
const TDesC & aName | |
const TDesC & aTable | |
const CDbKey & aKey | |
TInt & aStep |
IMPORT_C TInt | DropIndex | ( | RDbDatabase & | aDatabase, |
const TDesC & | aName, | |||
const TDesC & | aTable, | |||
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
const TDesC & aName | |
const TDesC & aTable | |
TInt & aStep |
IMPORT_C TInt | DropTable | ( | RDbDatabase & | aDatabase, |
const TDesC & | aTable, | |||
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
const TDesC & aTable | |
TInt & aStep |
TInt | Execute | ( | RDbDatabase & | aDatabase, |
const TDesC & | aSql, | |||
TInt & | aStep | |||
) | [inline] |
Initiates the execution of a DDL (SQL schema update) statement on the database.
This is the incremental form of RDbDatabase::Execute().
Note that to begin executing a DML (SQL data update) statement incrementally, use the RDbUpdate class.
KErrNone if successful, otherwise another of the system-wide error codes.
capability
the schema access policy for the database, if the SQL statement is CREATE/DROP/ALTER;
the write access policy for the table in the SQL, if the SQL statement is INSERT/UPDATE/DELETE;
RDbDatabase & aDatabase | The database on which the DDL (SQL schema update) statement is to execute. |
const TDesC & aSql | The DDL SQL statement to be executed on the database. |
TInt & aStep | On return, contains the initial step count for the incremental operation. This value should be passed in to subsequent calls to Next() to continue the operation. |
IMPORT_C TInt | Execute | ( | RDbDatabase & | aDatabase, |
const TDesC & | aSql, | |||
TDbTextComparison | aComparison, | |||
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
const TDesC & aSql | |
TDbTextComparison aComparison | |
TInt & aStep |
IMPORT_C void | Next | ( | TPckgBuf< TInt > & | aStep, |
TRequestStatus & | aStatus | |||
) |
TPckgBuf< TInt > & aStep | |
TRequestStatus & aStatus |
IMPORT_C TInt | Recover | ( | RDbDatabase & | aDatabase, |
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
TInt & aStep |
IMPORT_C TInt | UpdateStats | ( | RDbDatabase & | aDatabase, |
TInt & | aStep | |||
) |
RDbDatabase & aDatabase | |
TInt & aStep |