nodejs-db-informix
master
nodejs bindings for Informix
Main Page
Related Pages
Classes
Files
File List
All
Classes
Functions
Pages
src
connection.h
1
#ifndef __INF_CONNECTION_H_INCLUDED__
2
#define __INF_CONNECTION_H_INCLUDED__
3
4
#include <it.h>
5
#include <string>
6
#include <ostream>
7
#include "nodejs-db/connection.h"
8
#include "result.h"
9
10
namespace
nodejs_db_informix {
11
class
Connection
:
public
nodejs_db::Connection
{
12
public
:
13
Connection
();
14
Connection
(std::string, std::string, std::string, std::string, uint32_t = 0);
15
~
Connection
();
16
void
setCharset(
const
std::string& charset)
throw
();
17
void
setCompress(
const
bool
compress)
throw
();
18
void
setInitCommand(
const
std::string& initCommand)
throw
();
19
void
setReadTimeout(
const
uint32_t readTimeout)
throw
();
20
void
setReconnect(
const
bool
reconnect)
throw
();
21
void
setSocket(
const
std::string& socket)
throw
();
22
void
setSslVerifyServer(
const
bool
sslVerifyServer)
throw
();
23
void
setTimeout(
const
uint32_t timeout)
throw
();
24
void
setWriteTimeout(
const
uint32_t writeTimeout)
throw
();
25
bool
isAlive(
bool
=
false
)
throw
();
26
void
open()
throw
(
nodejs_db::Exception
&);
27
void
close();
28
std::string
escape
(
const
std::string&
string
)
const
throw
(
nodejs_db::Exception
&);
29
std::string
version
()
const
;
30
nodejs_db::Result
*
query
(
const
std::string&
query
)
const
throw
(
nodejs_db::Exception
&);
31
nodejs_db::Result
*
query_x
(
const
std::string& query)
const
throw
(
nodejs_db::Exception
&);
32
33
protected
:
34
std::string charset;
35
bool
compress;
36
std::string initCommand;
37
uint32_t readTimeout;
38
bool
reconnect;
39
std::string socket;
40
bool
sslVerifyServer;
41
uint32_t timeout;
42
uint32_t writeTimeout;
43
44
private
:
45
ITConnection* connection;
46
47
private
:
48
bool
_prepareITDBInfo
(ITDBInfo&);
49
// ITCallBackFuncPtr _QueryErrorHandler;
50
/*
51
ITCallbackResult _QueryErrorHandler(
52
const ITErrorManager&
53
, void*
54
, long
55
);
56
*/
57
58
#ifdef DEV
59
void
_testExecForIteration()
const
;
60
#endif
61
};
62
}
63
64
#endif // __INF_CONNECTION_H_INCLUDED__
Generated on Tue Dec 3 2013 19:27:34 for nodejs-db-informix by
1.8.3.1