equal
deleted
inserted
replaced
|
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 // Evaluation tree base classes |
|
15 // |
|
16 // |
|
17 |
|
18 #include "UQ_STD.H" |
|
19 |
|
20 // class CSqlQuery |
|
21 |
|
22 CSqlQuery::CSqlQuery() |
|
23 {} |
|
24 |
|
25 CSqlQuery::~CSqlQuery() |
|
26 { |
|
27 iColumns.Close(); |
|
28 delete iSearchCondition; |
|
29 delete iSortSpecification; |
|
30 } |
|
31 |
|
32 CDbKey& CSqlQuery::SortSpecificationL() |
|
33 { |
|
34 CDbKey* key=iSortSpecification; |
|
35 if (!key) |
|
36 iSortSpecification=key=CDbKey::NewL(); |
|
37 return *key; |
|
38 } |
|
39 |
|
40 void CSqlQuery::RemovePredicate(CSqlCompPredicate* aNode) |
|
41 { |
|
42 CSqlSearchCondition::TType type=iSearchCondition->NodeType(); |
|
43 if (type>CSqlSearchCondition::ENotLike && type<CSqlSearchCondition::ENotEqual) |
|
44 { |
|
45 delete iSearchCondition; |
|
46 iSearchCondition=0; |
|
47 } |
|
48 else if (type==CSqlSearchCondition::EAnd) |
|
49 { |
|
50 CSqlMultiNode* multiNode=iSearchCondition->MultiNode(); |
|
51 multiNode->Remove(aNode); |
|
52 iSearchCondition=CSqlMultiNode::Reduce(multiNode); |
|
53 } |
|
54 else |
|
55 __ASSERT(0); |
|
56 } |
|
57 |
|
58 |
|
59 // class CSqlSearchCondition |
|
60 |
|
61 CSqlSearchCondition::CSqlSearchCondition(TType aType) |
|
62 : iType(aType) |
|
63 { |
|
64 iIsEscape = EFalse; |
|
65 } |
|
66 |