class CCommsDbTableView : public CBase |
The view on a specific table in the database.
Includes the necessary behaviour for navigating through the records in the view and reading and writing to columns within a record.
Uses a CCommsDatabase and has an RDbView to read from and write to database. Created via CCommsDatabase::OpenTableLC() (which opens a view of all the records in the table) or one of the OpenViewLC...() functions (which open a specific view of the table):
CCommsDatabase::OpenViewMatchingUintLC()
CCommsDatabase::OpenViewMatchingBoolLC()
CCommsDatabase::OpenViewMatchingTextLC()
Note that the above five functions have been withdrawn in CCommsDatabase and are now implemented in CCommsDatabaseBase.
Protected Member Functions | |
---|---|
void | Close() |
TDbColNo | ColNumL(const TDesC &) |
void | ConstructL(const TDesC &, TBool, TBool) |
void | ConstructL(const TDbQuery &, TBool) |
void | ConstructL(const TDesC &, const TDesC &, const TDesC8 &) |
void | ConstructL(const TDesC &, const TDesC &, const TDesC16 &) |
void | ConstructL(const TDesC &, const TDesC &, TUint32) |
void | ConstructL(const TDesC &, const TDesC &, TBool) |
void | ConstructL(TUint32, TCommDbConnectionDirection) |
void | ConstructL(TUint32) |
void | ConstructL(TUint32, const TDesC &) |
void | ConstructL(const TDesC &) |
RDbRowSet::TAccess | GetL() |
Private Member Functions | |
---|---|
TInt | DoInsertRecord(TBool, TUint32 &, TBool) |
TInt | DoPutRecordChanges(TBool, TBool, TBool) |
TInt | InsertTemplateRecord() |
TBool | TableWithTemplateRecord() |
Private Member Enumerations | |
---|---|
enum | TTableState { EClosed, EOpenIdle, EInsert, EUpdate } |
Protected Attributes | |
---|---|
CCommsDatabaseBase & | iDb |
CCommDbTableExtension * | iTableExt |
TBuf< KCommsDbSvrMaxColumnNameLength > | iTableName |
RDbView | iTableView |
Private Attributes | |
---|---|
TUint32 | iCurrentId |
TUint32 | iInsertedRecordIndex |
TTableState | iState |
CCommsDbTemplateRecord * | iTemplate |
TBool | iTsyNameChanged |
CCommsDbTableView | ( | CCommsDatabaseBase & | aDb, |
const TDesC & | aTableName | ||
) |
CCommsDatabaseBase & aDb | |
const TDesC & aTableName |
TDbColNo | ColNumL | ( | const TDesC & | aColumn | ) | const [protected] |
const TDesC & aColumn |
void | ConstructL | ( | const TDesC & | aTableName, |
TBool | aShowHidden, | |||
TBool | aUseTemplate | |||
) | [protected] |
void | ConstructL | ( | const TDbQuery & | aQuery, |
TBool | aUseTemplate | |||
) | [protected] |
void | ConstructL | ( | const TDesC & | aTableName, |
const TDesC & | aColumnToMatch, | |||
const TDesC8 & | aValueToMatch | |||
) | [protected] |
void | ConstructL | ( | const TDesC & | aTableName, |
const TDesC & | aColumnToMatch, | |||
const TDesC16 & | aValueToMatch | |||
) | [protected] |
void | ConstructL | ( | const TDesC & | aTableName, |
const TDesC & | aColumnToMatch, | |||
TUint32 | aValueToMatch | |||
) | [protected] |
void | ConstructL | ( | const TDesC & | aTableName, |
const TDesC & | aColumnToMatch, | |||
TBool | aValueToMatch | |||
) | [protected] |
void | ConstructL | ( | TUint32 | aBearerSet, |
TCommDbConnectionDirection | aDirection | |||
) | [protected] |
TUint32 aBearerSet | |
TCommDbConnectionDirection aDirection |
void | ConstructL | ( | TUint32 | aServiceId, |
const TDesC & | aServiceType | |||
) | [protected] |
void | ConstructL | ( | const TDesC & | aTableName | ) | [protected] |
const TDesC & aTableName |
TInt | DoInsertRecord | ( | TBool | aType, |
TUint32 & | aId, | |||
TBool | aIsTemplate | |||
) | [private] |
TInt | DoPutRecordChanges | ( | TBool | aHidden = EFalse, |
TBool | aReadOnly = EFalse, | |||
TBool | aIsTemplateCall = EFalse | |||
) | [private] |
void | GetTableName | ( | TDes & | aTableName | ) | const [inline] |
Gets the name of the table associated with this view and copies it into the descriptor supplied by the caller.
TDes & aTableName | A reference to a descriptor passed by the caller. On return from this function it contains the name of the table. |
IMPORT_C TInt | InsertCopyRecord | ( | TUint32 & | aId | ) |
Add a new record to this table. Filling all empty fields with values copied from record currently pointed at. The record number is returned. `PutRecordChanges()` is called to complete the transaction
TUint32 & aId |
CCommsDbTableView * | NewL | ( | CCommsDatabaseBase & | aDb, |
const TDesC & | aTableName, | |||
const TDbQuery & | aQuery, | |||
TBool | aUseTemplate = ETrue | |||
) | [static] |
CCommsDatabaseBase & aDb | |
const TDesC & aTableName | |
const TDbQuery & aQuery | |
TBool aUseTemplate = ETrue |
CCommsDbTableView * | NewL | ( | CCommsDatabaseBase & | aDb, |
const TDesC & | aTableName, | |||
const TDesC & | aColumnToMatch, | |||
const TDesC8 & | aValueToMatch | |||
) | [static] |
CCommsDatabaseBase & aDb | |
const TDesC & aTableName | |
const TDesC & aColumnToMatch | |
const TDesC8 & aValueToMatch |
CCommsDbTableView * | NewL | ( | CCommsDatabaseBase & | aDb, |
const TDesC & | aTableName, | |||
const TDesC & | aColumnToMatch, | |||
const TDesC16 & | aValueToMatch | |||
) | [static] |
CCommsDatabaseBase & aDb | |
const TDesC & aTableName | |
const TDesC & aColumnToMatch | |
const TDesC16 & aValueToMatch |
CCommsDbTableView * | NewL | ( | CCommsDatabaseBase & | aDb, |
const TDesC & | aTableName, | |||
const TDesC & | aColumnToMatch, | |||
TUint32 | aValueToMatch | |||
) | [static] |
CCommsDatabaseBase & aDb | |
const TDesC & aTableName | |
const TDesC & aColumnToMatch | |
TUint32 aValueToMatch |
CCommsDbTableView * | NewLC | ( | const TDesC & | aTableName, |
CCommsDatabaseBase & | aDb | |||
) | [static] |
const TDesC & aTableName | |
CCommsDatabaseBase & aDb |
CCommsDbTableView * | NewLC | ( | CCommsDatabaseBase & | aDb, |
const TDesC & | aTableName, | |||
TBool | aUseTamplate = ETrue | |||
) | [static] |
CCommsDatabaseBase & aDb | |
const TDesC & aTableName | |
TBool aUseTamplate = ETrue |
CCommsDbTableView * | NewLC | ( | CCommsDatabaseBase & | aDb, |
const TDesC & | aTableName, | |||
const TDesC & | aColumnToMatch, | |||
TBool | aValueToMatch | |||
) | [static] |
CCommsDatabaseBase & aDb | |
const TDesC & aTableName | |
const TDesC & aColumnToMatch | |
TBool aValueToMatch |
CCommsDbTableView * | NewLC | ( | CCommsDatabaseBase & | aDb, |
TUint32 | aBearerSet, | |||
TCommDbConnectionDirection | aDirection | |||
) | [static] |
CCommsDatabaseBase & aDb | |
TUint32 aBearerSet | |
TCommDbConnectionDirection aDirection |
CCommsDbTableView * | NewLC | ( | CCommsDatabaseBase & | aDb, |
TUint32 | aNetworkId | |||
) | [static] |
CCommsDatabaseBase & aDb | |
TUint32 aNetworkId |
CCommsDbTableView * | NewLC | ( | CCommsDatabaseBase & | aDb, |
TUint32 | aServiceId, | |||
const TDesC & | aServiceType | |||
) | [static] |
CCommsDatabaseBase & aDb | |
TUint32 aServiceId | |
const TDesC & aServiceType |
IMPORT_C TInt | PutRecordChanges | ( | TBool | aHidden = EFalse, |
TBool | aReadOnly = EFalse | |||
) |
IMPORT_C void | ReadColumnLengthL | ( | const TDesC & | aColumn, |
TInt & | aLength | |||
) |
IMPORT_C void | ReadColumnMaxLengthL | ( | const TDesC & | aColumn, |
TInt & | aLength | |||
) |
IMPORT_C HBufC * | ReadLongTextLC | ( | const TDesC & | aColumn | ) |
const TDesC & aColumn |
IMPORT_C void | ReadTypeAttribL | ( | const TDesC & | aColumn, |
TDbColType & | aColType, | |||
TUint32 & | aAttrib | |||
) |
const TDesC & aColumn | |
TDbColType & aColType | |
TUint32 & aAttrib |
IMPORT_C TInt | UpdateRecord | ( | ) |
Modify the current record of this view. `PutRecordChanges()` is called to complete the transaction
IMPORT_C void | WriteBoolL | ( | const TDesC & | aColumn, |
const TBool & | aValue | |||
) |
IMPORT_C void | WriteLongTextL | ( | const TDesC & | aColumn, |
const TDesC & | aValue | |||
) |
IMPORT_C void | WriteTextL | ( | const TDesC & | aColumn, |
const TDesC8 & | aValue | |||
) |
IMPORT_C void | WriteTextL | ( | const TDesC & | aColumn, |
const TDesC16 & | aValue | |||
) |
IMPORT_C void | WriteUintL | ( | const TDesC & | aColumn, |
const TUint32 & | aValue | |||
) |
TBuf< KCommsDbSvrMaxColumnNameLength > | iTableName | [protected] |