Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 // Class CSqlCreateTableStatement
22 CDbIncremental* CSqlCreateTableStatement::ExecuteL(CDbDatabase& aDatabase,TDbTextComparison,TInt& aStep)
24 aDatabase.CreateTableL(iName,iColumns,0);
29 // Class CSqlDropTableStatement
31 CDbIncremental* CSqlDropTableStatement::ExecuteL(CDbDatabase& aDatabase,TDbTextComparison,TInt& aStep)
33 return aDatabase.DropTableL(iName,aStep);
36 // Class CSqlAlterTableStatement
38 CSqlAlterTableStatement::~CSqlAlterTableStatement()
43 CDbIncremental* CSqlAlterTableStatement::ExecuteL(CDbDatabase& aDatabase,TDbTextComparison,TInt& aStep)
45 CDbColSet* set=CDbColSet::NewLC();
46 aDatabase.ColumnsL(*set,iName);
47 TInt todrop=iDrop.Count();
48 for (TDbColSetIter iter(*set);iter;++iter)
58 if (iter->iName.CompareF(iDrop[ii])==0)
67 __LEAVE(KErrNotFound);
68 CleanupStack::PopAndDestroy(); // set
69 return aDatabase.AlterTableL(iName,iAdd,aStep);
72 // Class CSqlCreateIndexStatement
74 CDbIncremental* CSqlCreateIndexStatement::ExecuteL(CDbDatabase& aDatabase,TDbTextComparison aComparison,TInt& aStep)
76 iKey.SetComparison(aComparison);
77 return aDatabase.CreateIndexL(iName,iTable,iKey,aStep);
80 // Class CSqlDropIndexStatement
82 CDbIncremental* CSqlDropIndexStatement::ExecuteL(CDbDatabase& aDatabase,TDbTextComparison,TInt& aStep)
84 return aDatabase.DropIndexL(iName,iTable,aStep);