pgsql-deparser 17.12.2 → 17.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/kwlist.js ADDED
@@ -0,0 +1,531 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated from PostgreSQL kwlist.h
4
+ * DO NOT EDIT BY HAND.
5
+ */
6
+ export const kwlist = {
7
+ UNRESERVED_KEYWORD: [
8
+ "abort",
9
+ "absent",
10
+ "absolute",
11
+ "access",
12
+ "action",
13
+ "add",
14
+ "admin",
15
+ "after",
16
+ "aggregate",
17
+ "also",
18
+ "alter",
19
+ "always",
20
+ "asensitive",
21
+ "assertion",
22
+ "assignment",
23
+ "at",
24
+ "atomic",
25
+ "attach",
26
+ "attribute",
27
+ "backward",
28
+ "before",
29
+ "begin",
30
+ "breadth",
31
+ "by",
32
+ "cache",
33
+ "call",
34
+ "called",
35
+ "cascade",
36
+ "cascaded",
37
+ "catalog",
38
+ "chain",
39
+ "characteristics",
40
+ "checkpoint",
41
+ "class",
42
+ "close",
43
+ "cluster",
44
+ "columns",
45
+ "comment",
46
+ "comments",
47
+ "commit",
48
+ "committed",
49
+ "compression",
50
+ "conditional",
51
+ "configuration",
52
+ "conflict",
53
+ "connection",
54
+ "constraints",
55
+ "content",
56
+ "continue",
57
+ "conversion",
58
+ "copy",
59
+ "cost",
60
+ "csv",
61
+ "cube",
62
+ "current",
63
+ "cursor",
64
+ "cycle",
65
+ "data",
66
+ "database",
67
+ "day",
68
+ "deallocate",
69
+ "declare",
70
+ "defaults",
71
+ "deferred",
72
+ "definer",
73
+ "delete",
74
+ "delimiter",
75
+ "delimiters",
76
+ "depends",
77
+ "depth",
78
+ "detach",
79
+ "dictionary",
80
+ "disable",
81
+ "discard",
82
+ "document",
83
+ "domain",
84
+ "double",
85
+ "drop",
86
+ "each",
87
+ "empty",
88
+ "enable",
89
+ "encoding",
90
+ "encrypted",
91
+ "enforced",
92
+ "enum",
93
+ "error",
94
+ "escape",
95
+ "event",
96
+ "exclude",
97
+ "excluding",
98
+ "exclusive",
99
+ "execute",
100
+ "explain",
101
+ "expression",
102
+ "extension",
103
+ "external",
104
+ "family",
105
+ "filter",
106
+ "finalize",
107
+ "first",
108
+ "following",
109
+ "force",
110
+ "format",
111
+ "forward",
112
+ "function",
113
+ "functions",
114
+ "generated",
115
+ "global",
116
+ "granted",
117
+ "groups",
118
+ "handler",
119
+ "header",
120
+ "hold",
121
+ "hour",
122
+ "identity",
123
+ "if",
124
+ "ignore",
125
+ "immediate",
126
+ "immutable",
127
+ "implicit",
128
+ "import",
129
+ "include",
130
+ "including",
131
+ "increment",
132
+ "indent",
133
+ "index",
134
+ "indexes",
135
+ "inherit",
136
+ "inherits",
137
+ "inline",
138
+ "input",
139
+ "insensitive",
140
+ "insert",
141
+ "instead",
142
+ "invoker",
143
+ "isolation",
144
+ "keep",
145
+ "key",
146
+ "keys",
147
+ "label",
148
+ "language",
149
+ "large",
150
+ "last",
151
+ "leakproof",
152
+ "level",
153
+ "listen",
154
+ "load",
155
+ "local",
156
+ "location",
157
+ "lock",
158
+ "locked",
159
+ "logged",
160
+ "lsn",
161
+ "mapping",
162
+ "match",
163
+ "matched",
164
+ "materialized",
165
+ "maxvalue",
166
+ "merge",
167
+ "method",
168
+ "minute",
169
+ "minvalue",
170
+ "mode",
171
+ "month",
172
+ "move",
173
+ "name",
174
+ "names",
175
+ "nested",
176
+ "new",
177
+ "next",
178
+ "nfc",
179
+ "nfd",
180
+ "nfkc",
181
+ "nfkd",
182
+ "no",
183
+ "normalized",
184
+ "nothing",
185
+ "notify",
186
+ "nowait",
187
+ "nulls",
188
+ "object",
189
+ "objects",
190
+ "of",
191
+ "off",
192
+ "oids",
193
+ "old",
194
+ "omit",
195
+ "operator",
196
+ "option",
197
+ "options",
198
+ "ordinality",
199
+ "others",
200
+ "over",
201
+ "overriding",
202
+ "owned",
203
+ "owner",
204
+ "parallel",
205
+ "parameter",
206
+ "parser",
207
+ "partial",
208
+ "partition",
209
+ "partitions",
210
+ "passing",
211
+ "password",
212
+ "path",
213
+ "period",
214
+ "plan",
215
+ "plans",
216
+ "policy",
217
+ "preceding",
218
+ "prepare",
219
+ "prepared",
220
+ "preserve",
221
+ "prior",
222
+ "privileges",
223
+ "procedural",
224
+ "procedure",
225
+ "procedures",
226
+ "program",
227
+ "publication",
228
+ "quote",
229
+ "quotes",
230
+ "range",
231
+ "read",
232
+ "reassign",
233
+ "recursive",
234
+ "ref",
235
+ "referencing",
236
+ "refresh",
237
+ "reindex",
238
+ "relative",
239
+ "release",
240
+ "rename",
241
+ "repeatable",
242
+ "replace",
243
+ "replica",
244
+ "reset",
245
+ "respect",
246
+ "restart",
247
+ "restrict",
248
+ "return",
249
+ "returns",
250
+ "revoke",
251
+ "role",
252
+ "rollback",
253
+ "rollup",
254
+ "routine",
255
+ "routines",
256
+ "rows",
257
+ "rule",
258
+ "savepoint",
259
+ "scalar",
260
+ "schema",
261
+ "schemas",
262
+ "scroll",
263
+ "search",
264
+ "second",
265
+ "security",
266
+ "sequence",
267
+ "sequences",
268
+ "serializable",
269
+ "server",
270
+ "session",
271
+ "set",
272
+ "sets",
273
+ "share",
274
+ "show",
275
+ "simple",
276
+ "skip",
277
+ "snapshot",
278
+ "source",
279
+ "split",
280
+ "sql",
281
+ "stable",
282
+ "standalone",
283
+ "start",
284
+ "statement",
285
+ "statistics",
286
+ "stdin",
287
+ "stdout",
288
+ "storage",
289
+ "stored",
290
+ "strict",
291
+ "string",
292
+ "strip",
293
+ "subscription",
294
+ "support",
295
+ "sysid",
296
+ "system",
297
+ "tables",
298
+ "tablespace",
299
+ "target",
300
+ "temp",
301
+ "template",
302
+ "temporary",
303
+ "text",
304
+ "ties",
305
+ "transaction",
306
+ "transform",
307
+ "trigger",
308
+ "truncate",
309
+ "trusted",
310
+ "type",
311
+ "types",
312
+ "uescape",
313
+ "unbounded",
314
+ "uncommitted",
315
+ "unconditional",
316
+ "unencrypted",
317
+ "unknown",
318
+ "unlisten",
319
+ "unlogged",
320
+ "until",
321
+ "update",
322
+ "vacuum",
323
+ "valid",
324
+ "validate",
325
+ "validator",
326
+ "value",
327
+ "varying",
328
+ "version",
329
+ "view",
330
+ "views",
331
+ "virtual",
332
+ "volatile",
333
+ "wait",
334
+ "whitespace",
335
+ "within",
336
+ "without",
337
+ "work",
338
+ "wrapper",
339
+ "write",
340
+ "xml",
341
+ "year",
342
+ "yes",
343
+ "zone"
344
+ ],
345
+ RESERVED_KEYWORD: [
346
+ "all",
347
+ "analyse",
348
+ "analyze",
349
+ "and",
350
+ "any",
351
+ "array",
352
+ "as",
353
+ "asc",
354
+ "asymmetric",
355
+ "both",
356
+ "case",
357
+ "cast",
358
+ "check",
359
+ "collate",
360
+ "column",
361
+ "constraint",
362
+ "create",
363
+ "current_catalog",
364
+ "current_date",
365
+ "current_role",
366
+ "current_time",
367
+ "current_timestamp",
368
+ "current_user",
369
+ "default",
370
+ "deferrable",
371
+ "desc",
372
+ "distinct",
373
+ "do",
374
+ "else",
375
+ "end",
376
+ "except",
377
+ "false",
378
+ "fetch",
379
+ "for",
380
+ "foreign",
381
+ "from",
382
+ "grant",
383
+ "group",
384
+ "having",
385
+ "in",
386
+ "initially",
387
+ "intersect",
388
+ "into",
389
+ "lateral",
390
+ "leading",
391
+ "limit",
392
+ "localtime",
393
+ "localtimestamp",
394
+ "not",
395
+ "null",
396
+ "offset",
397
+ "on",
398
+ "only",
399
+ "or",
400
+ "order",
401
+ "placing",
402
+ "primary",
403
+ "references",
404
+ "returning",
405
+ "select",
406
+ "session_user",
407
+ "some",
408
+ "symmetric",
409
+ "system_user",
410
+ "table",
411
+ "then",
412
+ "to",
413
+ "trailing",
414
+ "true",
415
+ "union",
416
+ "unique",
417
+ "user",
418
+ "using",
419
+ "variadic",
420
+ "when",
421
+ "where",
422
+ "window",
423
+ "with"
424
+ ],
425
+ TYPE_FUNC_NAME_KEYWORD: [
426
+ "authorization",
427
+ "binary",
428
+ "collation",
429
+ "concurrently",
430
+ "cross",
431
+ "current_schema",
432
+ "freeze",
433
+ "full",
434
+ "ilike",
435
+ "inner",
436
+ "is",
437
+ "isnull",
438
+ "join",
439
+ "left",
440
+ "like",
441
+ "natural",
442
+ "notnull",
443
+ "outer",
444
+ "overlaps",
445
+ "right",
446
+ "similar",
447
+ "tablesample",
448
+ "verbose"
449
+ ],
450
+ COL_NAME_KEYWORD: [
451
+ "between",
452
+ "bigint",
453
+ "bit",
454
+ "boolean",
455
+ "char",
456
+ "character",
457
+ "coalesce",
458
+ "dec",
459
+ "decimal",
460
+ "exists",
461
+ "extract",
462
+ "float",
463
+ "greatest",
464
+ "grouping",
465
+ "inout",
466
+ "int",
467
+ "integer",
468
+ "interval",
469
+ "json",
470
+ "json_array",
471
+ "json_arrayagg",
472
+ "json_exists",
473
+ "json_object",
474
+ "json_objectagg",
475
+ "json_query",
476
+ "json_scalar",
477
+ "json_serialize",
478
+ "json_table",
479
+ "json_value",
480
+ "least",
481
+ "merge_action",
482
+ "national",
483
+ "nchar",
484
+ "none",
485
+ "normalize",
486
+ "nullif",
487
+ "numeric",
488
+ "out",
489
+ "overlay",
490
+ "position",
491
+ "precision",
492
+ "real",
493
+ "row",
494
+ "setof",
495
+ "smallint",
496
+ "substring",
497
+ "time",
498
+ "timestamp",
499
+ "treat",
500
+ "trim",
501
+ "values",
502
+ "varchar",
503
+ "xmlattributes",
504
+ "xmlconcat",
505
+ "xmlelement",
506
+ "xmlexists",
507
+ "xmlforest",
508
+ "xmlnamespaces",
509
+ "xmlparse",
510
+ "xmlpi",
511
+ "xmlroot",
512
+ "xmlserialize",
513
+ "xmltable"
514
+ ]
515
+ };
516
+ export const RESERVED_KEYWORDS = new Set(kwlist.RESERVED_KEYWORD ?? []);
517
+ export const UNRESERVED_KEYWORDS = new Set(kwlist.UNRESERVED_KEYWORD ?? []);
518
+ export const COL_NAME_KEYWORDS = new Set(kwlist.COL_NAME_KEYWORD ?? []);
519
+ export const TYPE_FUNC_NAME_KEYWORDS = new Set(kwlist.TYPE_FUNC_NAME_KEYWORD ?? []);
520
+ export function keywordKindOf(word) {
521
+ const w = word.toLowerCase();
522
+ if (RESERVED_KEYWORDS.has(w))
523
+ return "RESERVED_KEYWORD";
524
+ if (TYPE_FUNC_NAME_KEYWORDS.has(w))
525
+ return "TYPE_FUNC_NAME_KEYWORD";
526
+ if (COL_NAME_KEYWORDS.has(w))
527
+ return "COL_NAME_KEYWORD";
528
+ if (UNRESERVED_KEYWORDS.has(w))
529
+ return "UNRESERVED_KEYWORD";
530
+ return "NO_KEYWORD";
531
+ }