ibmi_db 2.5.14-powerpc-aix-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,143 @@
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
+ | Tony Cairns |
11
+ +----------------------------------------------------------------------+
12
+
13
+ See README_IBM_i main directory ...
14
+
15
+ Environment variables (external affect ext/extconf.rb):
16
+ Compile time:
17
+ IBM_DB_HOME - LUW compile IBM_DB_HOME=/home/db2inst2/sqllib (LUW DB2)
18
+ IBM_DB_UTF8 - LUW & IBM i compile with UTF-8 override (UTF8_ONLY)
19
+ Run time:
20
+ IBM_DB_ON_ERROR - ALL ignore missing attributes older drivers
21
+ IBM_DB_TRACE - dump trace all CLI calls used
22
+ =on - dump trace to STDOUT
23
+ =/path/my.log - dump trace to log
24
+ IBM_DB_STOP - trace active, force exit on SQLGetDiag
25
+ IBM_DB_GIL - map allow GIL/GVL release during operation
26
+
27
+ Compile will select the correct h file (ext/extconf.rb)
28
+ ruby_sql_com.h -- PASE and LUW common include
29
+ ruby_sql_pase.h -- PASE only defines (ordinals different than LUW)
30
+ ruby_sql_luw.h -- PASE only defines (ordinals different than LUW)
31
+
32
+ Runtime ignore ruby_ibm_db_cli.c (IBM_DB_ON_ERROR):
33
+ _ruby_ibm_db_set_attr_override
34
+ _ruby_ibm_db_SQLSetEnvAttr_helper
35
+ _ruby_ibm_db_SQLSetConnectAttr_helper
36
+ _ruby_ibm_db_SQLSetStmtAttr_helper
37
+
38
+ _ruby_ibm_db_get_attr_override
39
+ _ruby_ibm_db_SQLGetEnvAttr_helper
40
+ _ruby_ibm_db_SQLGetConnectAttr_helper
41
+ _ruby_ibm_db_SQLGetStmtAttr_helper
42
+
43
+ ibm_db code defines (internal):
44
+ PASE - compile traditional utf-8 PASE CLI APIs (IBM i)
45
+ UTF8_ONLY - NEW compile UTF-8 override for LUW (IBM_DB_UTF8)
46
+ UNICODE_SUPPORT_VERSION - Ruby 1.9, 2.0 + (Ruby 1.8 is deprecated)
47
+ UTF8_OVERRIDE_VERSION - force utf-8 CLI APIs (see UTF8_ONLY)
48
+
49
+ PASE chooses not support CLI wide interfaces (UTF-16) ...
50
+ - PASE is using UTF8_OVERRIDE and SQLOverrideCCSID400 with CCSID 1208.
51
+ UTF-8 (1208) is asserted "good enough" for world wide business,
52
+ fitting PASE tooling.
53
+ - PASE overrides various ibm_db _to_utf16 to implement UTF-8 (name remains utf16)
54
+ - UTF8_OVERRIDE redefines all CLI wide APIs (see below),
55
+ because wide interfaces are not required UTF-8 ...
56
+ undef SQLWCHAR
57
+ define SQLWCHAR SQLCHAR
58
+ undef SQL_C_WCHAR
59
+ define SQL_C_WCHAR SQL_C_CHAR
60
+
61
+ PASE hack for GRAPHIC/VARGRAPHIC due to UTF-8 bug in IBM i DB2
62
+ - workaround using UTF-16
63
+ ifdef PASE
64
+ define SQLWCHAR16 17
65
+ else
66
+ define SQLWCHAR16 (-8)
67
+ endif
68
+ define SQL_C_WCHAR16 SQLWCHAR16
69
+ */
70
+
71
+
72
+ #ifndef RUBY_SQL_COM_H
73
+ #define RUBY_SQL_COM_H
74
+ #include <ruby.h>
75
+ #include <stdio.h>
76
+ #include <string.h>
77
+ #include <stdlib.h>
78
+ #include <ctype.h>
79
+ #include <stdarg.h>
80
+ #include <sqlcli1.h> /* include top for overrided to work */
81
+
82
+ /* force UTF8_OVERRIDE_VERSION (non-wide CLI APIs) */
83
+ #if defined(PASE) || defined(UTF8_ONLY)
84
+ #define UTF8_OVERRIDE_VERSION 1
85
+ #define UNICODE_SUPPORT_VERSION 1
86
+ #endif /* PASE or UTF8_ONLY */
87
+
88
+ /* utf-8 consistent (non-wide CLI APIs) */
89
+ #ifdef UTF8_OVERRIDE_VERSION
90
+ /* IBM i hack use WCHAR16 for issue with IBM i 7006 UTF-8<SQLCHAR not work>UTF-16 */
91
+ #ifdef PASE
92
+ #define SQLWCHAR16 17
93
+ #else
94
+ #define SQLWCHAR16 (-8)
95
+ #endif /* PASE */
96
+ #define SQL_C_WCHAR16 SQLWCHAR16
97
+ #undef SQLWCHAR
98
+ #define SQLWCHAR SQLCHAR
99
+ #undef SQL_C_WCHAR
100
+ #define SQL_C_WCHAR SQL_C_CHAR
101
+ #endif /* UTF8_OVERRIDE_VERSION */
102
+
103
+ /* environment variables */
104
+ #define IBM_DB_UTF8 "IBM_DB_UTF8"
105
+ #define IBM_DB_ON_ERROR "IBM_DB_ON_ERROR"
106
+ #define IBM_DB_TRACE "IBM_DB_TRACE"
107
+ #define IBM_DB_TRACE_ERROR "IBM_DB_TRACE_ERROR"
108
+ #define IBM_DB_STOP "IBM_DB_STOP"
109
+ #define IBM_DB_GIL "IBM_DB_GIL"
110
+ #define IBM_DB_DBCS_ALLOC "IBM_DB_DBCS_ALLOC"
111
+
112
+ /* unused ordinal accross platforms */
113
+ #define SQL_ATTR_MISSING -33333
114
+ #define SQL_TYPE_MISSING2 -334
115
+ #define SQL_TYPE_MISSING3 -335
116
+ #define SQL_TYPE_MISSING4 -336
117
+ #define SQL_TYPE_MISSING5 -337
118
+
119
+ /* New attributes for IBM i explicit use (IBM i or LUW->IBM i) */
120
+ #define SQL_ATTR_DBC_LIBL 31666
121
+ #define SQL_ATTR_DBC_CURLIB 31667
122
+ #define SQL_MAX_QCMDEXC_LEN 32767
123
+
124
+ /* Choose LUW or PASE SQL defines
125
+ * must follow SQL_ATTR_MISSING
126
+ * for potential backlevel issues
127
+ */
128
+ #ifdef PASE
129
+ #include "ruby_sql_pase.h"
130
+ #else
131
+ #include "ruby_sql_luw.h"
132
+ #endif /* PASE */
133
+
134
+
135
+ #endif /* RUBY_SQL_COM_H */
136
+
137
+ /*
138
+ * Local variables:
139
+ * tab-width: 4
140
+ * c-basic-offset: 4
141
+ * indent-tabs-mode: t
142
+ * End:
143
+ */
@@ -0,0 +1,250 @@
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
+ | Tony Cairns |
11
+ +----------------------------------------------------------------------+
12
+ */
13
+ /* ==============================
14
+ * Story of sql_luw.h and sql_pase.h ...
15
+ * see sql_com.h to understand.
16
+ * ==============================
17
+ */
18
+ #ifndef RUBY_SQL_LUW_H
19
+ #define RUBY_SQL_LUW_H
20
+
21
+ #ifndef PASE
22
+
23
+ /* Needed for Backward compatibility */
24
+ #ifndef SQL_XML
25
+ #define SQL_XML -370
26
+ #endif
27
+
28
+ /* Needed for Backward compatibility */
29
+ #ifndef SQL_DECFLOAT
30
+ #define SQL_DECFLOAT -360
31
+ #endif
32
+
33
+ #define SQL_UTF8_CHAR SQL_TYPE_MISSING2
34
+ #define SQL_VARBINARY_V6 SQL_TYPE_MISSING3
35
+ #define SQL_BINARY_V6 SQL_TYPE_MISSING4
36
+ #define SQL_C_BINARY_V6 SQL_BINARY_V6
37
+
38
+ #ifndef SQL_ATTR_SERVER_MODE /* maybe missing LUW */
39
+ #define SQL_ATTR_SERVER_MODE SQL_ATTR_MISSING
40
+ #endif
41
+
42
+ #ifndef SQL_ATTR_INCLUDE_NULL_IN_LEN /* maybe missing LUW */
43
+ #define SQL_ATTR_INCLUDE_NULL_IN_LEN SQL_ATTR_MISSING
44
+ #endif
45
+
46
+ #ifndef SQL_ATTR_DBC_SYS_NAMING /* maybe missing LUW */
47
+ #define SQL_ATTR_DBC_SYS_NAMING 3017
48
+ #endif
49
+ #ifndef SQL_HEX_SORT_SEQUENCE
50
+ #define SQL_HEX_SORT_SEQUENCE SQL_ATTR_MISSING
51
+ #endif
52
+ #ifndef SQL_JOB_SORT_SEQUENCE
53
+ #define SQL_JOB_SORT_SEQUENCE SQL_ATTR_MISSING
54
+ #endif
55
+ #ifndef SQL_JOBRUN_SORT_SEQUENCE
56
+ #define SQL_JOBRUN_SORT_SEQUENCE SQL_ATTR_MISSING
57
+ #endif
58
+
59
+ #ifndef SQL_ATTR_CONN_SORT_SEQUENCE /* maybe missing LUW */
60
+ #define SQL_ATTR_CONN_SORT_SEQUENCE SQL_ATTR_MISSING
61
+ #endif
62
+
63
+
64
+ /* connect isolation */
65
+ #ifndef SQL_TXN_NO_COMMIT /* LUW missing alias */
66
+ #define SQL_TXN_NO_COMMIT SQL_TXN_NOCOMMIT
67
+ #endif
68
+
69
+ #ifndef SQL_ATTR_DBC_DEFAULT_LIB
70
+ #define SQL_ATTR_DBC_DEFAULT_LIB SQL_ATTR_MISSING
71
+ #endif
72
+
73
+ /* connect date time format */
74
+ #ifndef SQL_ATTR_DATE_FMT /* maybe missing LUW */
75
+ #define SQL_ATTR_DATE_FMT 3025
76
+ #endif
77
+ #ifndef SQL_ATTR_TIME_FMT /* maybe missing LUW */
78
+ #define SQL_ATTR_TIME_FMT 3027
79
+ #endif
80
+
81
+ #ifndef SQL_IBMi_FMT_ISO /* maybe missing LUW */
82
+ #define SQL_IBMi_FMT_ISO 1
83
+ #endif
84
+ #ifndef SQL_IBMi_FMT_USA /* maybe missing LUW */
85
+ #define SQL_IBMi_FMT_USA 2
86
+ #endif
87
+ #ifndef SQL_IBMi_FMT_EUR /* maybe missing LUW */
88
+ #define SQL_IBMi_FMT_EUR 3
89
+ #endif
90
+ #ifndef SQL_IBMi_FMT_JIS /* maybe missing LUW */
91
+ #define SQL_IBMi_FMT_JIS 4
92
+ #endif
93
+ #ifndef SQL_IBMi_FMT_MDY /* maybe missing LUW */
94
+ #define SQL_IBMi_FMT_MDY 5
95
+ #endif
96
+ #ifndef SQL_IBMi_FMT_DMY /* maybe missing LUW */
97
+ #define SQL_IBMi_FMT_DMY 6
98
+ #endif
99
+ #ifndef SQL_IBMi_FMT_YMD /* maybe missing LUW */
100
+ #define SQL_IBMi_FMT_YMD 7
101
+ #endif
102
+ #ifndef SQL_IBMi_FMT_JUL /* maybe missing LUW */
103
+ #define SQL_IBMi_FMT_JUL 8
104
+ #endif
105
+ #ifndef SQL_IBMi_FMT_HMS /* maybe missing LUW */
106
+ #define SQL_IBMi_FMT_HMS 9
107
+ #endif
108
+ #ifndef SQL_IBMi_FMT_JOB /* maybe missing LUW */
109
+ #define SQL_IBMi_FMT_JOB 10
110
+ #endif
111
+
112
+ #ifndef SQL_FMT_ISO
113
+ #define SQL_FMT_ISO SQL_IBMi_FMT_ISO
114
+ #endif
115
+ #ifndef SQL_FMT_USA
116
+ #define SQL_FMT_USA SQL_IBMi_FMT_USA
117
+ #endif
118
+ #ifndef SQL_FMT_EUR
119
+ #define SQL_FMT_EUR SQL_IBMi_FMT_EUR
120
+ #endif
121
+ #ifndef SQL_FMT_JIS
122
+ #define SQL_FMT_JIS SQL_IBMi_FMT_JIS
123
+ #endif
124
+ #ifndef SQL_FMT_DMY
125
+ #define SQL_FMT_DMY SQL_IBMi_FMT_MDY
126
+ #endif
127
+ #ifndef SQL_FMT_MDY
128
+ #define SQL_FMT_MDY SQL_IBMi_FMT_DMY
129
+ #endif
130
+ #ifndef SQL_FMT_YMD
131
+ #define SQL_FMT_YMD SQL_IBMi_FMT_YMD
132
+ #endif
133
+ #ifndef SQL_FMT_JUL
134
+ #define SQL_FMT_JUL SQL_IBMi_FMT_JUL
135
+ #endif
136
+ #ifndef SQL_FMT_JOB
137
+ #define SQL_FMT_JOB SQL_IBMi_FMT_JOB
138
+ #endif
139
+ #ifndef SQL_FMT_HMS
140
+ #define SQL_FMT_HMS SQL_IBMi_FMT_HMS
141
+ #endif
142
+
143
+
144
+ /* connect date and time separator */
145
+ #ifndef SQL_ATTR_DATE_SEP /* maybe missing LUW */
146
+ #define SQL_ATTR_DATE_SEP 3026
147
+ #endif
148
+ #ifndef SQL_ATTR_TIME_SEP /* maybe missing LUW */
149
+ #define SQL_ATTR_TIME_SEP 3028
150
+ #endif
151
+ #ifndef SQL_ATTR_DECIMAL_SEP /* maybe missing LUW */
152
+ #define SQL_ATTR_DECIMAL_SEP 3029
153
+ #endif
154
+ #ifndef SQL_SEP_SLASH /* maybe missing LUW */
155
+ #define SQL_SEP_SLASH 1
156
+ #endif
157
+ #ifndef SQL_SEP_DASH /* maybe missing LUW */
158
+ #define SQL_SEP_DASH 2
159
+ #endif
160
+ #ifndef SQL_SEP_PERIOD /* maybe missing LUW */
161
+ #define SQL_SEP_PERIOD 3
162
+ #endif
163
+ #ifndef SQL_SEP_COMMA /* maybe missing LUW */
164
+ #define SQL_SEP_COMMA 4
165
+ #endif
166
+ #ifndef SQL_SEP_BLANK /* maybe missing LUW */
167
+ #define SQL_SEP_BLANK 5
168
+ #endif
169
+ #ifndef SQL_SEP_COLON /* maybe missing LUW */
170
+ #define SQL_SEP_COLON 6
171
+ #endif
172
+ #ifndef SQL_SEP_JOB /* maybe missing LUW */
173
+ #define SQL_SEP_JOB 7
174
+ #endif
175
+
176
+ /* connect query goal */
177
+ #ifndef SQL_ATTR_QUERY_OPTIMIZE_GOAL /* maybe missing LUW */
178
+ #define SQL_ATTR_QUERY_OPTIMIZE_GOAL SQL_ATTR_MISSING
179
+ #endif
180
+ #ifndef SQL_FIRST_IO /* maybe missing LUW */
181
+ #define SQL_FIRST_IO SQL_TYPE_MISSING2
182
+ #endif
183
+ #ifndef SQL_ALL_IO /* maybe missing LUW */
184
+ #define SQL_ALL_IO SQL_TYPE_MISSING3
185
+ #endif
186
+
187
+ /* statement attributes */
188
+ #ifndef SQL_ATTR_FOR_FETCH_ONLY /* maybe missing LUW */
189
+ #define SQL_ATTR_FOR_FETCH_ONLY SQL_ATTR_MISSING
190
+ #endif
191
+
192
+ /* statement concurrency */
193
+ #ifndef SQL_ATTR_CONCURRENCY /* maybe missing LUW */
194
+ #define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY
195
+ #endif
196
+
197
+ /* needed for backward compatibility (SQL_ATTR_ROWCOUNT_PREFETCH not defined prior to DB2 9.5.0.3) */
198
+ #ifndef SQL_ATTR_ROWCOUNT_PREFETCH
199
+ #define SQL_ATTR_ROWCOUNT_PREFETCH 2592
200
+ #define SQL_ROWCOUNT_PREFETCH_OFF 0
201
+ #define SQL_ROWCOUNT_PREFETCH_ON 1
202
+ #endif
203
+
204
+ #ifndef SQL_ATTR_INFO_USERID
205
+ #define SQL_ATTR_INFO_USERID 1281
206
+ #define SQL_ATTR_INFO_WRKSTNNAME 1282
207
+ #define SQL_ATTR_INFO_APPLNAME 1283
208
+ #define SQL_ATTR_INFO_ACCTSTR 1284
209
+ #define SQL_ATTR_INFO_PROGRAMID 2511
210
+ #endif
211
+
212
+ /* SQL_ATTR_USE_TRUSTED_CONTEXT,
213
+ * SQL_ATTR_TRUSTED_CONTEXT_USERID and
214
+ * SQL_ATTR_TRUSTED_CONTEXT_PASSWORD
215
+ * not defined prior to DB2 v9 */
216
+ #ifndef SQL_ATTR_USE_TRUSTED_CONTEXT
217
+ #define SQL_ATTR_USE_TRUSTED_CONTEXT 2561
218
+ #define SQL_ATTR_TRUSTED_CONTEXT_USERID 2562
219
+ #define SQL_ATTR_TRUSTED_CONTEXT_PASSWORD 2563
220
+ #endif
221
+
222
+ #ifndef SQL_ATTR_REPLACE_QUOTED_LITERALS
223
+ #define SQL_ATTR_REPLACE_QUOTED_LITERALS 2586
224
+ #endif
225
+
226
+ /* CLI v9.1 FP3 and below has a SQL_ATTR_REPLACE_QUOTED_LITERALS value of 116
227
+ * We need to support both the new and old values for compatibility with older
228
+ * versions of CLI. CLI v9.1 FP4 and beyond changed this value to 2586
229
+ */
230
+ #define SQL_ATTR_REPLACE_QUOTED_LITERALS_OLDVALUE 116
231
+
232
+ /* If using a DB2 CLI version which doesn't support this functionality, explicitly
233
+ * define this. We will rely on DB2 CLI to throw an error when SQLGetStmtAttr is
234
+ * called.
235
+ */
236
+ #ifndef SQL_ATTR_GET_GENERATED_VALUE
237
+ #define SQL_ATTR_GET_GENERATED_VALUE 2578
238
+ #endif
239
+
240
+ #endif /* not PASE */
241
+ #endif /* RUBY_SQL_LUW_H */
242
+
243
+ /*
244
+ * Local variables:
245
+ * tab-width: 4
246
+ * c-basic-offset: 4
247
+ * indent-tabs-mode: t
248
+ * End:
249
+ */
250
+
@@ -0,0 +1,206 @@
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
+ | Tony Cairns |
11
+ +----------------------------------------------------------------------+
12
+ */
13
+ /* ==============================
14
+ * Story of sql_luw.h and sql_pase.h ...
15
+ * see sql_com.h to understand.
16
+ * ==============================
17
+ */
18
+
19
+ #ifndef RUBY_SQL_PASE_H
20
+ #define RUBY_SQL_PASE_H
21
+
22
+ #ifdef PASE
23
+ /* IBM i missing completely */
24
+ typedef long long SQLBIGINT;
25
+ #define SQLLEN SQLINTEGER
26
+ #define SQLULEN SQLUINTEGER
27
+ #define SQL_IS_INTEGER 0
28
+ #define SQL_BEST_ROWID 0
29
+ #define SQLFLOAT SQLREAL
30
+ #define SQL_C_SBIGINT SQL_C_BIGINT
31
+ /* IBM i signed CLI APIs (LUW unsigned APIs) */
32
+ #define SQLUSMALLINT SQLSMALLINT
33
+ #define SQLUINTEGER SQLINTEGER
34
+
35
+ #define SQL_IS_INTEGER 0
36
+ #define SQL_IS_UINTEGER 0
37
+ #define SQL_BEST_ROWID 0
38
+ #define SQLLEN long
39
+ #define SQLFLOAT double
40
+ #define SQLUINTEGER SQLINTEGER
41
+ #define SQLUSMALLINT SQLSMALLINT
42
+ /*** incompatible V6 change IBM i */
43
+ #define SQL_BINARY_V6 -2
44
+ #define SQL_VARBINARY_V6 -3
45
+ #define SQL_C_BINARY_V6 SQL_BINARY_V6
46
+ /* cross compile V6+ to V5 */
47
+ #undef SQL_BINARY
48
+ #undef SQL_C_BINARY
49
+ #undef SQL_VARBINARY
50
+ #define SQL_BINARY 97
51
+ #define SQL_C_BINARY SQL_BINARY
52
+ #define SQL_VARBINARY 98
53
+ /* long same ordinal (mess up case statements) */
54
+ #undef SQL_LONGVARCHAR
55
+ #define SQL_LONGVARCHAR SQL_TYPE_MISSING2
56
+ #undef SQL_LONGVARGRAPHIC
57
+ #define SQL_LONGVARGRAPHIC SQL_TYPE_MISSING3
58
+ #undef SQL_LONGVARBINARY
59
+ #define SQL_LONGVARBINARY SQL_TYPE_MISSING4
60
+ #undef SQL_WLONGVARCHAR
61
+ #define SQL_WLONGVARCHAR SQL_TYPE_MISSING5
62
+
63
+ #ifndef SQL_SCROLLABLE /* maybe missing IBM i */
64
+ #define SQL_SCROLLABLE SQL_CURSOR_DYNAMIC
65
+ #endif
66
+ #ifndef SQL_SCROLL_FORWARD_ONLY /* maybe missing IBM i */
67
+ #define SQL_SCROLL_FORWARD_ONLY SQL_CURSOR_FORWARD_ONLY
68
+ #endif
69
+ #undef SQL_CURSOR_KEYSET_DRIVEN
70
+ #define SQL_CURSOR_KEYSET_DRIVEN SQL_CURSOR_STATIC
71
+
72
+ #ifndef SQL_ATTR_QUERY_TIMEOUT /* maybe missing IBM i */
73
+ #define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT
74
+ #endif
75
+
76
+ #ifndef SQL_ATTR_PING_DB /* maybe missing IBM i */
77
+ #define SQL_ATTR_PING_DB SQL_ATTR_MISSING
78
+ #endif
79
+
80
+ #ifndef SQL_ATTR_ODBC_VERSION /* maybe missing IBM i */
81
+ #define SQL_ATTR_ODBC_VERSION SQL_ATTR_MISSING
82
+ #endif
83
+ #ifndef SQL_OV_ODBC3 /* maybe missing IBM i */
84
+ #define SQL_OV_ODBC3 SQL_ATTR_MISSING
85
+ #endif
86
+
87
+ #ifndef SQL_QUICK /* maybe missing IBM i */
88
+ #define SQL_QUICK 0
89
+ #endif
90
+
91
+ #ifndef SQL_DATABASE_CODEPAGE /* maybe missing IBM i */
92
+ #define SQL_DATABASE_CODEPAGE SQL_ATTR_MISSING
93
+ #endif
94
+ #ifndef SQL_SERVER_NAME /* maybe missing IBM i */
95
+ #define SQL_SERVER_NAME SQL_ATTR_MISSING
96
+ #endif
97
+ #ifndef SQL_SPECIAL_CHARACTERS /* maybe missing IBM i */
98
+ #define SQL_SPECIAL_CHARACTERS SQL_ATTR_MISSING
99
+ #endif
100
+ #ifndef SQL_MAX_IDENTIFIER_LEN /* maybe missing IBM i */
101
+ #define SQL_MAX_IDENTIFIER_LEN SQL_ATTR_MISSING
102
+ #endif
103
+ #ifndef SQL_MAX_INDEX_SIZE /* maybe missing IBM i */
104
+ #define SQL_MAX_INDEX_SIZE SQL_ATTR_MISSING
105
+ #endif
106
+ #ifndef SQL_MAX_PROCEDURE_NAME_LEN /* maybe missing IBM i */
107
+ #define SQL_MAX_PROCEDURE_NAME_LEN SQL_ATTR_MISSING
108
+ #endif
109
+ #ifndef SQL_ODBC_VER /* maybe missing IBM i */
110
+ #define SQL_ODBC_VER SQL_ATTR_MISSING
111
+ #endif
112
+ #ifndef SQL_APPLICATION_CODEPAGE /* maybe missing IBM i */
113
+ #define SQL_APPLICATION_CODEPAGE SQL_ATTR_MISSING
114
+ #endif
115
+ #ifndef SQL_CONNECT_CODEPAGE /* maybe missing IBM i */
116
+ #define SQL_CONNECT_CODEPAGE SQL_ATTR_MISSING
117
+ #endif
118
+ #ifndef SQL_IS_POINTER /* maybe missing IBM i */
119
+ #define SQL_IS_POINTER SQL_ATTR_MISSING
120
+ #endif
121
+ #ifndef SQL_ATTR_CHAINING_BEGIN /* maybe missing IBM i */
122
+ #define SQL_ATTR_CHAINING_BEGIN SQL_ATTR_MISSING
123
+ #endif
124
+ #ifndef SQL_ATTR_CHAINING_END /* maybe missing IBM i */
125
+ #define SQL_ATTR_CHAINING_END SQL_ATTR_MISSING
126
+ #endif
127
+
128
+
129
+ #ifndef SQL_ATTR_CONN_SORT_SEQUENCE
130
+ #define SQL_ATTR_CONN_SORT_SEQUENCE 10046
131
+ #endif
132
+ #ifndef SQL_HEX_SORT_SEQUENCE
133
+ #define SQL_HEX_SORT_SEQUENCE 0
134
+ #endif
135
+ #ifndef SQL_JOB_SORT_SEQUENCE
136
+ #define SQL_JOB_SORT_SEQUENCE 1
137
+ #endif
138
+ #ifndef SQL_JOBRUN_SORT_SEQUENCE
139
+ #define SQL_JOBRUN_SORT_SEQUENCE 2
140
+ #endif
141
+
142
+ #ifndef SQL_FETCH_ABSOLUTE /* maybe missing IBM i */
143
+ #define SQL_FETCH_ABSOLUTE 5
144
+ #endif
145
+
146
+ #ifndef SQL_TXN_ISOLATION_OPTION
147
+ #define SQL_TXN_ISOLATION_OPTION SQL_DEFAULT_TXN_ISOLATION
148
+ #endif
149
+
150
+ #ifndef SQL_CONCUR_DEFAULT
151
+ #define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY /* Default value */
152
+ #endif
153
+
154
+ #ifndef SQL_ATTR_DEFERRED_PREPARE
155
+ #define SQL_ATTR_DEFERRED_PREPARE SQL_ATTR_MISSING
156
+ #define SQL_DEFERRED_PREPARE_ON SQL_TYPE_MISSING2
157
+ #define SQL_DEFERRED_PREPARE_OFF SQL_TYPE_MISSING3
158
+ #endif
159
+
160
+ /* allow PASE to use IBMi_ attrs */
161
+ #define SQL_IBMi_FMT_ISO SQL_FMT_ISO
162
+ #define SQL_IBMi_FMT_USA SQL_FMT_USA
163
+ #define SQL_IBMi_FMT_EUR SQL_FMT_EUR
164
+ #define SQL_IBMi_FMT_JIS SQL_FMT_JIS
165
+ #define SQL_IBMi_FMT_MDY SQL_FMT_DMY
166
+ #define SQL_IBMi_FMT_DMY SQL_FMT_MDY
167
+ #define SQL_IBMi_FMT_YMD SQL_FMT_YMD
168
+ #define SQL_IBMi_FMT_JUL SQL_FMT_JUL
169
+ #define SQL_IBMi_FMT_JOB SQL_FMT_JOB
170
+ #define SQL_IBMi_FMT_HMS SQL_FMT_HMS
171
+
172
+ #ifndef SQL_ATTR_ROWCOUNT_PREFETCH
173
+ #define SQL_ATTR_ROWCOUNT_PREFETCH SQL_ATTR_MISSING
174
+ #define SQL_ROWCOUNT_PREFETCH_OFF SQL_TYPE_MISSING2
175
+ #define SQL_ROWCOUNT_PREFETCH_ON SQL_TYPE_MISSING3
176
+ #endif
177
+
178
+ #ifndef SQL_ATTR_INFO_USERID
179
+ #define SQL_ATTR_INFO_USERID 10103
180
+ #define SQL_ATTR_INFO_WRKSTNNAME 10104
181
+ #define SQL_ATTR_INFO_APPLNAME 10105
182
+ #define SQL_ATTR_INFO_ACCTSTR 10106
183
+ #define SQL_ATTR_INFO_PROGRAMID 10107
184
+ #endif
185
+
186
+ #ifndef SQL_ATTR_USE_TRUSTED_CONTEXT
187
+ #define SQL_ATTR_USE_TRUSTED_CONTEXT SQL_ATTR_MISSING
188
+ #define SQL_ATTR_TRUSTED_CONTEXT_USERID SQL_TYPE_MISSING2
189
+ #define SQL_ATTR_TRUSTED_CONTEXT_PASSWORD SQL_TYPE_MISSING3
190
+ #endif
191
+
192
+ #ifndef SQL_ATTR_GET_GENERATED_VALUE
193
+ #define SQL_ATTR_GET_GENERATED_VALUE SQL_ATTR_MISSING
194
+ #endif
195
+
196
+ #endif /* PASE */
197
+ #endif /* RUBY_SQL_PASE_H */
198
+
199
+ /*
200
+ * Local variables:
201
+ * tab-width: 4
202
+ * c-basic-offset: 4
203
+ * indent-tabs-mode: t
204
+ * End:
205
+ */
206
+