|
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 // Class CDbTableIndexDef |
|
17 inline const TDesC& CDbTableIndexDef::Name() const |
|
18 {return *iName;} |
|
19 inline const CDbKey& CDbTableIndexDef::Key() const |
|
20 {return iKey;} |
|
21 inline CDbKey& CDbTableIndexDef::Key() |
|
22 {return iKey;} |
|
23 // Class RDbIndexes |
|
24 inline void RDbIndexes::Add(CDbTableIndexDef* aDef) |
|
25 {iRep.AddLast(*aDef);} |
|
26 inline void RDbIndexes::Remove(CDbTableIndexDef* aDef) |
|
27 {iRep.Remove(*aDef);} |
|
28 inline const TSglQueBase& RDbIndexes::AsQue() const |
|
29 {return iRep;} |
|
30 |
|
31 //Class TDbColumnDef |
|
32 inline TDbColType TDbColumnDef::Type() const |
|
33 {return TDbColType(iType);} |
|
34 |
|
35 // Class HDbColumnSet |
|
36 inline HDbColumnSet::TIterator HDbColumnSet::Begin() |
|
37 {return &iColumns[0];} |
|
38 inline HDbColumnSet::TIteratorC HDbColumnSet::Begin() const |
|
39 {return &iColumns[0];} |
|
40 inline HDbColumnSet::TIteratorC HDbColumnSet::End() const |
|
41 {return iEnd;} |
|
42 inline TBool HDbColumnSet::HasLongColumns() const |
|
43 {return iAttributes&ELongColumns;} |
|
44 inline TBool HDbColumnSet::HasAutoIncrement() const |
|
45 {return iAttributes&EAutoIncrement;} |
|
46 inline const TDbColumnDef& HDbColumnSet::operator[](TDbColNo aColNo) const |
|
47 {return iColumns[aColNo-1];} |
|
48 |
|
49 // Class CDbTableDef |
|
50 inline const HDbColumnSet& CDbTableDef::Columns() const |
|
51 {return *iColumns;} |
|
52 inline HDbColumnSet& CDbTableDef::Columns() |
|
53 {return *iColumns;} |
|
54 inline const TDesC& CDbTableDef::Name() const |
|
55 {return *iName;} |
|
56 inline RDbIndexes& CDbTableDef::Indexes() |
|
57 {return iIndexes;} |
|
58 inline const RDbIndexes& CDbTableDef::Indexes() const |
|
59 {return iIndexes;} |
|
60 inline const CDbTableIndexDef* CDbTableDef::Key(const TDesC& aColumn) const |
|
61 {return FindKey(aColumn,ETrue);} |
|
62 inline TBool CDbTableDef::IsIndexed(const TDesC& aColumn) const |
|
63 {return FindKey(aColumn,EFalse)!=NULL;} |
|
64 |
|
65 // Class RDbTableSchema |
|
66 inline void RDbTableSchema::Add(CDbTableDef* aDef) |
|
67 {iRep.AddLast(*aDef);} |
|
68 inline RDbTableSchema::operator TSglQueBase&() |
|
69 {return iRep;} |
|
70 inline void RDbTableSchema::Loaded() |
|
71 {iLoaded=ETrue;} |
|
72 inline TBool RDbTableSchema::IsEmpty() const |
|
73 {return iRep.IsEmpty();} |
|
74 |
|
75 // Class TDbGenerationMark |
|
76 inline void TDbGenerationMark::Construct(const TDbGeneration& aGeneration) |
|
77 {iGeneration=&aGeneration;iMark=aGeneration;} |
|
78 inline void TDbGenerationMark::Mark() |
|
79 {iMark=*iGeneration;} |
|
80 inline TBool TDbGenerationMark::Changed() const |
|
81 {return iMark!=*iGeneration;} |
|
82 // Class CDbTable |
|
83 inline TBool CDbTable::IsActive() const |
|
84 {return iDatabase!=0;} |
|
85 inline const CDbTableDef& CDbTable::Def() const |
|
86 {__ASSERT_DEBUG(iDef,User::Invariant());return *iDef;} |
|
87 inline CDbTableDatabase& CDbTable::Database() |
|
88 {__ASSERT_DEBUG(iDatabase,User::Invariant());return *iDatabase;} |
|
89 inline const TDbGeneration& CDbTable::Generation() const |
|
90 {return iGeneration;} |
|
91 // Class RDbTableRow |
|
92 inline RDbTableRow::RDbTableRow() |
|
93 : iTable(0) |
|
94 {} |
|
95 inline CDbTable& RDbTableRow::Table() const |
|
96 {return *iTable;} |
|
97 |
|
98 // Class CDbTableDatabase |
|
99 inline RDbTransaction& CDbTableDatabase::Transaction() |
|
100 {return iTransaction;} |
|
101 inline RDbTableSchema& CDbTableDatabase::Schema() |
|
102 {return iSchema;} |
|
103 // Class CDbTableDatabase::CBuildIndex |
|
104 inline CDbRecordIndex& CDbTableDatabase::CBuildIndex::Index() |
|
105 {return *iIndex;} |