line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: ANSI.pm 8696 2007-01-24 23:12:38Z Tim $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 2002 Tim Bunce Ireland |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Constant data describing ANSI CLI info types and return values for the |
6
|
|
|
|
|
|
|
# SQLGetInfo() method of ODBC. |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public |
9
|
|
|
|
|
|
|
# License or the Artistic License, as specified in the Perl README file. |
10
|
8
|
|
|
8
|
|
5319
|
use strict; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
2855
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package DBI::Const::GetInfo::ANSI; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our (%InfoTypes,%ReturnTypes,%ReturnValues,); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
DBI::Const::GetInfo::ANSI - ISO/IEC SQL/CLI Constants for GetInfo |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 SYNOPSIS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
The API for this module is private and subject to change. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Information requested by GetInfo(). |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
See: A.1 C header file SQLCLI.H, Page 316, 317. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
The API for this module is private and subject to change. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 REFERENCES |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
ISO/IEC FCD 9075-3:200x Information technology - Database Languages - |
35
|
|
|
|
|
|
|
SQL - Part 3: Call-Level Interface (SQL/CLI) |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
SC32 N00744 = WG3:VIE-005 = H2-2002-007 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Date: 2002-01-15 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my |
44
|
|
|
|
|
|
|
$VERSION = "2.008697"; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
%InfoTypes = |
47
|
|
|
|
|
|
|
( |
48
|
|
|
|
|
|
|
SQL_ALTER_TABLE => 86 |
49
|
|
|
|
|
|
|
, SQL_CATALOG_NAME => 10003 |
50
|
|
|
|
|
|
|
, SQL_COLLATING_SEQUENCE => 10004 |
51
|
|
|
|
|
|
|
, SQL_CURSOR_COMMIT_BEHAVIOR => 23 |
52
|
|
|
|
|
|
|
, SQL_CURSOR_SENSITIVITY => 10001 |
53
|
|
|
|
|
|
|
, SQL_DATA_SOURCE_NAME => 2 |
54
|
|
|
|
|
|
|
, SQL_DATA_SOURCE_READ_ONLY => 25 |
55
|
|
|
|
|
|
|
, SQL_DBMS_NAME => 17 |
56
|
|
|
|
|
|
|
, SQL_DBMS_VERSION => 18 |
57
|
|
|
|
|
|
|
, SQL_DEFAULT_TRANSACTION_ISOLATION => 26 |
58
|
|
|
|
|
|
|
, SQL_DESCRIBE_PARAMETER => 10002 |
59
|
|
|
|
|
|
|
, SQL_FETCH_DIRECTION => 8 |
60
|
|
|
|
|
|
|
, SQL_GETDATA_EXTENSIONS => 81 |
61
|
|
|
|
|
|
|
, SQL_IDENTIFIER_CASE => 28 |
62
|
|
|
|
|
|
|
, SQL_INTEGRITY => 73 |
63
|
|
|
|
|
|
|
, SQL_MAXIMUM_CATALOG_NAME_LENGTH => 34 |
64
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_GROUP_BY => 97 |
65
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_ORDER_BY => 99 |
66
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_SELECT => 100 |
67
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_TABLE => 101 |
68
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMN_NAME_LENGTH => 30 |
69
|
|
|
|
|
|
|
, SQL_MAXIMUM_CONCURRENT_ACTIVITIES => 1 |
70
|
|
|
|
|
|
|
, SQL_MAXIMUM_CURSOR_NAME_LENGTH => 31 |
71
|
|
|
|
|
|
|
, SQL_MAXIMUM_DRIVER_CONNECTIONS => 0 |
72
|
|
|
|
|
|
|
, SQL_MAXIMUM_IDENTIFIER_LENGTH => 10005 |
73
|
|
|
|
|
|
|
, SQL_MAXIMUM_SCHEMA_NAME_LENGTH => 32 |
74
|
|
|
|
|
|
|
, SQL_MAXIMUM_STMT_OCTETS => 20000 |
75
|
|
|
|
|
|
|
, SQL_MAXIMUM_STMT_OCTETS_DATA => 20001 |
76
|
|
|
|
|
|
|
, SQL_MAXIMUM_STMT_OCTETS_SCHEMA => 20002 |
77
|
|
|
|
|
|
|
, SQL_MAXIMUM_TABLES_IN_SELECT => 106 |
78
|
|
|
|
|
|
|
, SQL_MAXIMUM_TABLE_NAME_LENGTH => 35 |
79
|
|
|
|
|
|
|
, SQL_MAXIMUM_USER_NAME_LENGTH => 107 |
80
|
|
|
|
|
|
|
, SQL_NULL_COLLATION => 85 |
81
|
|
|
|
|
|
|
, SQL_ORDER_BY_COLUMNS_IN_SELECT => 90 |
82
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_CAPABILITIES => 115 |
83
|
|
|
|
|
|
|
, SQL_SCROLL_CONCURRENCY => 43 |
84
|
|
|
|
|
|
|
, SQL_SEARCH_PATTERN_ESCAPE => 14 |
85
|
|
|
|
|
|
|
, SQL_SERVER_NAME => 13 |
86
|
|
|
|
|
|
|
, SQL_SPECIAL_CHARACTERS => 94 |
87
|
|
|
|
|
|
|
, SQL_TRANSACTION_CAPABLE => 46 |
88
|
|
|
|
|
|
|
, SQL_TRANSACTION_ISOLATION_OPTION => 72 |
89
|
|
|
|
|
|
|
, SQL_USER_NAME => 47 |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 %ReturnTypes |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
See: Codes and data types for implementation information (Table 28), Page 85, 86. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Mapped to ODBC datatype names. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
%ReturnTypes = # maxlen |
101
|
|
|
|
|
|
|
( |
102
|
|
|
|
|
|
|
SQL_ALTER_TABLE => 'SQLUINTEGER bitmask' # INTEGER |
103
|
|
|
|
|
|
|
, SQL_CATALOG_NAME => 'SQLCHAR' # CHARACTER (1) |
104
|
|
|
|
|
|
|
, SQL_COLLATING_SEQUENCE => 'SQLCHAR' # CHARACTER (254) |
105
|
|
|
|
|
|
|
, SQL_CURSOR_COMMIT_BEHAVIOR => 'SQLUSMALLINT' # SMALLINT |
106
|
|
|
|
|
|
|
, SQL_CURSOR_SENSITIVITY => 'SQLUINTEGER' # INTEGER |
107
|
|
|
|
|
|
|
, SQL_DATA_SOURCE_NAME => 'SQLCHAR' # CHARACTER (128) |
108
|
|
|
|
|
|
|
, SQL_DATA_SOURCE_READ_ONLY => 'SQLCHAR' # CHARACTER (1) |
109
|
|
|
|
|
|
|
, SQL_DBMS_NAME => 'SQLCHAR' # CHARACTER (254) |
110
|
|
|
|
|
|
|
, SQL_DBMS_VERSION => 'SQLCHAR' # CHARACTER (254) |
111
|
|
|
|
|
|
|
, SQL_DEFAULT_TRANSACTION_ISOLATION => 'SQLUINTEGER' # INTEGER |
112
|
|
|
|
|
|
|
, SQL_DESCRIBE_PARAMETER => 'SQLCHAR' # CHARACTER (1) |
113
|
|
|
|
|
|
|
, SQL_FETCH_DIRECTION => 'SQLUINTEGER bitmask' # INTEGER |
114
|
|
|
|
|
|
|
, SQL_GETDATA_EXTENSIONS => 'SQLUINTEGER bitmask' # INTEGER |
115
|
|
|
|
|
|
|
, SQL_IDENTIFIER_CASE => 'SQLUSMALLINT' # SMALLINT |
116
|
|
|
|
|
|
|
, SQL_INTEGRITY => 'SQLCHAR' # CHARACTER (1) |
117
|
|
|
|
|
|
|
, SQL_MAXIMUM_CATALOG_NAME_LENGTH => 'SQLUSMALLINT' # SMALLINT |
118
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_GROUP_BY => 'SQLUSMALLINT' # SMALLINT |
119
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_ORDER_BY => 'SQLUSMALLINT' # SMALLINT |
120
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_SELECT => 'SQLUSMALLINT' # SMALLINT |
121
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMNS_IN_TABLE => 'SQLUSMALLINT' # SMALLINT |
122
|
|
|
|
|
|
|
, SQL_MAXIMUM_COLUMN_NAME_LENGTH => 'SQLUSMALLINT' # SMALLINT |
123
|
|
|
|
|
|
|
, SQL_MAXIMUM_CONCURRENT_ACTIVITIES => 'SQLUSMALLINT' # SMALLINT |
124
|
|
|
|
|
|
|
, SQL_MAXIMUM_CURSOR_NAME_LENGTH => 'SQLUSMALLINT' # SMALLINT |
125
|
|
|
|
|
|
|
, SQL_MAXIMUM_DRIVER_CONNECTIONS => 'SQLUSMALLINT' # SMALLINT |
126
|
|
|
|
|
|
|
, SQL_MAXIMUM_IDENTIFIER_LENGTH => 'SQLUSMALLINT' # SMALLINT |
127
|
|
|
|
|
|
|
, SQL_MAXIMUM_SCHEMA_NAME_LENGTH => 'SQLUSMALLINT' # SMALLINT |
128
|
|
|
|
|
|
|
, SQL_MAXIMUM_STMT_OCTETS => 'SQLUSMALLINT' # SMALLINT |
129
|
|
|
|
|
|
|
, SQL_MAXIMUM_STMT_OCTETS_DATA => 'SQLUSMALLINT' # SMALLINT |
130
|
|
|
|
|
|
|
, SQL_MAXIMUM_STMT_OCTETS_SCHEMA => 'SQLUSMALLINT' # SMALLINT |
131
|
|
|
|
|
|
|
, SQL_MAXIMUM_TABLES_IN_SELECT => 'SQLUSMALLINT' # SMALLINT |
132
|
|
|
|
|
|
|
, SQL_MAXIMUM_TABLE_NAME_LENGTH => 'SQLUSMALLINT' # SMALLINT |
133
|
|
|
|
|
|
|
, SQL_MAXIMUM_USER_NAME_LENGTH => 'SQLUSMALLINT' # SMALLINT |
134
|
|
|
|
|
|
|
, SQL_NULL_COLLATION => 'SQLUSMALLINT' # SMALLINT |
135
|
|
|
|
|
|
|
, SQL_ORDER_BY_COLUMNS_IN_SELECT => 'SQLCHAR' # CHARACTER (1) |
136
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_CAPABILITIES => 'SQLUINTEGER bitmask' # INTEGER |
137
|
|
|
|
|
|
|
, SQL_SCROLL_CONCURRENCY => 'SQLUINTEGER bitmask' # INTEGER |
138
|
|
|
|
|
|
|
, SQL_SEARCH_PATTERN_ESCAPE => 'SQLCHAR' # CHARACTER (1) |
139
|
|
|
|
|
|
|
, SQL_SERVER_NAME => 'SQLCHAR' # CHARACTER (128) |
140
|
|
|
|
|
|
|
, SQL_SPECIAL_CHARACTERS => 'SQLCHAR' # CHARACTER (254) |
141
|
|
|
|
|
|
|
, SQL_TRANSACTION_CAPABLE => 'SQLUSMALLINT' # SMALLINT |
142
|
|
|
|
|
|
|
, SQL_TRANSACTION_ISOLATION_OPTION => 'SQLUINTEGER bitmask' # INTEGER |
143
|
|
|
|
|
|
|
, SQL_USER_NAME => 'SQLCHAR' # CHARACTER (128) |
144
|
|
|
|
|
|
|
); |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 %ReturnValues |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
See: A.1 C header file SQLCLI.H, Page 317, 318. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=cut |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
$ReturnValues{SQL_ALTER_TABLE} = |
153
|
|
|
|
|
|
|
{ |
154
|
|
|
|
|
|
|
SQL_AT_ADD_COLUMN => 0x00000001 |
155
|
|
|
|
|
|
|
, SQL_AT_DROP_COLUMN => 0x00000002 |
156
|
|
|
|
|
|
|
, SQL_AT_ALTER_COLUMN => 0x00000004 |
157
|
|
|
|
|
|
|
, SQL_AT_ADD_CONSTRAINT => 0x00000008 |
158
|
|
|
|
|
|
|
, SQL_AT_DROP_CONSTRAINT => 0x00000010 |
159
|
|
|
|
|
|
|
}; |
160
|
|
|
|
|
|
|
$ReturnValues{SQL_CURSOR_COMMIT_BEHAVIOR} = |
161
|
|
|
|
|
|
|
{ |
162
|
|
|
|
|
|
|
SQL_CB_DELETE => 0 |
163
|
|
|
|
|
|
|
, SQL_CB_CLOSE => 1 |
164
|
|
|
|
|
|
|
, SQL_CB_PRESERVE => 2 |
165
|
|
|
|
|
|
|
}; |
166
|
|
|
|
|
|
|
$ReturnValues{SQL_FETCH_DIRECTION} = |
167
|
|
|
|
|
|
|
{ |
168
|
|
|
|
|
|
|
SQL_FD_FETCH_NEXT => 0x00000001 |
169
|
|
|
|
|
|
|
, SQL_FD_FETCH_FIRST => 0x00000002 |
170
|
|
|
|
|
|
|
, SQL_FD_FETCH_LAST => 0x00000004 |
171
|
|
|
|
|
|
|
, SQL_FD_FETCH_PRIOR => 0x00000008 |
172
|
|
|
|
|
|
|
, SQL_FD_FETCH_ABSOLUTE => 0x00000010 |
173
|
|
|
|
|
|
|
, SQL_FD_FETCH_RELATIVE => 0x00000020 |
174
|
|
|
|
|
|
|
}; |
175
|
|
|
|
|
|
|
$ReturnValues{SQL_GETDATA_EXTENSIONS} = |
176
|
|
|
|
|
|
|
{ |
177
|
|
|
|
|
|
|
SQL_GD_ANY_COLUMN => 0x00000001 |
178
|
|
|
|
|
|
|
, SQL_GD_ANY_ORDER => 0x00000002 |
179
|
|
|
|
|
|
|
}; |
180
|
|
|
|
|
|
|
$ReturnValues{SQL_IDENTIFIER_CASE} = |
181
|
|
|
|
|
|
|
{ |
182
|
|
|
|
|
|
|
SQL_IC_UPPER => 1 |
183
|
|
|
|
|
|
|
, SQL_IC_LOWER => 2 |
184
|
|
|
|
|
|
|
, SQL_IC_SENSITIVE => 3 |
185
|
|
|
|
|
|
|
, SQL_IC_MIXED => 4 |
186
|
|
|
|
|
|
|
}; |
187
|
|
|
|
|
|
|
$ReturnValues{SQL_NULL_COLLATION} = |
188
|
|
|
|
|
|
|
{ |
189
|
|
|
|
|
|
|
SQL_NC_HIGH => 1 |
190
|
|
|
|
|
|
|
, SQL_NC_LOW => 2 |
191
|
|
|
|
|
|
|
}; |
192
|
|
|
|
|
|
|
$ReturnValues{SQL_OUTER_JOIN_CAPABILITIES} = |
193
|
|
|
|
|
|
|
{ |
194
|
|
|
|
|
|
|
SQL_OUTER_JOIN_LEFT => 0x00000001 |
195
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_RIGHT => 0x00000002 |
196
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_FULL => 0x00000004 |
197
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_NESTED => 0x00000008 |
198
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_NOT_ORDERED => 0x00000010 |
199
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_INNER => 0x00000020 |
200
|
|
|
|
|
|
|
, SQL_OUTER_JOIN_ALL_COMPARISON_OPS => 0x00000040 |
201
|
|
|
|
|
|
|
}; |
202
|
|
|
|
|
|
|
$ReturnValues{SQL_SCROLL_CONCURRENCY} = |
203
|
|
|
|
|
|
|
{ |
204
|
|
|
|
|
|
|
SQL_SCCO_READ_ONLY => 0x00000001 |
205
|
|
|
|
|
|
|
, SQL_SCCO_LOCK => 0x00000002 |
206
|
|
|
|
|
|
|
, SQL_SCCO_OPT_ROWVER => 0x00000004 |
207
|
|
|
|
|
|
|
, SQL_SCCO_OPT_VALUES => 0x00000008 |
208
|
|
|
|
|
|
|
}; |
209
|
|
|
|
|
|
|
$ReturnValues{SQL_TRANSACTION_ACCESS_MODE} = |
210
|
|
|
|
|
|
|
{ |
211
|
|
|
|
|
|
|
SQL_TRANSACTION_READ_ONLY => 0x00000001 |
212
|
|
|
|
|
|
|
, SQL_TRANSACTION_READ_WRITE => 0x00000002 |
213
|
|
|
|
|
|
|
}; |
214
|
|
|
|
|
|
|
$ReturnValues{SQL_TRANSACTION_CAPABLE} = |
215
|
|
|
|
|
|
|
{ |
216
|
|
|
|
|
|
|
SQL_TC_NONE => 0 |
217
|
|
|
|
|
|
|
, SQL_TC_DML => 1 |
218
|
|
|
|
|
|
|
, SQL_TC_ALL => 2 |
219
|
|
|
|
|
|
|
, SQL_TC_DDL_COMMIT => 3 |
220
|
|
|
|
|
|
|
, SQL_TC_DDL_IGNORE => 4 |
221
|
|
|
|
|
|
|
}; |
222
|
|
|
|
|
|
|
$ReturnValues{SQL_TRANSACTION_ISOLATION} = |
223
|
|
|
|
|
|
|
{ |
224
|
|
|
|
|
|
|
SQL_TRANSACTION_READ_UNCOMMITTED => 0x00000001 |
225
|
|
|
|
|
|
|
, SQL_TRANSACTION_READ_COMMITTED => 0x00000002 |
226
|
|
|
|
|
|
|
, SQL_TRANSACTION_REPEATABLE_READ => 0x00000004 |
227
|
|
|
|
|
|
|
, SQL_TRANSACTION_SERIALIZABLE => 0x00000008 |
228
|
|
|
|
|
|
|
}; |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
1; |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=head1 TODO |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
Corrections, e.g.: |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
SQL_TRANSACTION_ISOLATION_OPTION vs. SQL_TRANSACTION_ISOLATION |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=cut |