class RDbDatabase |
Abstract class providing the functionality of a database.
The source of the database and the implementation characteristics of a particular database are provided by a class derived from RDbDatabase.
DBMS has one such implementation: the store database.
This class is not intended for user derivation.
Note: For functions (i.e. Execute) that take an Sql string, if the string contains a LIKE clause with * (asterisks) wildcard then the characters between them must be no longer than length 255. If only one * exists then the length is taken from the start and to the end of the clause. However, if the clause contains a ? (question mark) wildcard within it then the characters between must be no longer than length 253.
Public Member Functions | |
---|---|
IMPORT_C TInt | AlterTable(const TDesC &, const CDbColSet &) |
IMPORT_C TInt | Begin() |
IMPORT_C void | Close() |
IMPORT_C CDbColSet * | ColSetL(const TDesC &) |
IMPORT_C TInt | Commit() |
IMPORT_C TInt | Compact() |
IMPORT_C TInt | CreateIndex(const TDesC &, const TDesC &, const CDbKey &) |
TInt | CreateTable(const TDesC &, const CDbColSet &) |
TInt | CreateTable(const TDesC &, const CDbColSet &, const CDbKey &) |
IMPORT_C TInt | Destroy() |
IMPORT_C TInt | DropIndex(const TDesC &, const TDesC &) |
IMPORT_C TInt | DropTable(const TDesC &) |
IMPORT_C TInt | Execute(const TDesC &, TDbTextComparison) |
IMPORT_C TBool | InTransaction() |
IMPORT_C CDbIndexNames * | IndexNamesL(const TDesC &) |
IMPORT_C TBool | IsDamaged() |
IMPORT_C CDbKey * | KeyL(const TDesC &, const TDesC &) |
IMPORT_C TInt | Recover() |
IMPORT_C void | Rollback() |
IMPORT_C TSize | Size() |
IMPORT_C CDbTableNames * | TableNamesL() |
IMPORT_C TInt | UpdateStats() |
Private Member Functions | |
---|---|
IMPORT_C TInt | CreateTable(const TDesC &, const CDbColSet &, const CDbKey *) |
Protected Attributes | |
---|---|
RDbHandle< CDbDatabase > | iDatabase |
IMPORT_C TInt | AlterTable | ( | const TDesC & | aName, |
const CDbColSet & | aNewDef | |||
) |
IMPORT_C CDbColSet * | ColSetL | ( | const TDesC & | aName | ) | const |
const TDesC & aName |
IMPORT_C TInt | CreateIndex | ( | const TDesC & | aName, |
const TDesC & | aTable, | |||
const CDbKey & | aKey | |||
) |
TInt | CreateTable | ( | const TDesC & | aName, |
const CDbColSet & | aDef | |||
) | [inline] |
Creates a table on the database.
KErrNone The operation has completed successfully; KErrNoMemory, an out of memory condition has occurred; KErrAlreadyExists, a table with that name already exists; KErrArgument, empty column set, duplicated column name, invalid column length; KErrBadName, invalid table name, invalid column name (containing spaces for example); KErrNotSupported, unknown column type, unknown column attributes; KErrPermissionDenied, the caller does not satisfy the relevant database security policies. Note that other system-wide error codes may also be returned.
capability
Note For a secure shared database, the caller must satisfy the schema access policy for the database.
TInt | CreateTable | ( | const TDesC & | aName, |
const CDbColSet & | aDef, | |||
const CDbKey & | aPrimaryKey | |||
) | [inline] |
Creates a table on the database.
KErrNone The operation has completed successfully; KErrNoMemory, an out of memory condition has occurred; KErrAlreadyExists, a table with that name already exists; KErrArgument, empty column set, duplicated column name, invalid column length; KErrBadName, invalid table name, invalid column name (containing spaces for example); KErrNotSupported, unknown column type, unknown column attributes; KErrPermissionDenied, the caller does not satisfy the relevant database security policies. Note that other system-wide error codes may also be returned.
capability
Note For a secure shared database, the caller must satisfy the schema access policy for the database.
IMPORT_C TInt | CreateTable | ( | const TDesC & | aName, |
const CDbColSet & | aColSet, | |||
const CDbKey * | aPrimaryKey | |||
) | [private] |
IMPORT_C TInt | DropIndex | ( | const TDesC & | aName, |
const TDesC & | aTable | |||
) |
IMPORT_C TInt | Execute | ( | const TDesC & | aSql, |
TDbTextComparison | aComparison = EDbCompareNormal | |||
) |
const TDesC & aSql | |
TDbTextComparison aComparison = EDbCompareNormal |
IMPORT_C CDbIndexNames * | IndexNamesL | ( | const TDesC & | aTable | ) | const |
const TDesC & aTable |
IMPORT_C CDbKey * | KeyL | ( | const TDesC & | aName, |
const TDesC & | aTable | |||
) | const |