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