line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::Dialects::ANSI; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
######################################################################### |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# This module is copyright (c), 2001,2005 by Jeff Zucker. |
6
|
|
|
|
|
|
|
# This module is copyright (c), 2007-2020 by Jens Rehsack. |
7
|
|
|
|
|
|
|
# All rights reserved. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# It may be freely distributed under the same terms as Perl itself. |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# See below for help (search for SYNOPSIS) |
12
|
|
|
|
|
|
|
######################################################################### |
13
|
|
|
|
|
|
|
|
14
|
16
|
|
|
16
|
|
117
|
use strict; |
|
16
|
|
|
|
|
40
|
|
|
16
|
|
|
|
|
621
|
|
15
|
16
|
|
|
16
|
|
94
|
use warnings FATAL => "all"; |
|
16
|
|
|
|
|
39
|
|
|
16
|
|
|
|
|
711
|
|
16
|
|
|
|
|
|
|
|
17
|
16
|
|
|
16
|
|
98
|
use vars qw($VERSION); |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
971
|
|
18
|
|
|
|
|
|
|
$VERSION = '1.413_001'; |
19
|
|
|
|
|
|
|
|
20
|
16
|
|
|
16
|
|
7139
|
use SQL::Dialects::Role; |
|
16
|
|
|
|
|
49
|
|
|
16
|
|
|
|
|
2505
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub get_config |
23
|
|
|
|
|
|
|
{ |
24
|
17
|
|
|
17
|
1
|
822
|
return <
|
25
|
|
|
|
|
|
|
[VALID COMMANDS] |
26
|
|
|
|
|
|
|
CREATE |
27
|
|
|
|
|
|
|
DROP |
28
|
|
|
|
|
|
|
SELECT |
29
|
|
|
|
|
|
|
DELETE |
30
|
|
|
|
|
|
|
INSERT |
31
|
|
|
|
|
|
|
UPDATE |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
[VALID OPTIONS] |
34
|
|
|
|
|
|
|
SELECT_MULTIPLE_TABLES |
35
|
|
|
|
|
|
|
SELECT_AGGREGATE_FUNCTIONS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
[VALID COMPARISON OPERATORS] |
38
|
|
|
|
|
|
|
= |
39
|
|
|
|
|
|
|
<> |
40
|
|
|
|
|
|
|
< |
41
|
|
|
|
|
|
|
<= |
42
|
|
|
|
|
|
|
> |
43
|
|
|
|
|
|
|
>= |
44
|
|
|
|
|
|
|
LIKE |
45
|
|
|
|
|
|
|
NOT LIKE |
46
|
|
|
|
|
|
|
IS |
47
|
|
|
|
|
|
|
IS NOT |
48
|
|
|
|
|
|
|
IN |
49
|
|
|
|
|
|
|
NOT IN |
50
|
|
|
|
|
|
|
BETWEEN |
51
|
|
|
|
|
|
|
NOT BETWEEN |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
[VALID DATA TYPES] |
54
|
|
|
|
|
|
|
CHARACTER |
55
|
|
|
|
|
|
|
CHAR |
56
|
|
|
|
|
|
|
CHARACTER VARYING |
57
|
|
|
|
|
|
|
CHAR VARYING |
58
|
|
|
|
|
|
|
VARCHAR |
59
|
|
|
|
|
|
|
CHARACTER SET |
60
|
|
|
|
|
|
|
NATIONAL CHARACTER |
61
|
|
|
|
|
|
|
NATIONAL CHAR |
62
|
|
|
|
|
|
|
NCHAR |
63
|
|
|
|
|
|
|
NATIONAL CHARACTER VARYING |
64
|
|
|
|
|
|
|
NATIONAL CHAR VARYING |
65
|
|
|
|
|
|
|
NCHAR VARYING |
66
|
|
|
|
|
|
|
BIT |
67
|
|
|
|
|
|
|
BIT VARYING |
68
|
|
|
|
|
|
|
NUMERIC |
69
|
|
|
|
|
|
|
DECIMAL |
70
|
|
|
|
|
|
|
DEC |
71
|
|
|
|
|
|
|
INTEGER |
72
|
|
|
|
|
|
|
INT |
73
|
|
|
|
|
|
|
SMALLINT |
74
|
|
|
|
|
|
|
FLOAT |
75
|
|
|
|
|
|
|
REAL |
76
|
|
|
|
|
|
|
DOUBLE PRECISION |
77
|
|
|
|
|
|
|
DATE |
78
|
|
|
|
|
|
|
TIME |
79
|
|
|
|
|
|
|
TIMESTAMP |
80
|
|
|
|
|
|
|
INTERVAL |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
[RESERVED WORDS] |
83
|
|
|
|
|
|
|
ABSOLUTE |
84
|
|
|
|
|
|
|
ACTION |
85
|
|
|
|
|
|
|
ADD |
86
|
|
|
|
|
|
|
ALL |
87
|
|
|
|
|
|
|
ALLOCATE |
88
|
|
|
|
|
|
|
ALTER |
89
|
|
|
|
|
|
|
AND |
90
|
|
|
|
|
|
|
ANY |
91
|
|
|
|
|
|
|
ARE |
92
|
|
|
|
|
|
|
AS |
93
|
|
|
|
|
|
|
ASC |
94
|
|
|
|
|
|
|
ASSERTION |
95
|
|
|
|
|
|
|
AT |
96
|
|
|
|
|
|
|
AUTHORIZATION |
97
|
|
|
|
|
|
|
AVG |
98
|
|
|
|
|
|
|
BEGIN |
99
|
|
|
|
|
|
|
BETWEEN |
100
|
|
|
|
|
|
|
BIT |
101
|
|
|
|
|
|
|
BIT_LENGTH |
102
|
|
|
|
|
|
|
BOTH |
103
|
|
|
|
|
|
|
BY |
104
|
|
|
|
|
|
|
CASCADE |
105
|
|
|
|
|
|
|
CASCADED |
106
|
|
|
|
|
|
|
CASE |
107
|
|
|
|
|
|
|
CAST |
108
|
|
|
|
|
|
|
CATALOG |
109
|
|
|
|
|
|
|
CHAR |
110
|
|
|
|
|
|
|
CHARACTER |
111
|
|
|
|
|
|
|
CHAR_LENGTH |
112
|
|
|
|
|
|
|
CHARACTER_LENGTH |
113
|
|
|
|
|
|
|
CHECK |
114
|
|
|
|
|
|
|
CLOSE |
115
|
|
|
|
|
|
|
COALESCE |
116
|
|
|
|
|
|
|
COLLATE |
117
|
|
|
|
|
|
|
COLLATION |
118
|
|
|
|
|
|
|
COLUMN |
119
|
|
|
|
|
|
|
COMMIT |
120
|
|
|
|
|
|
|
CONNECT |
121
|
|
|
|
|
|
|
CONNECTION |
122
|
|
|
|
|
|
|
CONSTRAINT |
123
|
|
|
|
|
|
|
CONSTRAINTS |
124
|
|
|
|
|
|
|
CONTINUE |
125
|
|
|
|
|
|
|
CONVERT |
126
|
|
|
|
|
|
|
CORRESPONDING |
127
|
|
|
|
|
|
|
COUNT |
128
|
|
|
|
|
|
|
CREATE |
129
|
|
|
|
|
|
|
CROSS |
130
|
|
|
|
|
|
|
CURRENT |
131
|
|
|
|
|
|
|
CURRENT_DATE |
132
|
|
|
|
|
|
|
CURRENT_TIME |
133
|
|
|
|
|
|
|
CURRENT_TIMESTAMP |
134
|
|
|
|
|
|
|
CURRENT_USER |
135
|
|
|
|
|
|
|
CURSOR |
136
|
|
|
|
|
|
|
DATE |
137
|
|
|
|
|
|
|
DAY |
138
|
|
|
|
|
|
|
DEALLOCATE |
139
|
|
|
|
|
|
|
DEC |
140
|
|
|
|
|
|
|
DECIMAL |
141
|
|
|
|
|
|
|
DECLARE |
142
|
|
|
|
|
|
|
DEFAULT |
143
|
|
|
|
|
|
|
DEFERRABLE |
144
|
|
|
|
|
|
|
DEFERRED |
145
|
|
|
|
|
|
|
DELETE |
146
|
|
|
|
|
|
|
DESC |
147
|
|
|
|
|
|
|
DESCRIBE |
148
|
|
|
|
|
|
|
DESCRIPTOR |
149
|
|
|
|
|
|
|
DIAGNOSTICS |
150
|
|
|
|
|
|
|
DISCONNECT |
151
|
|
|
|
|
|
|
DISTINCT |
152
|
|
|
|
|
|
|
DOMAIN |
153
|
|
|
|
|
|
|
DOUBLE |
154
|
|
|
|
|
|
|
DROP |
155
|
|
|
|
|
|
|
ELSE |
156
|
|
|
|
|
|
|
END |
157
|
|
|
|
|
|
|
END-EXEC |
158
|
|
|
|
|
|
|
ESCAPE |
159
|
|
|
|
|
|
|
EXCEPT |
160
|
|
|
|
|
|
|
EXCEPTION |
161
|
|
|
|
|
|
|
EXEC |
162
|
|
|
|
|
|
|
EXECUTE |
163
|
|
|
|
|
|
|
EXISTS |
164
|
|
|
|
|
|
|
EXTERNAL |
165
|
|
|
|
|
|
|
EXTRACT |
166
|
|
|
|
|
|
|
FALSE |
167
|
|
|
|
|
|
|
FETCH |
168
|
|
|
|
|
|
|
FIRST |
169
|
|
|
|
|
|
|
FLOAT |
170
|
|
|
|
|
|
|
FOR |
171
|
|
|
|
|
|
|
FOREIGN |
172
|
|
|
|
|
|
|
FOUND |
173
|
|
|
|
|
|
|
FROM |
174
|
|
|
|
|
|
|
FULL |
175
|
|
|
|
|
|
|
GET |
176
|
|
|
|
|
|
|
GLOBAL |
177
|
|
|
|
|
|
|
GO |
178
|
|
|
|
|
|
|
GOTO |
179
|
|
|
|
|
|
|
GRANT |
180
|
|
|
|
|
|
|
GROUP |
181
|
|
|
|
|
|
|
HAVING |
182
|
|
|
|
|
|
|
HOUR |
183
|
|
|
|
|
|
|
IDENTITY |
184
|
|
|
|
|
|
|
IMMEDIATE |
185
|
|
|
|
|
|
|
IN |
186
|
|
|
|
|
|
|
INDICATOR |
187
|
|
|
|
|
|
|
INITIALLY |
188
|
|
|
|
|
|
|
INNER |
189
|
|
|
|
|
|
|
INPUT |
190
|
|
|
|
|
|
|
INSENSITIVE |
191
|
|
|
|
|
|
|
INSERT |
192
|
|
|
|
|
|
|
INT |
193
|
|
|
|
|
|
|
INTEGER |
194
|
|
|
|
|
|
|
INTERSECT |
195
|
|
|
|
|
|
|
INTERVAL |
196
|
|
|
|
|
|
|
INTO |
197
|
|
|
|
|
|
|
IS |
198
|
|
|
|
|
|
|
ISOLATION |
199
|
|
|
|
|
|
|
JOIN |
200
|
|
|
|
|
|
|
KEY |
201
|
|
|
|
|
|
|
LANGUAGE |
202
|
|
|
|
|
|
|
LAST |
203
|
|
|
|
|
|
|
LEADING |
204
|
|
|
|
|
|
|
LEFT |
205
|
|
|
|
|
|
|
LEVEL |
206
|
|
|
|
|
|
|
LIKE |
207
|
|
|
|
|
|
|
LOCAL |
208
|
|
|
|
|
|
|
LOWER |
209
|
|
|
|
|
|
|
MATCH |
210
|
|
|
|
|
|
|
MAX |
211
|
|
|
|
|
|
|
MIN |
212
|
|
|
|
|
|
|
MINUTE |
213
|
|
|
|
|
|
|
MODULE |
214
|
|
|
|
|
|
|
MONTH |
215
|
|
|
|
|
|
|
NAMES |
216
|
|
|
|
|
|
|
NATIONAL |
217
|
|
|
|
|
|
|
NATURAL |
218
|
|
|
|
|
|
|
NCHAR |
219
|
|
|
|
|
|
|
NEXT |
220
|
|
|
|
|
|
|
NO |
221
|
|
|
|
|
|
|
NOT |
222
|
|
|
|
|
|
|
NULL |
223
|
|
|
|
|
|
|
NULLIF |
224
|
|
|
|
|
|
|
NUMERIC |
225
|
|
|
|
|
|
|
OCTET_LENGTH |
226
|
|
|
|
|
|
|
OF |
227
|
|
|
|
|
|
|
ON |
228
|
|
|
|
|
|
|
ONLY |
229
|
|
|
|
|
|
|
OPEN |
230
|
|
|
|
|
|
|
OPTION |
231
|
|
|
|
|
|
|
OR |
232
|
|
|
|
|
|
|
ORDER |
233
|
|
|
|
|
|
|
OUTER |
234
|
|
|
|
|
|
|
OUTPUT |
235
|
|
|
|
|
|
|
OVERLAPS |
236
|
|
|
|
|
|
|
PAD |
237
|
|
|
|
|
|
|
PARTIAL |
238
|
|
|
|
|
|
|
POSITION |
239
|
|
|
|
|
|
|
PRECISION |
240
|
|
|
|
|
|
|
PREPARE |
241
|
|
|
|
|
|
|
PRESERVE |
242
|
|
|
|
|
|
|
PRIMARY |
243
|
|
|
|
|
|
|
PRIOR |
244
|
|
|
|
|
|
|
PRIVILEGES |
245
|
|
|
|
|
|
|
PROCEDURE |
246
|
|
|
|
|
|
|
PUBLIC |
247
|
|
|
|
|
|
|
READ |
248
|
|
|
|
|
|
|
REAL |
249
|
|
|
|
|
|
|
REFERENCES |
250
|
|
|
|
|
|
|
RELATIVE |
251
|
|
|
|
|
|
|
RESTRICT |
252
|
|
|
|
|
|
|
REVOKE |
253
|
|
|
|
|
|
|
RIGHT |
254
|
|
|
|
|
|
|
ROLLBACK |
255
|
|
|
|
|
|
|
ROWS |
256
|
|
|
|
|
|
|
SCHEMA |
257
|
|
|
|
|
|
|
SCROLL |
258
|
|
|
|
|
|
|
SECOND |
259
|
|
|
|
|
|
|
SECTION |
260
|
|
|
|
|
|
|
SELECT |
261
|
|
|
|
|
|
|
SESSION |
262
|
|
|
|
|
|
|
SESSION_USER |
263
|
|
|
|
|
|
|
SET |
264
|
|
|
|
|
|
|
SIZE |
265
|
|
|
|
|
|
|
SMALLINT |
266
|
|
|
|
|
|
|
SOME |
267
|
|
|
|
|
|
|
SPACE |
268
|
|
|
|
|
|
|
SQL |
269
|
|
|
|
|
|
|
SQLCODE |
270
|
|
|
|
|
|
|
SQLERROR |
271
|
|
|
|
|
|
|
SQLSTATE |
272
|
|
|
|
|
|
|
SUBSTRING |
273
|
|
|
|
|
|
|
SUM |
274
|
|
|
|
|
|
|
SYSTEM_USER |
275
|
|
|
|
|
|
|
TABLE |
276
|
|
|
|
|
|
|
TEMPORARY |
277
|
|
|
|
|
|
|
THEN |
278
|
|
|
|
|
|
|
TIME |
279
|
|
|
|
|
|
|
TIMESTAMP |
280
|
|
|
|
|
|
|
TIMEZONE_HOUR |
281
|
|
|
|
|
|
|
TIMEZONE_MINUTE |
282
|
|
|
|
|
|
|
TO |
283
|
|
|
|
|
|
|
TRAILING |
284
|
|
|
|
|
|
|
TRANSACTION |
285
|
|
|
|
|
|
|
TRANSLATE |
286
|
|
|
|
|
|
|
TRANSLATION |
287
|
|
|
|
|
|
|
TRIM |
288
|
|
|
|
|
|
|
TRUE |
289
|
|
|
|
|
|
|
UNION |
290
|
|
|
|
|
|
|
UNIQUE |
291
|
|
|
|
|
|
|
UNKNOWN |
292
|
|
|
|
|
|
|
UPDATE |
293
|
|
|
|
|
|
|
UPPER |
294
|
|
|
|
|
|
|
USAGE |
295
|
|
|
|
|
|
|
USER |
296
|
|
|
|
|
|
|
USING |
297
|
|
|
|
|
|
|
VALUE |
298
|
|
|
|
|
|
|
VALUES |
299
|
|
|
|
|
|
|
VARCHAR |
300
|
|
|
|
|
|
|
VARYING |
301
|
|
|
|
|
|
|
VIEW |
302
|
|
|
|
|
|
|
WHEN |
303
|
|
|
|
|
|
|
WHENEVER |
304
|
|
|
|
|
|
|
WHERE |
305
|
|
|
|
|
|
|
WITH |
306
|
|
|
|
|
|
|
WORK |
307
|
|
|
|
|
|
|
WRITE |
308
|
|
|
|
|
|
|
YEAR |
309
|
|
|
|
|
|
|
ZONE |
310
|
|
|
|
|
|
|
EOC |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
1; |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
=pod |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=head1 NAME |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
SQL::Dialects::ANSI |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
=head1 SYNOPSIS |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
use SQL::Dialects::ANSI; |
323
|
|
|
|
|
|
|
$config = SQL::Dialects::ANSI->get_config(); |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
=head1 DESCRIPTION |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
This package provides the necessary configuration for ANSI SQL, as far it's |
328
|
|
|
|
|
|
|
supported. |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=head1 FUNCTIONS |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=head2 get_config |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
Returns the configuration for ANSI SQL. The configuration is delivered in |
335
|
|
|
|
|
|
|
ini-style: |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
[VALID COMMANDS] |
338
|
|
|
|
|
|
|
... |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
[VALID OPTIONS] |
341
|
|
|
|
|
|
|
... |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
[VALID COMPARISON OPERATORS] |
344
|
|
|
|
|
|
|
... |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
[VALID DATA TYPES] |
347
|
|
|
|
|
|
|
... |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
[RESERVED WORDS] |
350
|
|
|
|
|
|
|
... |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
=head1 AUTHOR & COPYRIGHT |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
This module is |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
copyright (c) 2001,2005 by Jeff Zucker and |
357
|
|
|
|
|
|
|
copyright (c) 2007-2020 by Jens Rehsack. |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
All rights reserved. |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
The module may be freely distributed under the same terms as |
362
|
|
|
|
|
|
|
Perl itself using either the "GPL License" or the "Artistic |
363
|
|
|
|
|
|
|
License" as specified in the Perl README file. |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
Jeff can be reached at: jzuckerATcpan.org |
366
|
|
|
|
|
|
|
Jens can be reached at: rehsackATcpan.org or via dbi-devATperl.org |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
=cut |