TDbiConnectionMaintainer.cxx File Reference

#include "TDbiCascader.hxx"
#include "TDbiConnectionMaintainer.hxx"
#include <TSK_DBI_Log.hxx>
#include <MsgFormat.h>
Include dependency graph for TDbiConnectionMaintainer.cxx:

Go to the source code of this file.

Functions

 ClassImp (TDbiConnectionMaintainer) TDbiConnectionMaintainer

Function Documentation

ClassImp ( TDbiConnectionMaintainer   ) 

Definition at line 10 of file TDbiConnectionMaintainer.cxx.

References SK_DBI_Trace.

00017                                                                          {
00018 
00019 // For database connections that are not permanent, the connection is
00020 // closed as soon as the last associated TDbiStatement is
00021 // deleted. However, standard context queries involve several separate
00022 // SQL queries, each using its own TDbiStatement and hence each involving
00023 // a separate connection.  To maintain a single connection for the entire
00024 // set of SQL queries a TDbiConnectionMaintainer can be use.  On creation
00025 // it connects to every TDbiConnection which prevents it from closing.  On
00026 // destruction it disconnects from them allowing them to close, if
00027 // temporary, once any other associated TDbiStatement.hxxas been deleted.
00028 
00029 
00030   SK_DBI_Trace( "Creating TDbiConnectionMaintainer" << "  ");
00031 
00032   fCascader = cascader;
00033   if ( fCascader ) fCascader->HoldConnections();
00034 
00035 }


Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1