ibm_db 2.5.18-x86-mingw32 → 2.5.25-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/ext/ruby_ibm_db.h CHANGED
@@ -1,240 +1,240 @@
1
- /*
2
- +----------------------------------------------------------------------+
3
- | Licensed Materials - Property of IBM |
4
- | |
5
- | (C) Copyright IBM Corporation 2006, 2007, 2008, 2009, 2010, 2012 |
6
- +----------------------------------------------------------------------+
7
- | Authors: Sushant Koduru, Lynh Nguyen, Kanchana Padmanabhan, |
8
- | Dan Scott, Helmut Tessarek, Kellen Bombardier, Sam Ruby |
9
- | Ambrish Bhargava, Tarun Pasrija, Praveen Devarao |
10
- +----------------------------------------------------------------------+
11
- */
12
-
13
- #ifndef RUBY_IBM_DB_H
14
- #define RUBY_IBM_DB_H
15
-
16
- #include <stdio.h>
17
- #include <string.h>
18
- #include <stdlib.h>
19
- #include <sqlcli1.h>
20
-
21
- #ifndef SQL_XML
22
- #define SQL_XML -370
23
- #endif
24
-
25
- /* Needed for Backward compatibility */
26
- #ifndef SQL_DECFLOAT
27
- #define SQL_DECFLOAT -360
28
- #endif
29
-
30
- /* needed for backward compatibility (SQL_ATTR_ROWCOUNT_PREFETCH not defined prior to DB2 9.5.0.3) */
31
- #ifndef SQL_ATTR_ROWCOUNT_PREFETCH
32
- #define SQL_ATTR_ROWCOUNT_PREFETCH 2592
33
- #define SQL_ROWCOUNT_PREFETCH_OFF 0
34
- #define SQL_ROWCOUNT_PREFETCH_ON 1
35
- #endif
36
-
37
- /* SQL_ATTR_USE_TRUSTED_CONTEXT,
38
- * SQL_ATTR_TRUSTED_CONTEXT_USERID and
39
- * SQL_ATTR_TRUSTED_CONTEXT_PASSWORD
40
- * not defined prior to DB2 v9 */
41
- #ifndef SQL_ATTR_USE_TRUSTED_CONTEXT
42
- #define SQL_ATTR_USE_TRUSTED_CONTEXT 2561
43
- #define SQL_ATTR_TRUSTED_CONTEXT_USERID 2562
44
- #define SQL_ATTR_TRUSTED_CONTEXT_PASSWORD 2563
45
- #endif
46
-
47
- #ifndef SQL_ATTR_REPLACE_QUOTED_LITERALS
48
- #define SQL_ATTR_REPLACE_QUOTED_LITERALS 2586
49
- #endif
50
-
51
- /* CLI v9.1 FP3 and below has a SQL_ATTR_REPLACE_QUOTED_LITERALS value of 116
52
- * We need to support both the new and old values for compatibility with older
53
- * versions of CLI. CLI v9.1 FP4 and beyond changed this value to 2586
54
- */
55
- #define SQL_ATTR_REPLACE_QUOTED_LITERALS_OLDVALUE 116
56
-
57
- /* If using a DB2 CLI version which doesn't support this functionality, explicitly
58
- * define this. We will rely on DB2 CLI to throw an error when SQLGetStmtAttr is
59
- * called.
60
- */
61
- #ifndef SQL_ATTR_GET_GENERATED_VALUE
62
- #define SQL_ATTR_GET_GENERATED_VALUE 2578
63
- #endif
64
-
65
- #ifdef _WIN32
66
- #define RUBY_IBM_DB_API __declspec(dllexport)
67
- #else
68
- #define RUBY_IBM_DB_API
69
- #endif
70
-
71
- /* strlen(" SQLCODE=") added in */
72
- #define DB2_MAX_ERR_MSG_LEN (SQL_MAX_MESSAGE_LENGTH + SQL_SQLSTATE_SIZE + 10)
73
-
74
- /*Used to find the type of resource and the error type required*/
75
- #define DB_ERRMSG 1
76
- #define DB_ERR_STATE 2
77
-
78
- #define DB_CONN 1
79
- #define DB_STMT 2
80
-
81
- #define CONN_ERROR 1
82
- #define STMT_ERROR 2
83
-
84
- /*Used to decide if LITERAL REPLACEMENT should be turned on or not*/
85
- #define SET_QUOTED_LITERAL_REPLACEMENT_ON 1
86
- #define SET_QUOTED_LITERAL_REPLACEMENT_OFF 0
87
-
88
- /* DB2 instance environment variable */
89
- #define DB2_VAR_INSTANCE "DB2INSTANCE="
90
-
91
- /******** Makes code compatible with the options used by the user */
92
- #define BINARY 1
93
- #define CONVERT 2
94
- #define PASSTHRU 3
95
- #define PARAM_FILE 11
96
-
97
- #ifdef PASE
98
- #define SQL_IS_INTEGER 0
99
- #define SQL_BEST_ROWID 0
100
- #define SQLLEN long
101
- #define SQLFLOAT double
102
- #endif
103
-
104
- /*fetch*/
105
- #define FETCH_INDEX 0x01
106
- #define FETCH_ASSOC 0x02
107
- #define FETCH_BOTH 0x03
108
-
109
- /* Change column case */
110
- #define ATTR_CASE 3271982
111
- #define CASE_NATURAL 0
112
- #define CASE_LOWER 1
113
- #define CASE_UPPER 2
114
-
115
- /* maximum sizes */
116
- #define USERID_LEN 16
117
- #define ACCTSTR_LEN 200
118
- #define APPLNAME_LEN 32
119
- #define WRKSTNNAME_LEN 18
120
-
121
- /*
122
- * Enum for Decfloat Rounding Modes
123
- * */
124
- enum
125
- {
126
- ROUND_HALF_EVEN = 0,
127
- ROUND_HALF_UP,
128
- ROUND_DOWN,
129
- ROUND_CEILING,
130
- ROUND_FLOOR
131
- }ROUNDING_MODE;
132
-
133
- void Init_ibm_db();
134
-
135
- /* Function Declarations */
136
-
137
- VALUE ibm_db_connect(int argc, VALUE *argv, VALUE self);
138
- VALUE ibm_db_createDB(int argc, VALUE *argv, VALUE self);
139
- VALUE ibm_db_dropDB(int argc, VALUE *argv, VALUE self);
140
- VALUE ibm_db_createDBNX(int argc, VALUE *argv, VALUE self);
141
- VALUE ibm_db_commit(int argc, VALUE *argv, VALUE self);
142
- VALUE ibm_db_pconnect(int argc, VALUE *argv, VALUE self);
143
- VALUE ibm_db_autocommit(int argc, VALUE *argv, VALUE self);
144
- VALUE ibm_db_bind_param(int argc, VALUE *argv, VALUE self);
145
- VALUE ibm_db_close(int argc, VALUE *argv, VALUE self);
146
- VALUE ibm_db_columnprivileges(int argc, VALUE *argv, VALUE self);
147
- VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self);
148
- VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self);
149
- VALUE ibm_db_foreignkeys(int argc, VALUE *argv, VALUE self);
150
- VALUE ibm_db_foreign_keys(int argc, VALUE *argv, VALUE self);
151
- VALUE ibm_db_primarykeys(int argc, VALUE *argv, VALUE self);
152
- VALUE ibm_db_primary_keys(int argc, VALUE *argv, VALUE self);
153
- VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self);
154
- VALUE ibm_db_procedures(int argc, VALUE *argv, VALUE self);
155
- VALUE ibm_db_specialcolumns(int argc, VALUE *argv, VALUE self);
156
- VALUE ibm_db_special_columns(int argc, VALUE *argv, VALUE self);
157
- VALUE ibm_db_statistics(int argc, VALUE *argv, VALUE self);
158
- VALUE ibm_db_tableprivileges(int argc, VALUE *argv, VALUE self);
159
- VALUE ibm_db_table_privileges(int argc, VALUE *argv, VALUE self);
160
- VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self);
161
- VALUE ibm_db_commit(int argc, VALUE *argv, VALUE self);
162
- VALUE ibm_db_exec(int argc, VALUE *argv, VALUE self);
163
- VALUE ibm_db_prepare(int argc, VALUE *argv, VALUE self);
164
- VALUE ibm_db_execute(int argc, VALUE *argv, VALUE self);
165
- VALUE ibm_db_conn_errormsg(int argc, VALUE *argv, VALUE self);
166
- VALUE ibm_db_stmt_errormsg(int argc, VALUE *argv, VALUE self);
167
- VALUE ibm_db_getErrormsg(int argc, VALUE *argv, VALUE self);
168
- VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self);
169
- VALUE ibm_db_conn_error(int argc, VALUE *argv, VALUE self);
170
- VALUE ibm_db_stmt_error(int argc, VALUE *argv, VALUE self);
171
- VALUE ibm_db_next_result(int argc, VALUE *argv, VALUE self);
172
- VALUE ibm_db_num_fields(int argc, VALUE *argv, VALUE self);
173
- VALUE ibm_db_num_rows(int argc, VALUE *argv, VALUE self);
174
- VALUE ibm_db_result_cols(int argc, VALUE *argv, VALUE self);
175
- VALUE ibm_db_field_name(int argc, VALUE *argv, VALUE self);
176
- VALUE ibm_db_field_display_size(int argc, VALUE *argv, VALUE self);
177
- VALUE ibm_db_field_num(int argc, VALUE *argv, VALUE self);
178
- VALUE ibm_db_field_precision(int argc, VALUE *argv, VALUE self);
179
- VALUE ibm_db_field_scale(int argc, VALUE *argv, VALUE self);
180
- VALUE ibm_db_field_type(int argc, VALUE *argv, VALUE self);
181
- VALUE ibm_db_field_width(int argc, VALUE *argv, VALUE self);
182
- VALUE ibm_db_cursor_type(int argc, VALUE *argv, VALUE self);
183
- VALUE ibm_db_rollback(int argc, VALUE *argv, VALUE self);
184
- VALUE ibm_db_free_stmt(int argc, VALUE *argv, VALUE self);
185
- VALUE ibm_db_result(int argc, VALUE *argv, VALUE self);
186
- VALUE ibm_db_fetch_row(int argc, VALUE *argv, VALUE self);
187
- VALUE ibm_db_fetch_assoc(int argc, VALUE *argv, VALUE self);
188
- VALUE ibm_db_fetch_array(int argc, VALUE *argv, VALUE self);
189
- VALUE ibm_db_fetch_both(int argc, VALUE *argv, VALUE self);
190
- VALUE ibm_db_result_all(int argc, VALUE *argv, VALUE self);
191
- VALUE ibm_db_free_result(int argc, VALUE *argv, VALUE self);
192
- VALUE ibm_db_set_option(int argc, VALUE *argv, VALUE self);
193
- VALUE ibm_db_setoption(int argc, VALUE *argv, VALUE self);
194
- VALUE ibm_db_get_option(int argc, VALUE *argv, VALUE self);
195
- VALUE ibm_db_get_last_serial_value(int argc, VALUE *argv, VALUE self);
196
- VALUE ibm_db_getoption(int argc, VALUE *argv, VALUE self);
197
- VALUE ibm_db_fetch_object(int argc, VALUE *argv, VALUE self);
198
- VALUE ibm_db_server_info(int argc, VALUE *argv, VALUE self);
199
- VALUE ibm_db_client_info(int argc, VALUE *argv, VALUE self);
200
- VALUE ibm_db_active(int argc, VALUE *argv, VALUE self);
201
-
202
- /*
203
- Declare any global variables you may need between the BEGIN
204
- and END macros here:
205
- */
206
- struct _ibm_db_globals {
207
- int bin_mode;
208
- #ifdef UNICODE_SUPPORT_VERSION
209
- SQLWCHAR __ruby_conn_err_msg[DB2_MAX_ERR_MSG_LEN];
210
- SQLWCHAR __ruby_stmt_err_msg[DB2_MAX_ERR_MSG_LEN];
211
- SQLWCHAR __ruby_conn_err_state[SQL_SQLSTATE_SIZE + 1];
212
- SQLWCHAR __ruby_stmt_err_state[SQL_SQLSTATE_SIZE + 1];
213
- #else
214
- char __ruby_conn_err_msg[DB2_MAX_ERR_MSG_LEN];
215
- char __ruby_stmt_err_msg[DB2_MAX_ERR_MSG_LEN];
216
- char __ruby_conn_err_state[SQL_SQLSTATE_SIZE + 1];
217
- char __ruby_stmt_err_state[SQL_SQLSTATE_SIZE + 1];
218
- #endif
219
-
220
- #ifdef PASE /* i5/OS ease of use turn off commit */
221
- long i5_allow_commit;
222
- #endif /* PASE */
223
- };
224
-
225
- /*
226
- TODO: make this threadsafe
227
- */
228
-
229
- #define IBM_DB_G(v) (ibm_db_globals->v)
230
-
231
- #endif /* RUBY_IBM_DB_H */
232
-
233
-
234
- /*
235
- * Local variables:
236
- * tab-width: 4
237
- * c-basic-offset: 4
238
- * indent-tabs-mode: t
239
- * End:
240
- */
1
+ /*
2
+ +----------------------------------------------------------------------+
3
+ | Licensed Materials - Property of IBM |
4
+ | |
5
+ | (C) Copyright IBM Corporation 2006, 2007, 2008, 2009, 2010, 2012 |
6
+ +----------------------------------------------------------------------+
7
+ | Authors: Sushant Koduru, Lynh Nguyen, Kanchana Padmanabhan, |
8
+ | Dan Scott, Helmut Tessarek, Kellen Bombardier, Sam Ruby |
9
+ | Ambrish Bhargava, Tarun Pasrija, Praveen Devarao |
10
+ +----------------------------------------------------------------------+
11
+ */
12
+
13
+ #ifndef RUBY_IBM_DB_H
14
+ #define RUBY_IBM_DB_H
15
+
16
+ #include <stdio.h>
17
+ #include <string.h>
18
+ #include <stdlib.h>
19
+ #include <sqlcli1.h>
20
+
21
+ #ifndef SQL_XML
22
+ #define SQL_XML -370
23
+ #endif
24
+
25
+ /* Needed for Backward compatibility */
26
+ #ifndef SQL_DECFLOAT
27
+ #define SQL_DECFLOAT -360
28
+ #endif
29
+
30
+ /* needed for backward compatibility (SQL_ATTR_ROWCOUNT_PREFETCH not defined prior to DB2 9.5.0.3) */
31
+ #ifndef SQL_ATTR_ROWCOUNT_PREFETCH
32
+ #define SQL_ATTR_ROWCOUNT_PREFETCH 2592
33
+ #define SQL_ROWCOUNT_PREFETCH_OFF 0
34
+ #define SQL_ROWCOUNT_PREFETCH_ON 1
35
+ #endif
36
+
37
+ /* SQL_ATTR_USE_TRUSTED_CONTEXT,
38
+ * SQL_ATTR_TRUSTED_CONTEXT_USERID and
39
+ * SQL_ATTR_TRUSTED_CONTEXT_PASSWORD
40
+ * not defined prior to DB2 v9 */
41
+ #ifndef SQL_ATTR_USE_TRUSTED_CONTEXT
42
+ #define SQL_ATTR_USE_TRUSTED_CONTEXT 2561
43
+ #define SQL_ATTR_TRUSTED_CONTEXT_USERID 2562
44
+ #define SQL_ATTR_TRUSTED_CONTEXT_PASSWORD 2563
45
+ #endif
46
+
47
+ #ifndef SQL_ATTR_REPLACE_QUOTED_LITERALS
48
+ #define SQL_ATTR_REPLACE_QUOTED_LITERALS 2586
49
+ #endif
50
+
51
+ /* CLI v9.1 FP3 and below has a SQL_ATTR_REPLACE_QUOTED_LITERALS value of 116
52
+ * We need to support both the new and old values for compatibility with older
53
+ * versions of CLI. CLI v9.1 FP4 and beyond changed this value to 2586
54
+ */
55
+ #define SQL_ATTR_REPLACE_QUOTED_LITERALS_OLDVALUE 116
56
+
57
+ /* If using a DB2 CLI version which doesn't support this functionality, explicitly
58
+ * define this. We will rely on DB2 CLI to throw an error when SQLGetStmtAttr is
59
+ * called.
60
+ */
61
+ #ifndef SQL_ATTR_GET_GENERATED_VALUE
62
+ #define SQL_ATTR_GET_GENERATED_VALUE 2578
63
+ #endif
64
+
65
+ #ifdef _WIN32
66
+ #define RUBY_IBM_DB_API __declspec(dllexport)
67
+ #else
68
+ #define RUBY_IBM_DB_API
69
+ #endif
70
+
71
+ /* strlen(" SQLCODE=") added in */
72
+ #define DB2_MAX_ERR_MSG_LEN (SQL_MAX_MESSAGE_LENGTH + SQL_SQLSTATE_SIZE + 10)
73
+
74
+ /*Used to find the type of resource and the error type required*/
75
+ #define DB_ERRMSG 1
76
+ #define DB_ERR_STATE 2
77
+
78
+ #define DB_CONN 1
79
+ #define DB_STMT 2
80
+
81
+ #define CONN_ERROR 1
82
+ #define STMT_ERROR 2
83
+
84
+ /*Used to decide if LITERAL REPLACEMENT should be turned on or not*/
85
+ #define SET_QUOTED_LITERAL_REPLACEMENT_ON 1
86
+ #define SET_QUOTED_LITERAL_REPLACEMENT_OFF 0
87
+
88
+ /* DB2 instance environment variable */
89
+ #define DB2_VAR_INSTANCE "DB2INSTANCE="
90
+
91
+ /******** Makes code compatible with the options used by the user */
92
+ #define BINARY 1
93
+ #define CONVERT 2
94
+ #define PASSTHRU 3
95
+ #define PARAM_FILE 11
96
+
97
+ #ifdef PASE
98
+ #define SQL_IS_INTEGER 0
99
+ #define SQL_BEST_ROWID 0
100
+ #define SQLLEN long
101
+ #define SQLFLOAT double
102
+ #endif
103
+
104
+ /*fetch*/
105
+ #define FETCH_INDEX 0x01
106
+ #define FETCH_ASSOC 0x02
107
+ #define FETCH_BOTH 0x03
108
+
109
+ /* Change column case */
110
+ #define ATTR_CASE 3271982
111
+ #define CASE_NATURAL 0
112
+ #define CASE_LOWER 1
113
+ #define CASE_UPPER 2
114
+
115
+ /* maximum sizes */
116
+ #define USERID_LEN 16
117
+ #define ACCTSTR_LEN 200
118
+ #define APPLNAME_LEN 32
119
+ #define WRKSTNNAME_LEN 18
120
+
121
+ /*
122
+ * Enum for Decfloat Rounding Modes
123
+ * */
124
+ enum
125
+ {
126
+ ROUND_HALF_EVEN = 0,
127
+ ROUND_HALF_UP,
128
+ ROUND_DOWN,
129
+ ROUND_CEILING,
130
+ ROUND_FLOOR
131
+ }ROUNDING_MODE;
132
+
133
+ void Init_ibm_db();
134
+
135
+ /* Function Declarations */
136
+
137
+ VALUE ibm_db_connect(int argc, VALUE *argv, VALUE self);
138
+ VALUE ibm_db_createDB(int argc, VALUE *argv, VALUE self);
139
+ VALUE ibm_db_dropDB(int argc, VALUE *argv, VALUE self);
140
+ VALUE ibm_db_createDBNX(int argc, VALUE *argv, VALUE self);
141
+ VALUE ibm_db_commit(int argc, VALUE *argv, VALUE self);
142
+ VALUE ibm_db_pconnect(int argc, VALUE *argv, VALUE self);
143
+ VALUE ibm_db_autocommit(int argc, VALUE *argv, VALUE self);
144
+ VALUE ibm_db_bind_param(int argc, VALUE *argv, VALUE self);
145
+ VALUE ibm_db_close(int argc, VALUE *argv, VALUE self);
146
+ VALUE ibm_db_columnprivileges(int argc, VALUE *argv, VALUE self);
147
+ VALUE ibm_db_column_privileges(int argc, VALUE *argv, VALUE self);
148
+ VALUE ibm_db_columns(int argc, VALUE *argv, VALUE self);
149
+ VALUE ibm_db_foreignkeys(int argc, VALUE *argv, VALUE self);
150
+ VALUE ibm_db_foreign_keys(int argc, VALUE *argv, VALUE self);
151
+ VALUE ibm_db_primarykeys(int argc, VALUE *argv, VALUE self);
152
+ VALUE ibm_db_primary_keys(int argc, VALUE *argv, VALUE self);
153
+ VALUE ibm_db_procedure_columns(int argc, VALUE *argv, VALUE self);
154
+ VALUE ibm_db_procedures(int argc, VALUE *argv, VALUE self);
155
+ VALUE ibm_db_specialcolumns(int argc, VALUE *argv, VALUE self);
156
+ VALUE ibm_db_special_columns(int argc, VALUE *argv, VALUE self);
157
+ VALUE ibm_db_statistics(int argc, VALUE *argv, VALUE self);
158
+ VALUE ibm_db_tableprivileges(int argc, VALUE *argv, VALUE self);
159
+ VALUE ibm_db_table_privileges(int argc, VALUE *argv, VALUE self);
160
+ VALUE ibm_db_tables(int argc, VALUE *argv, VALUE self);
161
+ VALUE ibm_db_commit(int argc, VALUE *argv, VALUE self);
162
+ VALUE ibm_db_exec(int argc, VALUE *argv, VALUE self);
163
+ VALUE ibm_db_prepare(int argc, VALUE *argv, VALUE self);
164
+ VALUE ibm_db_execute(int argc, VALUE *argv, VALUE self);
165
+ VALUE ibm_db_conn_errormsg(int argc, VALUE *argv, VALUE self);
166
+ VALUE ibm_db_stmt_errormsg(int argc, VALUE *argv, VALUE self);
167
+ VALUE ibm_db_getErrormsg(int argc, VALUE *argv, VALUE self);
168
+ VALUE ibm_db_getErrorstate(int argc, VALUE *argv, VALUE self);
169
+ VALUE ibm_db_conn_error(int argc, VALUE *argv, VALUE self);
170
+ VALUE ibm_db_stmt_error(int argc, VALUE *argv, VALUE self);
171
+ VALUE ibm_db_next_result(int argc, VALUE *argv, VALUE self);
172
+ VALUE ibm_db_num_fields(int argc, VALUE *argv, VALUE self);
173
+ VALUE ibm_db_num_rows(int argc, VALUE *argv, VALUE self);
174
+ VALUE ibm_db_result_cols(int argc, VALUE *argv, VALUE self);
175
+ VALUE ibm_db_field_name(int argc, VALUE *argv, VALUE self);
176
+ VALUE ibm_db_field_display_size(int argc, VALUE *argv, VALUE self);
177
+ VALUE ibm_db_field_num(int argc, VALUE *argv, VALUE self);
178
+ VALUE ibm_db_field_precision(int argc, VALUE *argv, VALUE self);
179
+ VALUE ibm_db_field_scale(int argc, VALUE *argv, VALUE self);
180
+ VALUE ibm_db_field_type(int argc, VALUE *argv, VALUE self);
181
+ VALUE ibm_db_field_width(int argc, VALUE *argv, VALUE self);
182
+ VALUE ibm_db_cursor_type(int argc, VALUE *argv, VALUE self);
183
+ VALUE ibm_db_rollback(int argc, VALUE *argv, VALUE self);
184
+ VALUE ibm_db_free_stmt(int argc, VALUE *argv, VALUE self);
185
+ VALUE ibm_db_result(int argc, VALUE *argv, VALUE self);
186
+ VALUE ibm_db_fetch_row(int argc, VALUE *argv, VALUE self);
187
+ VALUE ibm_db_fetch_assoc(int argc, VALUE *argv, VALUE self);
188
+ VALUE ibm_db_fetch_array(int argc, VALUE *argv, VALUE self);
189
+ VALUE ibm_db_fetch_both(int argc, VALUE *argv, VALUE self);
190
+ VALUE ibm_db_result_all(int argc, VALUE *argv, VALUE self);
191
+ VALUE ibm_db_free_result(int argc, VALUE *argv, VALUE self);
192
+ VALUE ibm_db_set_option(int argc, VALUE *argv, VALUE self);
193
+ VALUE ibm_db_setoption(int argc, VALUE *argv, VALUE self);
194
+ VALUE ibm_db_get_option(int argc, VALUE *argv, VALUE self);
195
+ VALUE ibm_db_get_last_serial_value(int argc, VALUE *argv, VALUE self);
196
+ VALUE ibm_db_getoption(int argc, VALUE *argv, VALUE self);
197
+ VALUE ibm_db_fetch_object(int argc, VALUE *argv, VALUE self);
198
+ VALUE ibm_db_server_info(int argc, VALUE *argv, VALUE self);
199
+ VALUE ibm_db_client_info(int argc, VALUE *argv, VALUE self);
200
+ VALUE ibm_db_active(int argc, VALUE *argv, VALUE self);
201
+
202
+ /*
203
+ Declare any global variables you may need between the BEGIN
204
+ and END macros here:
205
+ */
206
+ struct _ibm_db_globals {
207
+ int bin_mode;
208
+ #ifdef UNICODE_SUPPORT_VERSION
209
+ SQLWCHAR __ruby_conn_err_msg[DB2_MAX_ERR_MSG_LEN];
210
+ SQLWCHAR __ruby_stmt_err_msg[DB2_MAX_ERR_MSG_LEN];
211
+ SQLWCHAR __ruby_conn_err_state[SQL_SQLSTATE_SIZE + 1];
212
+ SQLWCHAR __ruby_stmt_err_state[SQL_SQLSTATE_SIZE + 1];
213
+ #else
214
+ char __ruby_conn_err_msg[DB2_MAX_ERR_MSG_LEN];
215
+ char __ruby_stmt_err_msg[DB2_MAX_ERR_MSG_LEN];
216
+ char __ruby_conn_err_state[SQL_SQLSTATE_SIZE + 1];
217
+ char __ruby_stmt_err_state[SQL_SQLSTATE_SIZE + 1];
218
+ #endif
219
+
220
+ #ifdef PASE /* i5/OS ease of use turn off commit */
221
+ long i5_allow_commit;
222
+ #endif /* PASE */
223
+ };
224
+
225
+ /*
226
+ TODO: make this threadsafe
227
+ */
228
+
229
+ #define IBM_DB_G(v) (ibm_db_globals->v)
230
+
231
+ #endif /* RUBY_IBM_DB_H */
232
+
233
+
234
+ /*
235
+ * Local variables:
236
+ * tab-width: 4
237
+ * c-basic-offset: 4
238
+ * indent-tabs-mode: t
239
+ * End:
240
+ */