#include <abstract_connection_manager.hh>
Inheritance diagram for uesqlc::TAbstractConnectionManager< TConnectionData, TResult >:
Public Methods | |
TAbstractConnectionManager (void) | |
Builds a new instance. | |
virtual | ~TAbstractConnectionManager (void) |
Destroys the instance. | |
void | bindConnection (const mpcl::text::TString &rkyCONNECTION_NAME, TConnectionData &rtCONNECTION) |
virtual void | diagnose (TResult tRESULT)=0 |
void | unbindConnection (const mpcl::text::TString kyCONNECTION_NAME) |
void | unbindCurrentConnection (void) |
Unbinds current connection (if any). | |
void | unbindAllConnections (void) |
Unbinds all connections. | |
virtual void | clearQueues (void) |
virtual void | clearResult (TResult tRESULT)=0 |
virtual TResult | execute (const mpcl::text::TString &rkySTATEMENT) |
virtual TResult | execute (const mpcl::text::TString &rkySTATEMENT, const mpcl::text::TString &rkyCONNECTION_NAME) |
virtual TResult | execute (const char *pkcSTATEMENT)=0 |
virtual TResult | execute (const char *pkcSTATEMENT, const char *pkyCONNECTION_NAME)=0 |
virtual void | executeClean (const char *pkcSTATEMENT) |
virtual void | finish (void) |
Finishes all managed issues. | |
virtual IType * | getFromOutputQueue (const size_t zINDEX) const |
virtual void | initialize (void) |
Initializes the default connection. | |
mpcl::text::TString | instantiate (const char *pkcSTATEMENT) |
mpcl::text::TString | instantiate (const mpcl::text::TString &rkySTATEMENT) |
virtual void | pushOnInputQueue (const IType &rktEMBEDDED_VALUE) |
virtual IType * | popFromOutputQueue (void) |
virtual void | pushOnOutputQueue (IType *ptSQL_DATA_TYPE) |
void | resetStatus (void) |
Resets SQL status variables. | |
void | setCurrentConnection (const mpcl::text::TString &rkyCONNECTION_NAME) |
virtual void | updateOutputVariables (void) |
TConnectionData & | getCurrentConnectionData (void) |
const mpcl::text::TString & | currentConnectionName (void) const |
virtual bool | existsDefaultConnection (void) const |
bool | isConnected (const mpcl::text::TString &rkyCONNECTION_NAME) const |
bool | isNotFoundCondition (void) const |
bool | isSqlerrorCondition (void) const |
Protected Types | |
typedef mpcl::util::collection::TMap< mpcl::text::TString, TConnectionData > | TConnectionDataMap |
Map type that binds connection names to connections. | |
Protected Attributes | |
int | iUniqueOrdinal |
Integer with the ordinal of the next unique connection name. | |
TConnectionDataMap | tConnectionDataMap |
Map that binds connection names to connections. | |
TConnectionData * | ptCurrentConnection |
Current connection (from tConnectionDataMap). | |
std::queue< mpcl::text::TString > | tInputEmbeddedVariableQueue |
Input embedded variable string values queue. | |
std::vector< IType * > | tOutputEmbeddedVariableVector |
Output embedded variable string pointers vector. | |
mpcl::text::TString | yCurrentConnection |
String with the identifier of the current connection. |
TConnectionData::TConnectionData (const TConnectionData& rktCONNECTION); void TConnectionData::close();
Definition at line 78 of file abstract_connection_manager.hh.
|
Binds in connection map, connection name rkyCONNECTION_NAME to rtCONNECTION.
Definition at line 138 of file abstract_connection_manager.hh. References mpcl::util::collection::TMap< mpcl::text::TString, TConnectionData >::bind(). |
|
Clears embedded variable containers. It must be called at the beginning of each new instruction. Definition at line 204 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tInputEmbeddedVariableQueue, and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tOutputEmbeddedVariableVector. Referenced by uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::finish(). |
|
Clears the result of the last executed statement. The diagnostic member functions, use that results to diagnose the execution. Referenced by uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::executeClean(). |
|
Returns the connection name for the current connection.
Definition at line 396 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::yCurrentConnection. |
|
Diagnoses statement result (tRESULT). It only cheks the result of the statement executed. This member function (diagnose()) updates properly SQL status variables.
|
|
Executes the statement pkcSTATEMENT instantiating the input embedded variables (tagged with '$z') in the determinate connection named rkyCONNECTION_NAME.
|
|
Executes the statement pkcSTATEMENT instantiating the input embedded variables (tagged with '$z').
|
|
Executes the statement rkySTATEMENT instantiating the input embedded variables (tagged with '$z') in the determinate connection named rkyCONNECTION_NAME.
Definition at line 237 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::execute(). |
|
Executes the statement rkySTATEMENT instantiating the input embedded variables (tagged with '$z').
Definition at line 225 of file abstract_connection_manager.hh. Referenced by uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::execute(), and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::executeClean(). |
|
Executes the statement pkcSTATEMENT instantiating the input embedded variables (tagged with '$z'). The result of the execution is omitted.
Definition at line 266 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::clearResult(), and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::execute(). |
|
Returns true if there is a default connection.
Definition at line 405 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::ptCurrentConnection. Referenced by uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::unbindCurrentConnection(). |
|
Returns the current connection data.
Definition at line 383 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::ptCurrentConnection. |
|
Gets a pointer to the SQL data type of the output embedded variable at position zINDEX in the output embedded variable vector. It must be called for writing results on output embedded variables.
Definition at line 287 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tOutputEmbeddedVariableVector. |
|
Returns a string that is result of instanting the input embedded variables (if any).
Definition at line 313 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::instantiate(). |
|
Returns a string that is result of instanting the input embedded variables (if any).
Definition at line 449 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tInputEmbeddedVariableQueue. Referenced by uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::instantiate(). |
|
Returns true if there is an active connection.
Definition at line 415 of file abstract_connection_manager.hh. References mpcl::util::collection::TMap< mpcl::text::TString, TConnectionData >::isBound(). |
|
Checks if a NOT FOUND condition has happened.
Definition at line 424 of file abstract_connection_manager.hh. References uesqlc::SQLSTATE. |
|
Checks if a SQLERROR condition has happened.
Definition at line 433 of file abstract_connection_manager.hh. References uesqlc::SQLCODE. |
|
Pops from the output embedded variable vector the last variable.
Definition at line 331 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tOutputEmbeddedVariableVector. |
|
Pushes an input embedded variable value into the input queue.
Definition at line 322 of file abstract_connection_manager.hh. References uesqlc::IType::get(), and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tInputEmbeddedVariableQueue. |
|
Pushes on the output embedded variable vector the variable reference rtSQL_DATA_TYPE.
Definition at line 344 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tOutputEmbeddedVariableVector. |
|
Sets current connection to connection named rkyCONNECTION_NAME.
Definition at line 476 of file abstract_connection_manager.hh. References mpcl::util::collection::TMap< mpcl::text::TString, TConnectionData >::isBound(), uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::ptCurrentConnection, uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::resetStatus(), uesqlc::SQLCODE, uesqlc::SQLMESSAGE, uesqlc::SQLSTATE, uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tConnectionDataMap, and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::yCurrentConnection. |
|
Unbinds connection named rkyCONNECTION_NAME.
Definition at line 158 of file abstract_connection_manager.hh. References uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::ptCurrentConnection, and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::yCurrentConnection. Referenced by uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::unbindAllConnections(), and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::unbindCurrentConnection(). |
|
Updates output variables (which have been updated passively using a temporary buffer). Definition at line 504 of file abstract_connection_manager.hh. References mpcl::util::logging::header(), mpcl::util::logging::tLog, and uesqlc::TAbstractConnectionManager< TConnectionData, TResult >::tOutputEmbeddedVariableVector. |