#include <DAMDBMS.H>
Link against:
damodl.lib
This item is not part of the S60 5th Edition SDK
Interface status: |
deprecated |
|
class CDaModel : public CBase;
Description
Database application engine.
The class:
-
wraps a store database (RDbStoreDatabase
) object: a database that stores data using a stream network within a store (a CStreamStore
). The class uses the standard database concepts, such as views, rows, indexes, and column sets: see the description of DBMS
for more information.
-
creates a SQL parameters object (CDaSqlParams
), which holds SQL queries for sorting, filtering, and searching the database
Derivation
CBase
-
Base class for all classes to be instantiated on the heap.
CDaModel
- Database application engine.
Members
Defined in CDaModel
:
Inherited from CBase
:
Construction and destruction
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C static CDaModel* NewL();
Description
Allocates and constructs a new database application engine.
Return value
CDaModel *
|
New database application engine
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C static CDaModel* NewL(CFileStore &fileStore);
Description
Allocates and constructs a new database application engine, initialising it from a store holding a store database.
The store database is found in the specified store, and opened.
Parameters
CFileStore &fileStore |
Store holding a store database
|
|
Return value
CDaModel *
|
New database application engine
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void Attach(MDaObserver *aObserver);
Description
Sets a database application engine observer.
Parameters
MDaObserver *aObserver |
Database application engine observer
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void CloseDatabase();
Description
Closes the object's store database if one is open.
NewDatabaseL(CStreamStore &)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void NewDatabaseL(CStreamStore &aStore);
Description
Creates and opens a new store database for the object.
The existing user column set is set for the new database.
Parameters
CStreamStore &aStore |
Store in which to write the new store database
|
|
ExternalizeL(RWriteStream &)const
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Externalises the engine setttings to a stream.
Parameters
InternalizeL(RReadStream &)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void InternalizeL(RReadStream &source);
Description
Internalises the engine setttings from a stream.
Parameters
OpenDatabaseL(CStreamStore &)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void OpenDatabaseL(CStreamStore &aStore);
Description
Opens an existing store database.
If a database is already open, it is closed.
Parameters
OpenDatabaseL(RDbStoreDatabase &,CStreamStore &)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void OpenDatabaseL(RDbStoreDatabase &aDatabase, CStreamStore &aStore);
Description
Opens and returns an existing store database.
If a database is already open, it is closed.
Parameters
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void CloseView();
Description
Closes the open database view and destroys the associated column set.
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void FirstL();
Description
Moves to the first row in the view.
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void LastL();
Description
Moves to the last row in the view.
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void NextL();
Description
Moves to the next row in the view.
If the position is already on the last row, it remains there.
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void PreviousL();
Description
Moves to the previous row in the view.
If the position is already on the first row, it remains there.
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void MoveToRowL(TInt aRow);
Description
Moves to a specified row in the view.
If the requested row is greater than the last row, the position is set to the last row. If the requested row in less than
the first row, the position is set to the first row.
Parameters
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TBool IsValid() const;
Description
Tests if a valid position in a valid view is set.
Return value
TBool
|
True if a valid view and position is set, otherwise false
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
inline const TPtrC& DefaultIndexName() const;
Description
Gets the default index name.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TInt AtRow();
Description
Gets the current row in the view.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TBool HasRDbView() const;
Description
Tests if a valid view is set.
Return value
TBool
|
True if a valid view is set, otherwise false
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TBool ViewHasRows() const;
Description
Tests if the view has any rows (i.e. is not empty).
Return value
TBool
|
True if the view has any rows, otherwise false
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TBool HasOpenDatabase() const;
Description
Tests if the object has an open database.
Return value
TBool
|
True if the object has an open database
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TInt DbRecordCount() const;
Description
Gets the stored record count variable (settable with CDaModel::SetDbRecordCountL()
).
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TInt RowSetCount() const;
Description
Gets the stored row set count variable (settable with CDaModel::SetRowSetCountL()
).
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline CDbColSet* ColSet() const;
Description
Gets the column definition set for the view.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline CDaUserDbDesc* UserDbDesc() const;
Description
Gets the object's database application helper object.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TInt CurrentRow() const;
Description
Gets the stored current row variable (settable with CDaModel::SetCurrentRow(TInt)
).
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline RDbDatabase& Database();
Description
Gets the current database.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TStreamId DbStreamId() const;
Description
Gets the ID of the stream in the store holding the database.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline TState RowPosState() const;
Description
Gets the result of the last row traversal operation.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline CDaSqlParams* SqlParams() const;
Description
Gets the SQL parameters object.
Return value
CDaSqlParams * |
SQL parameters object
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
inline CDbColSet* TableDef() const;
Description
Gets the column definition set for the database table.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline MDaObserver* RecordStatsWin();
Description
Gets the database observer set through CDaModel::SetRecordStatsWin(MDaObserver *)
.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline RDbView& View();
Description
Gets the database view.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline const RDbView& View() const;
Description
Gets the database view (const overload).
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline MDaObserver* Observer() const;
Description
Gets the database observer set through CDaModel::Attach(MDaObserver *)
.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline const CDaUndoStack& UndoStack() const;
Description
Gets the object's undo stack.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline const CDesCArray* YesNoArray() const;
Description
Gets the string array set by CDaModel::SetYesNoArray(const CDesCArray &)
.
The array is not used by the engine.
Return value
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void SetDbColNo();
Description
Sets the column number fields.
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void SetCurrentRow(TInt aCurrentRow);
Description
Sets the stored current row variable.
Parameters
TInt aCurrentRow |
Current row
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void RowPosState(TState aState);
Description
Sets the result of the last row traversal operation.
Parameters
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void SetDbRecordCountL();
Description
Sets the database record count variable to the number of rows in the current view.
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void SetRowSetCountL();
Description
Sets the database row set count variable to the number of rows in the current view.
SetRecordStatsWin(MDaObserver *)
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void SetRecordStatsWin(MDaObserver *anObserver);
Description
Sets the statistics window database engine observer.
The observer is called for every Put() operation.
Parameters
SetYesNoArray(const CDesCArray &)
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void SetYesNoArray(const CDesCArray &aYesNoArray);
Description
Sets the yes/no string array.
This is not used by the engine.
Parameters
AlterTable(CDaUserColSet *)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C TInt AlterTable(CDaUserColSet *aNewUserColSet);
Description
Changes the structure of a specified table in the database to the specified column set.
! for now
Parameters
Return value
See also:
CreateDatabaseL(CDaUserColSet *)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void CreateDatabaseL(CDaUserColSet *aUserColSet);
Description
Creates a new database with a specified column set.
An already open database is closed.
Parameters
CreateDatabaseL(CStreamStore *,CDaUserColSet *)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void CreateDatabaseL(CStreamStore *aStore, CDaUserColSet *aUserColSet);
Description
Creates and opens a new database with a specified column set.
Parameters
CreateIndex(const TDesC &,CDbKey *)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C TInt CreateIndex(const TDesC &anIndexName, CDbKey *aCDbKey);
Description
Creates a new index with the specified key.
Parameters
const TDesC16 &anIndexName |
The name of the index to create
|
CDbKey *aCDbKey |
The key for the new index
|
|
Return value
TInt
|
KErrNone if successful, or a system-wide or DBMS error code
|
|
See also:
HowManySteps(RDbIncremental &,CDaUserColSet *)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C TInt HowManySteps(RDbIncremental &anAlterTable, CDaUserColSet *aNewUserColSet);
Description
Initiates an incremental table alteration operation on a database.
Parameters
Return value
TInt
|
The initial step count for the incremental operation. This value should be passed in to subsequent calls to RDbIncremental::NextL().
|
|
BuildViewL(const TDesC &)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void BuildViewL(const TDesC &aFindString);
Description
Builds a database view asynchronously from the specified search string.
Parameters
const TDesC16 &aFindString |
Search string
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void BuildViewL();
Description
Builds a database view asynchronously from the last requested find string.
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void BuildViewSyncL();
Description
Builds a database view synchronously from the last requested find string.
BuildViewSyncL(const TDesC &)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void BuildViewSyncL(const TDesC &aFindString);
Description
Builds a database view synchronously from the specified search string.
Parameters
const TDesC16 &aFindString |
Search string
|
|
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void HandleFirstFindL();
Description
Called by the SQL statement evaluator on finding the first result.
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void DeleteRowL();
Description
Deletes the current row.
The delete operation is put on the undo stack.
It then moves to the next (or last) row in the view.
!! -1 if now rows in view
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void UndoDeleteRowL();
Description
Undoes the last delete operation.
Interface status: |
deprecated |
Inherited from: CDaModel |
inline void GetL();
Description
Gets the current row data for access using the view's column extractor functions.
See also:
RDbRowSet::GetL()
Gets the current row data for access using the column extractor functions. The c...
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void PutL();
Description
Completes the insertion of a row.
See also:
UpdateAllViewsL(MDaObserver::TNotification)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void UpdateAllViewsL(MDaObserver::TNotification=MDaObserver::EDefaultNotification);
Description
Sends a specified event to the database engine observer.
!late
Parameters
GoToBookmarkL(const TDbBookmark &)
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C void GoToBookmarkL(const TDbBookmark &aBookmark);
Description
! Only one view is active at any one time
Moves to the specified database bookmark.
Parameters
Interface status: |
deprecated |
Inherited from: CDaModel |
IMPORT_C static void Panic(TInt aReason);
Description
Produces a "DaModel" category panic.
Parameters
Interface status: |
deprecated |
|
TState
Description
Row traversal states.
Interface status: |
deprecated |
Inherited from: CDaModel |
MDaObserver * iDebugWin;
Description