30 #define DBI_CAP_NONE 0
31 #define DBI_CAP_TIME_ZONE_SUPPORT (1 << 0)
32 #define DBI_CAP_CHARSET_SUPPORT (1 << 1)
33 #define DBI_CAP_TRANSACTION_MANAGEMENT (1 << 2)
34 #define DBI_CAP_STORED_PROCEDURES (1 << 3)
35 #define DBI_CAP_LOB_SUPPORT (1 << 4)
36 #define DBI_CAP_BIND_BY_VALUE (1 << 5)
37 #define DBI_CAP_BIND_BY_PLACEHOLDER (1 << 6)
38 #define DBI_CAP_HAS_EXECRAW (1 << 7)
39 #define DBI_CAP_HAS_STATEMENT (1 << 8)
40 #define DBI_CAP_HAS_SELECT_ROW (1 << 9)
41 #define DBI_CAP_HAS_NUMBER_SUPPORT (1 << 10)
42 #define DBI_CAP_HAS_OPTION_SUPPORT (1 << 11)
43 #define DBI_CAP_SERVER_TIME_ZONE (1 << 12)
44 #define DBI_CAP_AUTORECONNECT (1 << 13)
46 #define BN_PLACEHOLDER 0
49 #define DBI_DEFAULT_STR_LEN 512
52 #define QDBI_METHOD_OPEN 1
53 #define QDBI_METHOD_CLOSE 2
54 #define QDBI_METHOD_SELECT 3
55 #define QDBI_METHOD_SELECT_ROWS 4
56 #define QDBI_METHOD_EXEC 5
57 #define QDBI_METHOD_COMMIT 6
58 #define QDBI_METHOD_ROLLBACK 7
59 #define QDBI_METHOD_BEGIN_TRANSACTION 8
60 #define QDBI_METHOD_ABORT_TRANSACTION_START 9
61 #define QDBI_METHOD_GET_SERVER_VERSION 10
62 #define QDBI_METHOD_GET_CLIENT_VERSION 11
63 #define QDBI_METHOD_EXECRAW 12
64 #define QDBI_METHOD_STMT_PREPARE 13
65 #define QDBI_METHOD_STMT_PREPARE_RAW 14
66 #define QDBI_METHOD_STMT_BIND 15
67 #define QDBI_METHOD_STMT_BIND_PLACEHOLDERS 16
68 #define QDBI_METHOD_STMT_BIND_VALUES 17
69 #define QDBI_METHOD_STMT_EXEC 18
70 #define QDBI_METHOD_STMT_FETCH_ROW 19
71 #define QDBI_METHOD_STMT_FETCH_ROWS 20
72 #define QDBI_METHOD_STMT_FETCH_COLUMNS 21
73 #define QDBI_METHOD_STMT_NEXT 22
74 #define QDBI_METHOD_STMT_CLOSE 23
75 #define QDBI_METHOD_STMT_AFFECTED_ROWS 24
76 #define QDBI_METHOD_STMT_GET_OUTPUT 25
77 #define QDBI_METHOD_STMT_GET_OUTPUT_ROWS 26
78 #define QDBI_METHOD_STMT_DEFINE 27
79 #define QDBI_METHOD_SELECT_ROW 28
80 #define QDBI_METHOD_OPT_SET 29
81 #define QDBI_METHOD_OPT_GET 30
83 #define QDBI_VALID_CODES 30
256 #define DBI_OPT_NUMBER_OPT "optimal-numbers"
257 #define DBI_OPT_NUMBER_STRING "string-numbers"
258 #define DBI_OPT_NUMBER_NUMERIC "numeric-numbers"
259 #define DBI_OPT_TIMEZONE "timezone"
265 friend struct qore_dbi_mlist_private;
268 struct qore_dbi_mlist_private* priv;
272 DLLLOCAL qore_dbi_method_list& operator=(
const qore_dbi_method_list&);
275 DLLEXPORT qore_dbi_method_list();
276 DLLEXPORT ~qore_dbi_method_list();
302 DLLEXPORT
void add(
int code, q_dbi_stmt_fetch_row_t method);
304 DLLEXPORT
void add(
int code, q_dbi_stmt_fetch_columns_t method);
306 DLLEXPORT
void add(
int code, q_dbi_stmt_fetch_rows_t method);
308 DLLEXPORT
void add(
int code, q_dbi_stmt_next_t method);
311 DLLEXPORT
void add(
int code, q_dbi_option_set_t method);
313 DLLEXPORT
void add(
int code, q_dbi_option_get_t method);
316 DLLEXPORT
void registerOption(
const char* name,
const char* desc,
const QoreTypeInfo* type = 0);
326 friend struct qore_dbi_private;
330 struct qore_dbi_private* priv;
335 DLLLOCAL DBIDriver& operator=(
const DBIDriver&);
342 DLLEXPORT
const char*
getName()
const;
356 DLLLOCAL DBIDriver(
struct qore_dbi_private* p);
357 DLLLOCAL ~DBIDriver();
360 struct qore_dbi_dlist_private;
370 struct qore_dbi_dlist_private *priv;
372 DLLLOCAL
DBIDriver* find_intern(
const char* name)
const;
407 DLLLOCAL ~DBIDriverList();
426 #endif // _QORE_DBI_H