applayerpluginsandutils/uripermissionservices/server/inc/sqldbtransaction.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2007-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 #ifndef __SQLDBTRANSACTION_H__
       
    17 #define __SQLDBTRANSACTION_H__
       
    18 
       
    19 #include <sqldb.h>
       
    20 #include "dbaccessor.h"
       
    21 
       
    22 /**
       
    23 This class manages the SQL transactions. The SQL statements will be executed with the methods
       
    24 provided in this class.
       
    25 */
       
    26 class CSqlDbTransaction : 	private CBase, 
       
    27 							public MDBTransaction
       
    28 	{
       
    29 	public:
       
    30 		static MDBTransaction* NewL ( RSqlDatabase& aDb, const TDesC8& aQueryStmt );
       
    31 				
       
    32 		// Methods from MDBTransaction
       
    33 		void BindTextL ( TInt aParamPos, const TDesC8& aParamValue );				
       
    34 		void BindIntL ( TInt aParamPos, TInt aParamValue );
       
    35 		TInt ExecuteL ();
       
    36 		TPtrC8 ColumnTextL ( TInt aFieldPos );
       
    37 		TInt ColumnIntL ( TInt aFieldPos );
       
    38 		TBool Next ();
       
    39 		void Release ();
       
    40 	private:
       
    41 		CSqlDbTransaction (  );
       
    42 		~CSqlDbTransaction ();		
       
    43 		void ConstructL ( RSqlDatabase& aDb, const TDesC8& aQueryStmt );				
       
    44 	private:
       
    45 		RSqlStatement 	iStatement;
       
    46 	};
       
    47 
       
    48 #endif // __SQLDBACCESSOR_H__