File Coverage

blib/lib/SQL/ReservedWords/DB2.pm
Criterion Covered Total %
statement 39 39 100.0
branch 10 10 100.0
condition 2 2 100.0
subroutine 16 16 100.0
pod 8 8 100.0
total 75 75 100.0


line stmt bran cond sub pod time code
1             package SQL::ReservedWords::DB2;
2              
3 2     2   3549 use strict;
  2         5  
  2         78  
4 2     2   12 use warnings;
  2         3  
  2         71  
5 2     2   11 use vars '$VERSION';
  2         2  
  2         129  
6              
7             $VERSION = '0.8';
8              
9 2     2   12 use constant DB2V5 => 0x01;
  2         3  
  2         213  
10 2     2   11 use constant DB2V6 => 0x02;
  2         5  
  2         119  
11 2     2   11 use constant DB2V7 => 0x04;
  2         3  
  2         93  
12 2     2   11 use constant DB2V8 => 0x08;
  2         3  
  2         80  
13 2     2   9 use constant DB2V9 => 0x10;
  2         4  
  2         21660  
14              
15             {
16             require Sub::Exporter;
17              
18             my @exports = qw[
19             is_reserved
20             is_reserved_by_db2v5
21             is_reserved_by_db2v6
22             is_reserved_by_db2v7
23             is_reserved_by_db2v8
24             is_reserved_by_db2v9
25             reserved_by
26             words
27             ];
28              
29             Sub::Exporter->import( -setup => { exports => \@exports } );
30             }
31              
32             {
33             my %WORDS = (
34             ACTIVATE => DB2V9,
35             ADD => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
36             AFTER => DB2V6 | DB2V7 | DB2V8 | DB2V9,
37             ALIAS => DB2V9,
38             ALL => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
39             ALLOCATE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
40             ALLOW => DB2V6 | DB2V7 | DB2V8 | DB2V9,
41             ALTER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
42             AND => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
43             ANY => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
44             AS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
45             ASENSITIVE => DB2V8 | DB2V9,
46             ASSOCIATE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
47             ASUTIME => DB2V6 | DB2V7 | DB2V8 | DB2V9,
48             AT => DB2V9,
49             ATTRIBUTES => DB2V9,
50             AUDIT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
51             AUTHORIZATION => DB2V9,
52             AUX => DB2V6 | DB2V7 | DB2V8 | DB2V9,
53             AUXILIARY => DB2V6 | DB2V7 | DB2V8 | DB2V9,
54             BEFORE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
55             BEGIN => DB2V6 | DB2V7 | DB2V8 | DB2V9,
56             BETWEEN => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
57             BINARY => DB2V9,
58             BUFFERPOOL => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
59             BY => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
60             CACHE => DB2V9,
61             CALL => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
62             CALLED => DB2V9,
63             CAPTURE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
64             CARDINALITY => DB2V9,
65             CASCADED => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
66             CASE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
67             CAST => DB2V6 | DB2V7 | DB2V8 | DB2V9,
68             CCSID => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
69             CHAR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
70             CHARACTER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
71             CHECK => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
72             CLONE => DB2V9,
73             CLOSE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
74             CLUSTER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
75             COLLECTION => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
76             COLLID => DB2V6 | DB2V7 | DB2V8 | DB2V9,
77             COLUMN => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
78             COMMENT => DB2V6 | DB2V7 | DB2V8 | DB2V9,
79             COMMIT => DB2V6 | DB2V7 | DB2V8 | DB2V9,
80             CONCAT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
81             CONDITION => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
82             CONNECT => DB2V6 | DB2V7 | DB2V8 | DB2V9,
83             CONNECTION => DB2V6 | DB2V7 | DB2V8 | DB2V9,
84             CONSTRAINT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
85             CONTAINS => DB2V6 | DB2V7 | DB2V8 | DB2V9,
86             CONTINUE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
87             COUNT => DB2V5 | DB2V9,
88             COUNT_BIG => DB2V9,
89             CREATE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
90             CROSS => DB2V9,
91             CURRENT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
92             CURRENT_DATE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
93             CURRENT_LC_CTYPE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
94             CURRENT_PATH => DB2V6 | DB2V7 | DB2V8 | DB2V9,
95             CURRENT_SCHEMA => DB2V9,
96             CURRENT_SERVER => DB2V9,
97             CURRENT_TIME => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
98             CURRENT_TIMESTAMP => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
99             CURRENT_TIMEZONE => DB2V9,
100             CURRENT_USER => DB2V9,
101             CURSOR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
102             CYCLE => DB2V9,
103             DATA => DB2V6 | DB2V7 | DB2V8 | DB2V9,
104             DATABASE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
105             DATAPARTITIONNAME => DB2V9,
106             DATAPARTITIONNUM => DB2V9,
107             DATE => DB2V9,
108             DAY => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
109             DAYS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
110             DB2GENERAL => DB2V9,
111             DB2GENRL => DB2V9,
112             DB2SQL => DB2V6 | DB2V7 | DB2V9,
113             DBINFO => DB2V6 | DB2V7 | DB2V8 | DB2V9,
114             DBPARTITIONNAME => DB2V9,
115             DBPARTITIONNUM => DB2V9,
116             DEALLOCATE => DB2V9,
117             DECLARE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
118             DEFAULT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
119             DEFAULTS => DB2V9,
120             DEFINITION => DB2V9,
121             DELETE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
122             DENSE_RANK => DB2V9,
123             DENSERANK => DB2V9,
124             DESCRIBE => DB2V9,
125             DESCRIPTOR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
126             DETERMINISTIC => DB2V6 | DB2V7 | DB2V8 | DB2V9,
127             DIAGNOSTICS => DB2V9,
128             DISABLE => DB2V9,
129             DISALLOW => DB2V6 | DB2V7 | DB2V8 | DB2V9,
130             DISCONNECT => DB2V9,
131             DISTINCT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
132             DO => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
133             DOCUMENT => DB2V9,
134             DOUBLE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
135             DROP => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
136             DSNHATTR => DB2V7,
137             DSSIZE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
138             DYNAMIC => DB2V6 | DB2V7 | DB2V8 | DB2V9,
139             EACH => DB2V9,
140             EDITPROC => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
141             ELSE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
142             ELSEIF => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
143             ENABLE => DB2V9,
144             ENCODING => DB2V7 | DB2V8 | DB2V9,
145             ENCRYPTION => DB2V8 | DB2V9,
146             END => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
147             ENDING => DB2V8 | DB2V9,
148             ERASE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
149             ESCAPE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
150             EVERY => DB2V9,
151             EXCEPT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
152             EXCEPTION => DB2V8 | DB2V9,
153             EXCLUDING => DB2V9,
154             EXCLUSIVE => DB2V9,
155             EXECUTE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
156             EXISTS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
157             EXIT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
158             EXPLAIN => DB2V8 | DB2V9,
159             EXTERNAL => DB2V6 | DB2V7 | DB2V8 | DB2V9,
160             EXTRACT => DB2V9,
161             FENCED => DB2V6 | DB2V7 | DB2V8 | DB2V9,
162             FETCH => DB2V6 | DB2V7 | DB2V8 | DB2V9,
163             FIELDPROC => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
164             FILE => DB2V9,
165             FINAL => DB2V6 | DB2V7 | DB2V8 | DB2V9,
166             FOR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
167             FOREIGN => DB2V9,
168             FREE => DB2V8 | DB2V9,
169             FROM => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
170             FULL => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
171             FUNCTION => DB2V6 | DB2V7 | DB2V8 | DB2V9,
172             GENERAL => DB2V6 | DB2V7 | DB2V9,
173             GENERATED => DB2V6 | DB2V7 | DB2V8 | DB2V9,
174             GET => DB2V6 | DB2V7 | DB2V8 | DB2V9,
175             GLOBAL => DB2V6 | DB2V7 | DB2V8 | DB2V9,
176             GO => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
177             GOTO => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
178             GRANT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
179             GRAPHIC => DB2V9,
180             GROUP => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
181             HANDLER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
182             HASH => DB2V9,
183             HASHED_VALUE => DB2V9,
184             HAVING => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
185             HINT => DB2V9,
186             HOLD => DB2V8 | DB2V9,
187             HOUR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
188             HOURS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
189             IDENTITY => DB2V9,
190             IF => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
191             IMMEDIATE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
192             IN => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
193             INCLUDING => DB2V9,
194             INCLUSIVE => DB2V8 | DB2V9,
195             INCREMENT => DB2V9,
196             INDEX => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
197             INDICATOR => DB2V9,
198             INF => DB2V9,
199             INFINITY => DB2V9,
200             INHERIT => DB2V7 | DB2V8 | DB2V9,
201             INNER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
202             INOUT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
203             INSENSITIVE => DB2V7 | DB2V8 | DB2V9,
204             INSERT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
205             INTEGRITY => DB2V9,
206             INTERSECT => DB2V9,
207             INTO => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
208             IS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
209             ISOBID => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
210             ISOLATION => DB2V9,
211             ITERATE => DB2V8 | DB2V9,
212             JAR => DB2V7 | DB2V8 | DB2V9,
213             JAVA => DB2V6 | DB2V7 | DB2V9,
214             JOIN => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
215             KEEP => DB2V9,
216             KEY => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
217             LABEL => DB2V6 | DB2V7 | DB2V8 | DB2V9,
218             LANGUAGE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
219             LATERAL => DB2V9,
220             LC_CTYPE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
221             LEAVE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
222             LEFT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
223             LIKE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
224             LINKTYPE => DB2V9,
225             LOCAL => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
226             LOCALDATE => DB2V9,
227             LOCALE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
228             LOCALTIME => DB2V9,
229             LOCALTIMESTAMP => DB2V9,
230             LOCATOR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
231             LOCATORS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
232             LOCK => DB2V6 | DB2V7 | DB2V8 | DB2V9,
233             LOCKMAX => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
234             LOCKSIZE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
235             LONG => DB2V6 | DB2V7 | DB2V8 | DB2V9,
236             LOOP => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
237             MAINTAINED => DB2V8 | DB2V9,
238             MATERIALIZED => DB2V8 | DB2V9,
239             MAXVALUE => DB2V9,
240             MICROSECOND => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
241             MICROSECONDS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
242             MINUTE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
243             MINUTES => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
244             MINVALUE => DB2V9,
245             MODE => DB2V9,
246             MODIFIES => DB2V6 | DB2V7 | DB2V8 | DB2V9,
247             MONTH => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
248             MONTHS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
249             NAN => DB2V9,
250             NEW => DB2V9,
251             NEW_TABLE => DB2V9,
252             NEXTVAL => DB2V8 | DB2V9,
253             NO => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
254             NOCACHE => DB2V9,
255             NOCYCLE => DB2V9,
256             NODENAME => DB2V9,
257             NODENUMBER => DB2V9,
258             NOMAXVALUE => DB2V9,
259             NOMINVALUE => DB2V9,
260             NONE => DB2V8 | DB2V9,
261             NOORDER => DB2V9,
262             NORMALIZED => DB2V9,
263             NOT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
264             NULL => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
265             NULLS => DB2V6 | DB2V7 | DB2V8 | DB2V9,
266             NUMPARTS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
267             OBID => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
268             OF => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
269             OLD => DB2V9,
270             OLD_TABLE => DB2V9,
271             ON => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
272             OPEN => DB2V6 | DB2V7 | DB2V8 | DB2V9,
273             OPTIMIZATION => DB2V6 | DB2V7 | DB2V8 | DB2V9,
274             OPTIMIZE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
275             OPTION => DB2V9,
276             OR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
277             ORDER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
278             OUT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
279             OUTER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
280             OVER => DB2V9,
281             OVERRIDING => DB2V9,
282             PACKAGE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
283             PADDED => DB2V8 | DB2V9,
284             PAGESIZE => DB2V9,
285             PARAMETER => DB2V6 | DB2V7 | DB2V8 | DB2V9,
286             PART => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
287             PARTITION => DB2V8 | DB2V9,
288             PARTITIONED => DB2V8 | DB2V9,
289             PARTITIONING => DB2V8 | DB2V9,
290             PARTITIONS => DB2V9,
291             PASSWORD => DB2V9,
292             PATH => DB2V6 | DB2V7 | DB2V8 | DB2V9,
293             PIECESIZE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
294             PLAN => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
295             POSITION => DB2V9,
296             PRECISION => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
297             PREPARE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
298             PREVVAL => DB2V8 | DB2V9,
299             PRIMARY => DB2V9,
300             PRIQTY => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
301             PRIVILEGES => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
302             PROCEDURE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
303             PROGRAM => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
304             PSID => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
305             PUBLIC => DB2V9,
306             QUERY => DB2V8 | DB2V9,
307             QUERYNO => DB2V6 | DB2V7 | DB2V8 | DB2V9,
308             RANGE => DB2V9,
309             RANK => DB2V9,
310             READ => DB2V9,
311             READS => DB2V6 | DB2V7 | DB2V8 | DB2V9,
312             RECOVERY => DB2V9,
313             REFERENCES => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
314             REFERENCING => DB2V9,
315             REFRESH => DB2V8 | DB2V9,
316             RELEASE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
317             RENAME => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
318             REPEAT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
319             RESET => DB2V9,
320             RESIGNAL => DB2V8 | DB2V9,
321             RESTART => DB2V9,
322             RESTRICT => DB2V6 | DB2V7 | DB2V8 | DB2V9,
323             RESULT => DB2V6 | DB2V7 | DB2V8 | DB2V9,
324             RESULT_SET_LOCATOR => DB2V6 | DB2V7 | DB2V8 | DB2V9,
325             RETURN => DB2V6 | DB2V7 | DB2V8 | DB2V9,
326             RETURNS => DB2V6 | DB2V7 | DB2V8 | DB2V9,
327             REVOKE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
328             RIGHT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
329             ROLE => DB2V9,
330             ROLLBACK => DB2V6 | DB2V7 | DB2V8 | DB2V9,
331             ROUND_CEILING => DB2V9,
332             ROUND_DOWN => DB2V9,
333             ROUND_FLOOR => DB2V9,
334             ROUND_HALF_DOWN => DB2V9,
335             ROUND_HALF_EVEN => DB2V9,
336             ROUND_HALF_UP => DB2V9,
337             ROUND_UP => DB2V9,
338             ROUTINE => DB2V9,
339             ROW => DB2V9,
340             ROW_NUMBER => DB2V9,
341             ROWNUMBER => DB2V9,
342             ROWS => DB2V9,
343             ROWSET => DB2V8 | DB2V9,
344             RRN => DB2V9,
345             RUN => DB2V6 | DB2V7 | DB2V8 | DB2V9,
346             SAVEPOINT => DB2V6 | DB2V7 | DB2V8 | DB2V9,
347             SCHEMA => DB2V6 | DB2V7 | DB2V8 | DB2V9,
348             SCRATCHPAD => DB2V6 | DB2V7 | DB2V8 | DB2V9,
349             SCROLL => DB2V9,
350             SEARCH => DB2V9,
351             SECOND => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
352             SECONDS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
353             SECQTY => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
354             SECURITY => DB2V6 | DB2V7 | DB2V8 | DB2V9,
355             SELECT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
356             SENSITIVE => DB2V7 | DB2V8 | DB2V9,
357             SEQUENCE => DB2V8 | DB2V9,
358             SESSION => DB2V9,
359             SESSION_USER => DB2V9,
360             SET => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
361             SIGNAL => DB2V8 | DB2V9,
362             SIMPLE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
363             SNAN => DB2V9,
364             SOME => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
365             SOURCE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
366             SPECIFIC => DB2V6 | DB2V7 | DB2V8 | DB2V9,
367             SQL => DB2V9,
368             SQLID => DB2V9,
369             STACKED => DB2V9,
370             STANDARD => DB2V6 | DB2V7 | DB2V8 | DB2V9,
371             START => DB2V9,
372             STARTING => DB2V9,
373             STATEMENT => DB2V9,
374             STATIC => DB2V7 | DB2V8 | DB2V9,
375             STATMENT => DB2V9,
376             STAY => DB2V6 | DB2V7 | DB2V8 | DB2V9,
377             STOGROUP => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
378             STORES => DB2V6 | DB2V7 | DB2V8 | DB2V9,
379             STYLE => DB2V6 | DB2V7 | DB2V8 | DB2V9,
380             SUBPAGES => DB2V5 | DB2V6 | DB2V7,
381             SUBSTRING => DB2V9,
382             SUMMARY => DB2V8 | DB2V9,
383             SYNONYM => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
384             SYSFUN => DB2V6 | DB2V7 | DB2V8 | DB2V9,
385             SYSIBM => DB2V6 | DB2V7 | DB2V8 | DB2V9,
386             SYSPROC => DB2V6 | DB2V7 | DB2V8 | DB2V9,
387             SYSTEM => DB2V6 | DB2V7 | DB2V8 | DB2V9,
388             SYSTEM_USER => DB2V9,
389             TABLE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
390             TABLESPACE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
391             THEN => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
392             TIME => DB2V9,
393             TIMESTAMP => DB2V9,
394             TO => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
395             TRANSACTION => DB2V9,
396             TRIGGER => DB2V6 | DB2V7 | DB2V8 | DB2V9,
397             TRIM => DB2V9,
398             TRUNCATE => DB2V9,
399             TYPE => DB2V9,
400             UNDO => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
401             UNION => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
402             UNIQUE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
403             UNTIL => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
404             UPDATE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
405             USAGE => DB2V9,
406             USER => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
407             USING => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
408             VALIDPROC => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
409             VALUE => DB2V8 | DB2V9,
410             VALUES => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
411             VARIABLE => DB2V8 | DB2V9,
412             VARIANT => DB2V6 | DB2V7 | DB2V8 | DB2V9,
413             VCAT => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
414             VERSION => DB2V9,
415             VIEW => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
416             VOLATILE => DB2V8 | DB2V9,
417             VOLUMES => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
418             WHEN => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
419             WHENEVER => DB2V8 | DB2V9,
420             WHERE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
421             WHILE => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
422             WITH => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
423             WITHOUT => DB2V9,
424             WLM => DB2V6 | DB2V7 | DB2V8 | DB2V9,
425             WRITE => DB2V9,
426             XMLELEMENT => DB2V8 | DB2V9,
427             XMLEXISTS => DB2V9,
428             XMLNAMESPACES => DB2V9,
429             YEAR => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9,
430             YEARS => DB2V5 | DB2V6 | DB2V7 | DB2V8 | DB2V9
431             );
432              
433             sub is_reserved {
434 36   100 36 1 336 return $WORDS{ uc(pop || '') } || 0;
435             }
436              
437             sub is_reserved_by_db2v5 {
438 5     5 1 15 return &is_reserved & DB2V5;
439             }
440              
441             sub is_reserved_by_db2v6 {
442 5     5 1 17 return &is_reserved & DB2V6;
443             }
444              
445             sub is_reserved_by_db2v7 {
446 5     5 1 21 return &is_reserved & DB2V7;
447             }
448              
449             sub is_reserved_by_db2v8 {
450 5     5 1 15 return &is_reserved & DB2V8;
451             }
452              
453             sub is_reserved_by_db2v9 {
454 5     5 1 18 return &is_reserved & DB2V9;
455             }
456              
457             sub reserved_by {
458 5     5 1 12 my $flags = &is_reserved;
459 5         10 my @reserved_by = ();
460              
461 5 100       17 push @reserved_by, 'DB2 5' if $flags & DB2V5;
462 5 100       14 push @reserved_by, 'DB2 6' if $flags & DB2V6;
463 5 100       28 push @reserved_by, 'DB2 7' if $flags & DB2V7;
464 5 100       15 push @reserved_by, 'DB2 8' if $flags & DB2V8;
465 5 100       12 push @reserved_by, 'DB2 9' if $flags & DB2V9;
466              
467 5         34 return @reserved_by;
468             }
469              
470             sub words {
471 2     2 1 13546 return sort keys %WORDS;
472             }
473             }
474              
475             1;
476              
477             __END__