line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::ReservedWords::ODBC; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
2516
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
63
|
|
5
|
2
|
|
|
2
|
|
12
|
use vars '$VERSION'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
106
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.8'; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
18
|
use constant ODBC30 => 0x01; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4126
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
require Sub::Exporter; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my @exports = qw[ |
15
|
|
|
|
|
|
|
is_reserved |
16
|
|
|
|
|
|
|
is_reserved_by_odbc3 |
17
|
|
|
|
|
|
|
reserved_by |
18
|
|
|
|
|
|
|
words |
19
|
|
|
|
|
|
|
]; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Sub::Exporter->import( -setup => { exports => \@exports } ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
{ |
25
|
|
|
|
|
|
|
my %WORDS = ( |
26
|
|
|
|
|
|
|
ABSOLUTE => ODBC30, |
27
|
|
|
|
|
|
|
ACTION => ODBC30, |
28
|
|
|
|
|
|
|
ADA => ODBC30, |
29
|
|
|
|
|
|
|
ADD => ODBC30, |
30
|
|
|
|
|
|
|
ALL => ODBC30, |
31
|
|
|
|
|
|
|
ALLOCATE => ODBC30, |
32
|
|
|
|
|
|
|
ALTER => ODBC30, |
33
|
|
|
|
|
|
|
AND => ODBC30, |
34
|
|
|
|
|
|
|
ANY => ODBC30, |
35
|
|
|
|
|
|
|
ARE => ODBC30, |
36
|
|
|
|
|
|
|
AS => ODBC30, |
37
|
|
|
|
|
|
|
ASC => ODBC30, |
38
|
|
|
|
|
|
|
ASSERTION => ODBC30, |
39
|
|
|
|
|
|
|
AT => ODBC30, |
40
|
|
|
|
|
|
|
AUTHORIZATION => ODBC30, |
41
|
|
|
|
|
|
|
AVG => ODBC30, |
42
|
|
|
|
|
|
|
BEGIN => ODBC30, |
43
|
|
|
|
|
|
|
BETWEEN => ODBC30, |
44
|
|
|
|
|
|
|
BIT => ODBC30, |
45
|
|
|
|
|
|
|
BIT_LENGTH => ODBC30, |
46
|
|
|
|
|
|
|
BOTH => ODBC30, |
47
|
|
|
|
|
|
|
BY => ODBC30, |
48
|
|
|
|
|
|
|
CASCADE => ODBC30, |
49
|
|
|
|
|
|
|
CASCADED => ODBC30, |
50
|
|
|
|
|
|
|
CASE => ODBC30, |
51
|
|
|
|
|
|
|
CAST => ODBC30, |
52
|
|
|
|
|
|
|
CATALOG => ODBC30, |
53
|
|
|
|
|
|
|
CHAR => ODBC30, |
54
|
|
|
|
|
|
|
CHARACTER => ODBC30, |
55
|
|
|
|
|
|
|
CHARACTER_LENGTH => ODBC30, |
56
|
|
|
|
|
|
|
CHAR_LENGTH => ODBC30, |
57
|
|
|
|
|
|
|
CHECK => ODBC30, |
58
|
|
|
|
|
|
|
CLOSE => ODBC30, |
59
|
|
|
|
|
|
|
COALESCE => ODBC30, |
60
|
|
|
|
|
|
|
COLLATE => ODBC30, |
61
|
|
|
|
|
|
|
COLLATION => ODBC30, |
62
|
|
|
|
|
|
|
COLUMN => ODBC30, |
63
|
|
|
|
|
|
|
COMMIT => ODBC30, |
64
|
|
|
|
|
|
|
CONNECT => ODBC30, |
65
|
|
|
|
|
|
|
CONNECTION => ODBC30, |
66
|
|
|
|
|
|
|
CONSTRAINT => ODBC30, |
67
|
|
|
|
|
|
|
CONSTRAINTS => ODBC30, |
68
|
|
|
|
|
|
|
CONTINUE => ODBC30, |
69
|
|
|
|
|
|
|
CONVERT => ODBC30, |
70
|
|
|
|
|
|
|
CORRESPONDING => ODBC30, |
71
|
|
|
|
|
|
|
COUNT => ODBC30, |
72
|
|
|
|
|
|
|
CREATE => ODBC30, |
73
|
|
|
|
|
|
|
CROSS => ODBC30, |
74
|
|
|
|
|
|
|
CURRENT => ODBC30, |
75
|
|
|
|
|
|
|
CURRENT_DATE => ODBC30, |
76
|
|
|
|
|
|
|
CURRENT_TIME => ODBC30, |
77
|
|
|
|
|
|
|
CURRENT_TIMESTAMP => ODBC30, |
78
|
|
|
|
|
|
|
CURRENT_USER => ODBC30, |
79
|
|
|
|
|
|
|
CURSOR => ODBC30, |
80
|
|
|
|
|
|
|
DATE => ODBC30, |
81
|
|
|
|
|
|
|
DAY => ODBC30, |
82
|
|
|
|
|
|
|
DEALLOCATE => ODBC30, |
83
|
|
|
|
|
|
|
DEC => ODBC30, |
84
|
|
|
|
|
|
|
DECIMAL => ODBC30, |
85
|
|
|
|
|
|
|
DECLARE => ODBC30, |
86
|
|
|
|
|
|
|
DEFAULT => ODBC30, |
87
|
|
|
|
|
|
|
DEFERRABLE => ODBC30, |
88
|
|
|
|
|
|
|
DEFERRED => ODBC30, |
89
|
|
|
|
|
|
|
DELETE => ODBC30, |
90
|
|
|
|
|
|
|
DESC => ODBC30, |
91
|
|
|
|
|
|
|
DESCRIBE => ODBC30, |
92
|
|
|
|
|
|
|
DESCRIPTOR => ODBC30, |
93
|
|
|
|
|
|
|
DIAGNOSTICS => ODBC30, |
94
|
|
|
|
|
|
|
DISCONNECT => ODBC30, |
95
|
|
|
|
|
|
|
DISTINCT => ODBC30, |
96
|
|
|
|
|
|
|
DOMAIN => ODBC30, |
97
|
|
|
|
|
|
|
DOUBLE => ODBC30, |
98
|
|
|
|
|
|
|
DROP => ODBC30, |
99
|
|
|
|
|
|
|
ELSE => ODBC30, |
100
|
|
|
|
|
|
|
END => ODBC30, |
101
|
|
|
|
|
|
|
'END-EXEC' => ODBC30, |
102
|
|
|
|
|
|
|
ESCAPE => ODBC30, |
103
|
|
|
|
|
|
|
EXCEPT => ODBC30, |
104
|
|
|
|
|
|
|
EXCEPTION => ODBC30, |
105
|
|
|
|
|
|
|
EXEC => ODBC30, |
106
|
|
|
|
|
|
|
EXECUTE => ODBC30, |
107
|
|
|
|
|
|
|
EXISTS => ODBC30, |
108
|
|
|
|
|
|
|
EXTERNAL => ODBC30, |
109
|
|
|
|
|
|
|
EXTRACT => ODBC30, |
110
|
|
|
|
|
|
|
FALSE => ODBC30, |
111
|
|
|
|
|
|
|
FETCH => ODBC30, |
112
|
|
|
|
|
|
|
FIRST => ODBC30, |
113
|
|
|
|
|
|
|
FLOAT => ODBC30, |
114
|
|
|
|
|
|
|
FOR => ODBC30, |
115
|
|
|
|
|
|
|
FOREIGN => ODBC30, |
116
|
|
|
|
|
|
|
FORTRAN => ODBC30, |
117
|
|
|
|
|
|
|
FOUND => ODBC30, |
118
|
|
|
|
|
|
|
FROM => ODBC30, |
119
|
|
|
|
|
|
|
FULL => ODBC30, |
120
|
|
|
|
|
|
|
GET => ODBC30, |
121
|
|
|
|
|
|
|
GLOBAL => ODBC30, |
122
|
|
|
|
|
|
|
GO => ODBC30, |
123
|
|
|
|
|
|
|
GOTO => ODBC30, |
124
|
|
|
|
|
|
|
GRANT => ODBC30, |
125
|
|
|
|
|
|
|
GROUP => ODBC30, |
126
|
|
|
|
|
|
|
HAVING => ODBC30, |
127
|
|
|
|
|
|
|
HOUR => ODBC30, |
128
|
|
|
|
|
|
|
IDENTITY => ODBC30, |
129
|
|
|
|
|
|
|
IMMEDIATE => ODBC30, |
130
|
|
|
|
|
|
|
IN => ODBC30, |
131
|
|
|
|
|
|
|
INCLUDE => ODBC30, |
132
|
|
|
|
|
|
|
INDEX => ODBC30, |
133
|
|
|
|
|
|
|
INDICATOR => ODBC30, |
134
|
|
|
|
|
|
|
INITIALLY => ODBC30, |
135
|
|
|
|
|
|
|
INNER => ODBC30, |
136
|
|
|
|
|
|
|
INPUT => ODBC30, |
137
|
|
|
|
|
|
|
INSENSITIVE => ODBC30, |
138
|
|
|
|
|
|
|
INSERT => ODBC30, |
139
|
|
|
|
|
|
|
INT => ODBC30, |
140
|
|
|
|
|
|
|
INTEGER => ODBC30, |
141
|
|
|
|
|
|
|
INTERSECT => ODBC30, |
142
|
|
|
|
|
|
|
INTERVAL => ODBC30, |
143
|
|
|
|
|
|
|
INTO => ODBC30, |
144
|
|
|
|
|
|
|
IS => ODBC30, |
145
|
|
|
|
|
|
|
ISOLATION => ODBC30, |
146
|
|
|
|
|
|
|
JOIN => ODBC30, |
147
|
|
|
|
|
|
|
KEY => ODBC30, |
148
|
|
|
|
|
|
|
LANGUAGE => ODBC30, |
149
|
|
|
|
|
|
|
LAST => ODBC30, |
150
|
|
|
|
|
|
|
LEADING => ODBC30, |
151
|
|
|
|
|
|
|
LEFT => ODBC30, |
152
|
|
|
|
|
|
|
LEVEL => ODBC30, |
153
|
|
|
|
|
|
|
LIKE => ODBC30, |
154
|
|
|
|
|
|
|
LOCAL => ODBC30, |
155
|
|
|
|
|
|
|
LOWER => ODBC30, |
156
|
|
|
|
|
|
|
MATCH => ODBC30, |
157
|
|
|
|
|
|
|
MAX => ODBC30, |
158
|
|
|
|
|
|
|
MIN => ODBC30, |
159
|
|
|
|
|
|
|
MINUTE => ODBC30, |
160
|
|
|
|
|
|
|
MODULE => ODBC30, |
161
|
|
|
|
|
|
|
MONTH => ODBC30, |
162
|
|
|
|
|
|
|
NAMES => ODBC30, |
163
|
|
|
|
|
|
|
NATIONAL => ODBC30, |
164
|
|
|
|
|
|
|
NATURAL => ODBC30, |
165
|
|
|
|
|
|
|
NCHAR => ODBC30, |
166
|
|
|
|
|
|
|
NEXT => ODBC30, |
167
|
|
|
|
|
|
|
NO => ODBC30, |
168
|
|
|
|
|
|
|
NONE => ODBC30, |
169
|
|
|
|
|
|
|
NOT => ODBC30, |
170
|
|
|
|
|
|
|
NULL => ODBC30, |
171
|
|
|
|
|
|
|
NULLIF => ODBC30, |
172
|
|
|
|
|
|
|
NUMERIC => ODBC30, |
173
|
|
|
|
|
|
|
OCTET_LENGTH => ODBC30, |
174
|
|
|
|
|
|
|
OF => ODBC30, |
175
|
|
|
|
|
|
|
ON => ODBC30, |
176
|
|
|
|
|
|
|
ONLY => ODBC30, |
177
|
|
|
|
|
|
|
OPEN => ODBC30, |
178
|
|
|
|
|
|
|
OPTION => ODBC30, |
179
|
|
|
|
|
|
|
OR => ODBC30, |
180
|
|
|
|
|
|
|
ORDER => ODBC30, |
181
|
|
|
|
|
|
|
OUTER => ODBC30, |
182
|
|
|
|
|
|
|
OUTPUT => ODBC30, |
183
|
|
|
|
|
|
|
OVERLAPS => ODBC30, |
184
|
|
|
|
|
|
|
PAD => ODBC30, |
185
|
|
|
|
|
|
|
PARTIAL => ODBC30, |
186
|
|
|
|
|
|
|
PASCAL => ODBC30, |
187
|
|
|
|
|
|
|
POSITION => ODBC30, |
188
|
|
|
|
|
|
|
PRECISION => ODBC30, |
189
|
|
|
|
|
|
|
PREPARE => ODBC30, |
190
|
|
|
|
|
|
|
PRESERVE => ODBC30, |
191
|
|
|
|
|
|
|
PRIMARY => ODBC30, |
192
|
|
|
|
|
|
|
PRIOR => ODBC30, |
193
|
|
|
|
|
|
|
PRIVILEGES => ODBC30, |
194
|
|
|
|
|
|
|
PROCEDURE => ODBC30, |
195
|
|
|
|
|
|
|
PUBLIC => ODBC30, |
196
|
|
|
|
|
|
|
READ => ODBC30, |
197
|
|
|
|
|
|
|
REAL => ODBC30, |
198
|
|
|
|
|
|
|
REFERENCES => ODBC30, |
199
|
|
|
|
|
|
|
RELATIVE => ODBC30, |
200
|
|
|
|
|
|
|
RESTRICT => ODBC30, |
201
|
|
|
|
|
|
|
REVOKE => ODBC30, |
202
|
|
|
|
|
|
|
RIGHT => ODBC30, |
203
|
|
|
|
|
|
|
ROLLBACK => ODBC30, |
204
|
|
|
|
|
|
|
ROWS => ODBC30, |
205
|
|
|
|
|
|
|
SCHEMA => ODBC30, |
206
|
|
|
|
|
|
|
SCROLL => ODBC30, |
207
|
|
|
|
|
|
|
SECOND => ODBC30, |
208
|
|
|
|
|
|
|
SECTION => ODBC30, |
209
|
|
|
|
|
|
|
SELECT => ODBC30, |
210
|
|
|
|
|
|
|
SESSION => ODBC30, |
211
|
|
|
|
|
|
|
SESSION_USER => ODBC30, |
212
|
|
|
|
|
|
|
SET => ODBC30, |
213
|
|
|
|
|
|
|
SIZE => ODBC30, |
214
|
|
|
|
|
|
|
SMALLINT => ODBC30, |
215
|
|
|
|
|
|
|
SOME => ODBC30, |
216
|
|
|
|
|
|
|
SPACE => ODBC30, |
217
|
|
|
|
|
|
|
SQL => ODBC30, |
218
|
|
|
|
|
|
|
SQLCA => ODBC30, |
219
|
|
|
|
|
|
|
SQLCODE => ODBC30, |
220
|
|
|
|
|
|
|
SQLERROR => ODBC30, |
221
|
|
|
|
|
|
|
SQLSTATE => ODBC30, |
222
|
|
|
|
|
|
|
SQLWARNING => ODBC30, |
223
|
|
|
|
|
|
|
SUBSTRING => ODBC30, |
224
|
|
|
|
|
|
|
SUM => ODBC30, |
225
|
|
|
|
|
|
|
SYSTEM_USER => ODBC30, |
226
|
|
|
|
|
|
|
TABLE => ODBC30, |
227
|
|
|
|
|
|
|
TEMPORARY => ODBC30, |
228
|
|
|
|
|
|
|
THEN => ODBC30, |
229
|
|
|
|
|
|
|
TIME => ODBC30, |
230
|
|
|
|
|
|
|
TIMESTAMP => ODBC30, |
231
|
|
|
|
|
|
|
TIMEZONE_HOUR => ODBC30, |
232
|
|
|
|
|
|
|
TIMEZONE_MINUTE => ODBC30, |
233
|
|
|
|
|
|
|
TO => ODBC30, |
234
|
|
|
|
|
|
|
TRAILING => ODBC30, |
235
|
|
|
|
|
|
|
TRANSACTION => ODBC30, |
236
|
|
|
|
|
|
|
TRANSLATE => ODBC30, |
237
|
|
|
|
|
|
|
TRANSLATION => ODBC30, |
238
|
|
|
|
|
|
|
TRIM => ODBC30, |
239
|
|
|
|
|
|
|
TRUE => ODBC30, |
240
|
|
|
|
|
|
|
UNION => ODBC30, |
241
|
|
|
|
|
|
|
UNIQUE => ODBC30, |
242
|
|
|
|
|
|
|
UNKNOWN => ODBC30, |
243
|
|
|
|
|
|
|
UPDATE => ODBC30, |
244
|
|
|
|
|
|
|
UPPER => ODBC30, |
245
|
|
|
|
|
|
|
USAGE => ODBC30, |
246
|
|
|
|
|
|
|
USER => ODBC30, |
247
|
|
|
|
|
|
|
USING => ODBC30, |
248
|
|
|
|
|
|
|
VALUE => ODBC30, |
249
|
|
|
|
|
|
|
VALUES => ODBC30, |
250
|
|
|
|
|
|
|
VARCHAR => ODBC30, |
251
|
|
|
|
|
|
|
VARYING => ODBC30, |
252
|
|
|
|
|
|
|
VIEW => ODBC30, |
253
|
|
|
|
|
|
|
WHEN => ODBC30, |
254
|
|
|
|
|
|
|
WHENEVER => ODBC30, |
255
|
|
|
|
|
|
|
WHERE => ODBC30, |
256
|
|
|
|
|
|
|
WITH => ODBC30, |
257
|
|
|
|
|
|
|
WORK => ODBC30, |
258
|
|
|
|
|
|
|
WRITE => ODBC30, |
259
|
|
|
|
|
|
|
YEAR => ODBC30, |
260
|
|
|
|
|
|
|
ZONE => ODBC30, |
261
|
|
|
|
|
|
|
); |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
sub is_reserved { |
264
|
8
|
|
100
|
8
|
1
|
66
|
return $WORDS{ uc(pop || '') } || 0; |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
sub is_reserved_by_odbc3 { |
268
|
2
|
|
|
2
|
1
|
7
|
return &is_reserved & ODBC30; |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
sub reserved_by { |
272
|
2
|
|
|
2
|
1
|
6
|
my $flags = &is_reserved; |
273
|
2
|
|
|
|
|
3
|
my @reserved_by = (); |
274
|
|
|
|
|
|
|
|
275
|
2
|
100
|
|
|
|
11
|
push @reserved_by, 'ODBC 3.0' if $flags & ODBC30; |
276
|
|
|
|
|
|
|
|
277
|
2
|
|
|
|
|
13
|
return @reserved_by; |
278
|
|
|
|
|
|
|
} |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
sub words { |
281
|
2
|
|
|
2
|
1
|
9845
|
return sort keys %WORDS; |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
} |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
1; |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
__END__ |