fintp_udal
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FinTP::PostgresDatabase Class Reference

#include <PostgresDatabase.h>

Inheritance diagram for FinTP::PostgresDatabase:

Public Member Functions

 PostgresDatabase ()
 
 ~PostgresDatabase ()
 
DataSetExecuteQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, bool holdCursor, const unsigned int fetchRows)
 Execute Query SQL statements ( without params ) More...
 
DataSetExecuteQueryCached (const DataCommand::COMMAND_TYPE commType, const string &stringStatement, const bool onCursor, const unsigned int fetchRows)
 Query SQL statements ( without params ) and use caching More...
 
DataSetExecuteQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters, bool holdCursor, const unsigned int fetchRows)
 Execute Query SQL statements ( with params ) More...
 
DataSetExecuteQueryCached (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters, const bool holdCursor, const unsigned int fetchRows)
 Execute Query SQL statements ( with params ) and use caching. More...
 
- Public Member Functions inherited from FinTP::ODBCDatabase
 ODBCDatabase ()
 
virtual ~ODBCDatabase ()
 
virtual void BeginTransaction (const bool readonly)
 Starts a transaction. More...
 
virtual void EndTransaction (const TransactionType::TRANSACTION_TYPE transactionType, const bool throwOnError)
 Ends a transaction. More...
 
void Connect (const ConnectionString &connectionString)
 Connects using the given connection string. More...
 
void Disconnect ()
 Disconnects and release connection resources. More...
 
virtual bool IsConnected ()
 Query if Database instance is connected. More...
 
void ExecuteNonQuery (const DataCommand::COMMAND_TYPE commType, const string &stringStatement, bool onCursor)
 Execute NonQuery SQL statements or stored procedures ( without params ) More...
 
void ExecuteNonQueryCached (const DataCommand::COMMAND_TYPE commType, const string &stringStatement, bool onCursor)
 Execute NonQueryCached SQL statements or stored procedures ( without params ) and use caching. More...
 
void ExecuteNonQuery (const DataCommand::COMMAND_TYPE commType, const string &stringStatement, const ParametersVector &vectorOfParameters, bool onCursor)
 Execute NonQuery SQL statements or stored procedures ( with params ) More...
 
void ExecuteNonQueryCached (const DataCommand::COMMAND_TYPE commType, const string &stringStatement, const ParametersVector &vectorOfParameters, bool onCursor)
 Execute NonQueryCached SQL statements or stored procedures ( with params ) and use caching. More...
 
void ReleaseCursor (const bool checkConn)
 If onCursor=true is passed to ExecuteQuery methods, a client is required to use these methods to release cursor resources. More...
 
void RewindCursor ()
 Rewind cursor to the first position. More...
 
bool CursorHeld () const
 Determines if we can hold the cursor. More...
 
- Public Member Functions inherited from FinTP::Database
 Database ()
 
virtual ~Database ()
 
void BeginTransaction ()
 
void EndTransaction (const TransactionType::TRANSACTION_TYPE transactionType)
 
void ExecuteNonQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement)
 
void ExecuteNonQueryCached (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement)
 
void ExecuteNonQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters)
 
void ExecuteNonQueryCached (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters)
 
DataSetExecuteQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, bool holdCursor)
 
DataSetExecuteQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement)
 
DataSetExecuteQueryCached (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, bool holdCursor)
 
DataSetExecuteQueryCached (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement)
 
DataSetExecuteQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters, bool holdCursor)
 
DataSetExecuteQuery (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters)
 
DataSetExecuteQueryCached (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters, bool holdCursor)
 
DataSetExecuteQueryCached (const DataCommand::COMMAND_TYPE commandType, const string &stringStatement, const ParametersVector &vectorOfParameters)
 
void ReleaseCursor ()
 
int getLastNumberofAffectedRows () const
 

Private Member Functions

DataSetExecuteQuery (const DataCommand &query, const ParametersVector &vectorOfParameters, bool holdCursor, const unsigned int fetchRows)
 
string callFormating (const string &statementString, const ParametersVector &vectorOfParameters)
 

Additional Inherited Members

- Static Public Member Functions inherited from FinTP::Database
static void DisplayDataSet (const DataSet *theDataSet)
 Utility method used to pretty print DataSet objects. More...
 
static
XERCES_CPP_NAMESPACE_QUALIFIER
DOMDocument * 
ConvertToXML (const DataSet *theDataSet, const bool doTrimm=true)
 Utility method that converts DataSet parameter objects to following XML format: <TableName> <Record> <Column_Name_n>Column_Value_n<Column_Name_n> </Record> </TableName> More...
 
- Static Public Attributes inherited from FinTP::Database
static string DateFormat = "DD.MM.YYYY"
 Used to convert a date/timestamp column to a string format database specific formats. More...
 
static string TimestampFormat = "DD.MM.YYYY HH:MI"
 
- Protected Member Functions inherited from FinTP::ODBCDatabase
bool isEnvAllocated () const
 
SQLRETURN AllocateEnv ()
 
bool isDbcAllocated () const
 
void BindParams (const ParametersVector &vectorOfParameters, SQLHANDLE *statementHandle=NULL, const unsigned int startIndex=1)
 
DataSetinnerExecuteCommand (const DataCommand &command, const ParametersVector &vectorOfParameters, const bool useCursor=false, const unsigned int fetchRows=0)
 
DataSetexecuteQuery (DataCommand &command, const bool isCommandCached, SQLHANDLE *statementHandle, const bool useCursor, const unsigned int fetchRows=0)
 
DataSetgetDataSet (DataCommand &command, const bool isCommandCached, SQLHANDLE *statementHandle, const bool useCursor, const unsigned int fetchRows=0)
 
void executeNonQuery (DataCommand &command, const bool isCommandCached, SQLHANDLE *statementHandle, const bool useCursor)
 
virtual string getErrorInformation (SQLSMALLINT htype, SQLHANDLE handle)
 
virtual void setSpecificConnAttr ()
 
virtual void setSpecificEnvAttr ()
 
- Static Protected Member Functions inherited from FinTP::ODBCDatabase
static int getODBCTransactionType (TransactionType::TRANSACTION_TYPE type)
 
- Protected Attributes inherited from FinTP::ODBCDatabase
SQLHANDLE m_Henv
 
bool m_HenvAllocated
 
bool m_IsConnected
 
SQLHANDLE m_Hdbc
 
bool m_HdbcAllocated
 
SQLHANDLE m_Hstmt
 
SQLHANDLE m_HoldCursorHandle
 
string m_HoldCursorName
 
bool m_HoldCursorInvoked
 

Constructor & Destructor Documentation

FinTP::PostgresDatabase::PostgresDatabase ( )
inline
FinTP::PostgresDatabase::~PostgresDatabase ( )
inline

Member Function Documentation

string FinTP::PostgresDatabase::callFormating ( const string &  statementString,
const ParametersVector vectorOfParameters 
)
privatevirtual

Reimplemented from FinTP::ODBCDatabase.

DataSet * FinTP::PostgresDatabase::ExecuteQuery ( const DataCommand::COMMAND_TYPE  commType,
const string &  stringStatement,
bool  onCursor,
const unsigned int  fetchRows 
)
virtual

Execute Query SQL statements ( without params )

Parameters
commTypetype COMMAND_TYPE. The command type.
stringStatementtype string. The statement.
onCursortype bool. Determine if the function will use an Oracle cursor to iterate through the results.
fetchRowstype int. The row number used in where clause.

Reimplemented from FinTP::ODBCDatabase.

DataSet * FinTP::PostgresDatabase::ExecuteQuery ( const DataCommand::COMMAND_TYPE  commType,
const string &  stringStatement,
const ParametersVector vectorOfParameters,
bool  onCursor,
const unsigned int  fetchRows 
)
virtual

Execute Query SQL statements ( with params )

Parameters
commTypetype COMMAND_TYPE. The command type.
stringStatementtype string. The statement.
vectorOfParameterstype ParametersVector. The vector of parameters. Used when multiple parameters are needed.
onCursortype bool. Determine if the function will use a cursor to iterate through the results.
fetchRowstype int. The row number used in where clause.

Reimplemented from FinTP::ODBCDatabase.

DataSet * FinTP::PostgresDatabase::ExecuteQuery ( const DataCommand query,
const ParametersVector vectorOfParameters,
bool  holdCursor,
const unsigned int  fetchRows 
)
private
DataSet * FinTP::PostgresDatabase::ExecuteQueryCached ( const DataCommand::COMMAND_TYPE  commType,
const string &  stringStatement,
const bool  onCursor,
const unsigned int  fetchRows 
)
virtual

Query SQL statements ( without params ) and use caching

Parameters
commTypetype COMMAND_TYPE. The command type.
stringStatementtype string. The statement.
onCursortype bool. Determine if the function will use a cursor to iterate through the results.
fetchRowstype int. The row number used in where clause.

Reimplemented from FinTP::ODBCDatabase.

DataSet * FinTP::PostgresDatabase::ExecuteQueryCached ( const DataCommand::COMMAND_TYPE  commType,
const string &  stringStatement,
const ParametersVector vectorOfParameters,
const bool  onCursor,
const unsigned int  fetchRows 
)
virtual

Execute Query SQL statements ( with params ) and use caching.

Parameters
commTypetype COMMAND_TYPE. The command type.
stringStatementtype string. The statement.
vectorOfParameterstype ParametersVector. The vector of parameters. Used when multiple parameters are needed.
onCursortype bool. Determine if the function will use a cursor to iterate through the results.
fetchRowstype int. The row number used in where clause.

Reimplemented from FinTP::ODBCDatabase.


The documentation for this class was generated from the following files: