DCL 3.7.4
Loading...
Searching...
No Matches
PqConnection.h
Go to the documentation of this file.
1#ifndef __DCL_PQ_CONNECTION_H__
2#define __DCL_PQ_CONNECTION_H__ 20260106
3
4__DCL_BEGIN_NAMESPACE
5
7{
9protected:
10 PGconn* __conn;
11 int __cursor;
12 int __stmtNo;
13 ByteString __lastErrorMessage;
14
15public:
16 PGconn* connHandle() const;
17 int cursor() const;
18 int stmtNo();
19
20 void setErrorMessage(
21 const ByteString& _message,
22 const wchar_t* _filename, int _line
23 );
24
25public:
26 // interface implementation
27 virtual void destroy();
28 PqConnection(const wchar_t* _serverTitle);
29 virtual ~PqConnection();
30 virtual bool __open(const char* _conns, size_t _connslen);
31 virtual bool __close();
32 virtual bool __execute(const char* _sql, size_t _sqllen);
33 virtual bool __startTrans();
34 virtual bool __commitTrans();
35 virtual bool __rollbackTrans();
36 virtual bool __createQueryInstance(SQL::Query** _queryHandleOut);
37 virtual bool __getErrorMessage(char* _buf, size_t* _buflen);
38 virtual bool __getServerInfo(char* _buf, size_t* _buflen);
39};
40
41inline PGconn* PqConnection::connHandle() const
42{
43 return __conn;
44}
45
46inline int PqConnection::cursor() const
47{
48 return __cursor;
49}
50
52{
53 return ++__stmtNo;
54}
55
57 const ByteString& _message,
58 const wchar_t* _filename, int _line
59 )
60{
61 Connection::setErrorStatus(SQL::eServerError, _filename, _line);
62 __lastErrorMessage = _message;
63}
64
65__DCL_END_NAMESPACE
66
67#endif // __DCL_PQ_CONNECTION_H__
#define DECLARE_CLASSINFO(class_name)
Definition Object.h:227
PqConnection(const wchar_t *_serverTitle)
virtual bool __open(const char *_conns, size_t _connslen)
int cursor() const
virtual bool __getServerInfo(char *_buf, size_t *_buflen)
virtual void destroy()
virtual bool __getErrorMessage(char *_buf, size_t *_buflen)
void setErrorMessage(const ByteString &_message, const wchar_t *_filename, int _line)
virtual bool __close()
virtual bool __execute(const char *_sql, size_t _sqllen)
PGconn * connHandle() const
virtual bool __commitTrans()
virtual bool __createQueryInstance(SQL::Query **_queryHandleOut)
virtual bool __startTrans()
virtual bool __rollbackTrans()
virtual ~PqConnection()
_PROTECTED const wchar_t * _filename
Definition SQLCore.h:439
_PROTECTED const wchar_t int _line
Definition SQLCore.h:441
@ eServerError
Definition SQLCore.h:21