persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.inl
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2006-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 // Closes the database handle.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalComponent
       
    20 */
       
    21 inline void CloseDbHandle(sqlite3* aDbHandle)
       
    22 	{
       
    23 	if(aDbHandle)
       
    24 		{
       
    25 		(void)sqlite3_close(aDbHandle);
       
    26 		}
       
    27 	}
       
    28 
       
    29 /**
       
    30 CloseDbCleanup() function is used to close the sqlite3 handle (aDbHandle parameter)
       
    31 and may be called during cleanup stack unwinding process.
       
    32 
       
    33 @internalComponent
       
    34 */
       
    35 inline void CloseDbCleanup(void* aDbHandle)
       
    36 	{
       
    37 	CloseDbHandle(reinterpret_cast <sqlite3*> (aDbHandle));
       
    38 	}