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