62 NoCaseMap parseConnectionStr(
const string & i_connectionStr);
65 virtual void cleanup(
void)
noexcept = 0;
68 virtual void validateConnectionProps(
void) = 0;
76 template<
typename TContainer>
base class for database connection wrapper
Definition: dbExecBase.h:20
~DbExecBase(void) noexcept
cleanup connection resources.
Definition: dbExecBase.h:26
static void runSqlScript(IDbExec *i_dbExec, const string &i_sqlScript)
parse and execute list of sql statements.
Definition: dbExecBase.cpp:199
bool isTransactionNonOwn(void)
return true if other thread have active transaction.
Definition: dbExecBase.cpp:51
long long longConnProperty(const string &i_key, long i_default) const
return long value of connection property or default value if key not found (case neutral).
Definition: dbExecBase.cpp:91
string strConnProperty(const string &i_key) const
return string value of connection property by key (case neutral) or empty "" string if key not found.
Definition: dbExecBase.cpp:77
NoCaseMap connProps
connection properties as key+value string pairs (case neutral).
Definition: dbExecBase.h:36
void setTransactionActive(void)
set transaction ownership status.
Definition: dbExecBase.cpp:59
bool isTransaction(void)
return true in transaction scope.
Definition: dbExecBase.cpp:33
bool boolConnProperty(const string &i_key) const
return true if value of connection property is 'true', 'yes', '1' (case neutral).
Definition: dbExecBase.cpp:83
thread::id trxThreadId
if true then transaction is active
Definition: dbExecBase.h:33
void releaseTransaction(void)
release transaction: clean active transaction status.
Definition: dbExecBase.cpp:68
DbExecBase(const string &i_connectionStr)
prepare to open new db-connection.
Definition: dbExecBase.cpp:16
database connection wrapper to execute sql commands.
Definition: dbExec.h:21
public interafce for row processing during select, ie: select and append to row list
Definition: dbCommon.h:181
row processor to append rows to sequence container, ie: to list or vector
Definition: dbExecBase.h:78
void processRow(IRowBaseUptr &i_row) override
append row to sequence container, ie: to list or vector
Definition: dbExecBase.h:82
TContainer rowContainer
row container
Definition: dbExecBase.h:85
OpenM++ data library: public interface.
OpenM++ common helper utilities.
openM++ namespace
Definition: log.h:32
std::unique_ptr< IRowBase > IRowBaseUptr
unique pointer to db row
Definition: omHelper.h:236
std::map< std::string, std::string, LessNoCase > NoCaseMap
map of key-value strings with case neutral key search
Definition: omHelper.h:224
recursive_mutex dbMutex
mutex to lock database operations
Definition: dbExecBase.cpp:13