#include <DbiConnectionMaintainer.h>
Public Member Functions | |
| DbiConnectionMaintainer (DbiCascader *cascader=0) | |
| virtual | ~DbiConnectionMaintainer () |
Private Attributes | |
| DbiCascader * | fCascader |
| May be null if made by (useless) default ctor. | |
DatabaseInterface
Contact: n.west1@physics.ox.ac.uk
Definition at line 27 of file DbiConnectionMaintainer.h.
|
|
Definition at line 17 of file DbiConnectionMaintainer.cxx. 00017 {
00018
00019 // For database connections that are not permanent, the connection is
00020 // closed as soon as the last associated DbiStatement is
00021 // deleted. However, standard context queries involve several separate
00022 // SQL queries, each using its own DbiStatement and hence each involving
00023 // a separate connection. To maintain a single connection for the entire
00024 // set of SQL queries a DbiConnectionMaintainer can be use. On creation
00025 // it connects to every DbiConnection which prevents it from closing. On
00026 // destruction it disconnects from them allowing them to close, if
00027 // temporary, once any other associated DbiStatement has been deleted.
00028
00029 LEA_CTOR //Leak Checker
00030
00031 MSG("Dbi", Msg::kVerbose) << "Creating DbiConnectionMaintainer" << endl;
00032
00033 fCascader = cascader;
00034 if ( fCascader ) fCascader->HoldConnections();
00035
00036 }
|
|
|
Definition at line 40 of file DbiConnectionMaintainer.cxx. References fCascader, LEA_DTOR, MSG, and DbiCascader::ReleaseConnections(). 00040 {
00041
00042 if ( fCascader ) fCascader->ReleaseConnections();
00043
00044 LEA_DTOR //Leak Checker
00045
00046 MSG("Dbi", Msg::kVerbose) << "Destroying DbiConnectionMaintainer" << endl;
00047
00048 }
|
|
|
May be null if made by (useless) default ctor.
Definition at line 42 of file DbiConnectionMaintainer.h. Referenced by ~DbiConnectionMaintainer(). |
1.3.9.1