pgsql-deparser 13.18.0 → 13.19.1

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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -10
  3. package/deparser/deparser.d.ts +308 -0
  4. package/deparser/deparser.js +10477 -0
  5. package/deparser/index.d.ts +9 -0
  6. package/deparser/index.js +17 -0
  7. package/deparser/utils/list-utils.d.ts +8 -0
  8. package/deparser/utils/list-utils.js +30 -0
  9. package/deparser/utils/quote-utils.d.ts +24 -0
  10. package/deparser/utils/quote-utils.js +89 -0
  11. package/deparser/utils/sql-formatter.d.ts +16 -0
  12. package/deparser/utils/sql-formatter.js +40 -0
  13. package/deparser/visitors/base.d.ts +68 -0
  14. package/deparser/visitors/base.js +122 -0
  15. package/{src/deparser/deparser.ts → esm/deparser/deparser.js} +751 -752
  16. package/{src/deparser/index.ts → esm/deparser/index.js} +3 -4
  17. package/{src/deparser/utils/list-utils.ts → esm/deparser/utils/list-utils.js} +2 -3
  18. package/{src/deparser/utils/quote-utils.ts → esm/deparser/utils/quote-utils.js} +6 -7
  19. package/{src/deparser/utils/sql-formatter.ts → esm/deparser/utils/sql-formatter.js} +10 -11
  20. package/{src/deparser/visitors/base.ts → esm/deparser/visitors/base.js} +34 -62
  21. package/esm/index.js +15 -0
  22. package/{src/v13-to-v14.ts → esm/v13-to-v14.js} +472 -609
  23. package/{src/v13-to-v17-direct.ts → esm/v13-to-v17-direct.js} +11 -12
  24. package/{src/v14-to-v15.ts → esm/v14-to-v15.js} +261 -662
  25. package/{src/v15-to-v16.ts → esm/v15-to-v16.js} +814 -1229
  26. package/esm/v16-to-v17.js +1488 -0
  27. package/index.d.ts +9 -0
  28. package/index.js +19 -0
  29. package/package.json +5 -5
  30. package/v13-to-v14.d.ts +253 -0
  31. package/v13-to-v14.js +2754 -0
  32. package/v13-to-v17-direct.d.ts +24 -0
  33. package/v13-to-v17-direct.js +82 -0
  34. package/v14-to-v15.d.ts +616 -0
  35. package/v14-to-v15.js +1227 -0
  36. package/v15-to-v16.d.ts +633 -0
  37. package/v15-to-v16.js +2944 -0
  38. package/v16-to-v17.d.ts +638 -0
  39. package/v16-to-v17.js +1492 -0
  40. package/src/index.ts +0 -27
  41. package/src/v16-to-v17.ts +0 -1897
  42. package/tsconfig.esm.json +0 -8
  43. package/tsconfig.json +0 -26
@@ -2,14 +2,13 @@
2
2
  * Auto-generated file with types stripped for better tree-shaking
3
3
  * DO NOT EDIT - Generated by strip-transformer-types.ts
4
4
  */
5
-
6
- // @ts-nocheck
5
+ // @ts-nocheck
7
6
  /**
8
7
  * V15 to V16 AST Transformer
9
8
  * Transforms PostgreSQL v15 AST nodes to v16 format
10
9
  */
11
10
  export class V15ToV16Transformer {
12
- transform(node: any, context: any = { parentNodeTypes: [] }): any {
11
+ transform(node, context = { parentNodeTypes: [] }) {
13
12
  if (node == null) {
14
13
  return null;
15
14
  }
@@ -27,28 +26,28 @@ export class V15ToV16Transformer {
27
26
  }
28
27
  catch (error) {
29
28
  const nodeType = Object.keys(node)[0];
30
- throw new Error(`Error transforming ${nodeType}: ${(error as Error).message}`);
29
+ throw new Error(`Error transforming ${nodeType}: ${error.message}`);
31
30
  }
32
31
  }
33
- visit(node: any, context: any = { parentNodeTypes: [] }): any {
32
+ visit(node, context = { parentNodeTypes: [] }) {
34
33
  const nodeType = this.getNodeType(node);
35
34
  // Handle empty objects
36
35
  if (!nodeType) {
37
36
  return {};
38
37
  }
39
38
  const nodeData = this.getNodeData(node);
40
- const methodName = nodeType as keyof this;
39
+ const methodName = nodeType;
41
40
  if (typeof this[methodName] === 'function') {
42
- const childContext: any = {
41
+ const childContext = {
43
42
  ...context,
44
43
  parentNodeTypes: [...(context.parentNodeTypes || []), nodeType]
45
44
  };
46
- return (this[methodName] as any)(nodeData, childContext);
45
+ return this[methodName](nodeData, childContext);
47
46
  }
48
47
  // If no specific method, return the node as-is
49
48
  return node;
50
49
  }
51
- getNodeType(node: any): any {
50
+ getNodeType(node) {
52
51
  const keys = Object.keys(node);
53
52
  // Handle parse result structure with version and stmts
54
53
  if (keys.length === 2 && keys.includes('version') && keys.includes('stmts')) {
@@ -56,18 +55,18 @@ export class V15ToV16Transformer {
56
55
  }
57
56
  return keys[0];
58
57
  }
59
- getNodeData(node: any): any {
58
+ getNodeData(node) {
60
59
  const keys = Object.keys(node);
61
- if (keys.length === 1 && typeof (node as any)[keys[0]] === 'object') {
62
- return (node as any)[keys[0]];
60
+ if (keys.length === 1 && typeof node[keys[0]] === 'object') {
61
+ return node[keys[0]];
63
62
  }
64
63
  return node;
65
64
  }
66
- ParseResult(node: any, context: any): any {
65
+ ParseResult(node, context) {
67
66
  if (node && typeof node === 'object' && 'version' in node && 'stmts' in node) {
68
67
  return {
69
68
  version: 160000, // PG16 version
70
- stmts: node.stmts.map((stmt: any) => {
69
+ stmts: node.stmts.map((stmt) => {
71
70
  if (stmt && typeof stmt === 'object' && 'stmt' in stmt) {
72
71
  return {
73
72
  ...stmt,
@@ -78,14 +77,12 @@ export class V15ToV16Transformer {
78
77
  })
79
78
  };
80
79
  }
81
- return node as any;
80
+ return node;
82
81
  }
83
- RawStmt(node: any, context: any): {
84
- RawStmt: any;
85
- } {
86
- const result: any = {};
82
+ RawStmt(node, context) {
83
+ const result = {};
87
84
  if (node.stmt !== undefined) {
88
- result.stmt = this.transform(node.stmt as any, context);
85
+ result.stmt = this.transform(node.stmt, context);
89
86
  }
90
87
  if (node.stmt_location !== undefined) {
91
88
  result.stmt_location = node.stmt_location;
@@ -95,73 +92,71 @@ export class V15ToV16Transformer {
95
92
  }
96
93
  return { RawStmt: result };
97
94
  }
98
- SelectStmt(node: any, context: any): {
99
- SelectStmt: any;
100
- } {
101
- const result: any = {};
95
+ SelectStmt(node, context) {
96
+ const result = {};
102
97
  if (node.distinctClause !== undefined) {
103
98
  result.distinctClause = Array.isArray(node.distinctClause)
104
- ? node.distinctClause.map((item: any) => this.transform(item as any, context))
105
- : this.transform(node.distinctClause as any, context);
99
+ ? node.distinctClause.map((item) => this.transform(item, context))
100
+ : this.transform(node.distinctClause, context);
106
101
  }
107
102
  if (node.intoClause !== undefined) {
108
- result.intoClause = this.transform(node.intoClause as any, context);
103
+ result.intoClause = this.transform(node.intoClause, context);
109
104
  }
110
105
  if (node.targetList !== undefined) {
111
106
  result.targetList = Array.isArray(node.targetList)
112
- ? node.targetList.map((item: any) => this.transform(item as any, context))
113
- : this.transform(node.targetList as any, context);
107
+ ? node.targetList.map((item) => this.transform(item, context))
108
+ : this.transform(node.targetList, context);
114
109
  }
115
110
  if (node.fromClause !== undefined) {
116
111
  result.fromClause = Array.isArray(node.fromClause)
117
- ? node.fromClause.map((item: any) => this.transform(item as any, context))
118
- : this.transform(node.fromClause as any, context);
112
+ ? node.fromClause.map((item) => this.transform(item, context))
113
+ : this.transform(node.fromClause, context);
119
114
  }
120
115
  if (node.whereClause !== undefined) {
121
- result.whereClause = this.transform(node.whereClause as any, context);
116
+ result.whereClause = this.transform(node.whereClause, context);
122
117
  }
123
118
  if (node.groupClause !== undefined) {
124
119
  result.groupClause = Array.isArray(node.groupClause)
125
- ? node.groupClause.map((item: any) => this.transform(item as any, context))
126
- : this.transform(node.groupClause as any, context);
120
+ ? node.groupClause.map((item) => this.transform(item, context))
121
+ : this.transform(node.groupClause, context);
127
122
  }
128
123
  if (node.groupDistinct !== undefined) {
129
124
  result.groupDistinct = node.groupDistinct;
130
125
  }
131
126
  if (node.havingClause !== undefined) {
132
- result.havingClause = this.transform(node.havingClause as any, context);
127
+ result.havingClause = this.transform(node.havingClause, context);
133
128
  }
134
129
  if (node.windowClause !== undefined) {
135
130
  result.windowClause = Array.isArray(node.windowClause)
136
- ? node.windowClause.map((item: any) => this.transform(item as any, context))
137
- : this.transform(node.windowClause as any, context);
131
+ ? node.windowClause.map((item) => this.transform(item, context))
132
+ : this.transform(node.windowClause, context);
138
133
  }
139
134
  if (node.valuesLists !== undefined) {
140
135
  result.valuesLists = Array.isArray(node.valuesLists)
141
- ? node.valuesLists.map((item: any) => this.transform(item as any, context))
142
- : this.transform(node.valuesLists as any, context);
136
+ ? node.valuesLists.map((item) => this.transform(item, context))
137
+ : this.transform(node.valuesLists, context);
143
138
  }
144
139
  if (node.sortClause !== undefined) {
145
140
  result.sortClause = Array.isArray(node.sortClause)
146
- ? node.sortClause.map((item: any) => this.transform(item as any, context))
147
- : this.transform(node.sortClause as any, context);
141
+ ? node.sortClause.map((item) => this.transform(item, context))
142
+ : this.transform(node.sortClause, context);
148
143
  }
149
144
  if (node.limitOffset !== undefined) {
150
- result.limitOffset = this.transform(node.limitOffset as any, context);
145
+ result.limitOffset = this.transform(node.limitOffset, context);
151
146
  }
152
147
  if (node.limitCount !== undefined) {
153
- result.limitCount = this.transform(node.limitCount as any, context);
148
+ result.limitCount = this.transform(node.limitCount, context);
154
149
  }
155
150
  if (node.limitOption !== undefined) {
156
151
  result.limitOption = node.limitOption;
157
152
  }
158
153
  if (node.lockingClause !== undefined) {
159
154
  result.lockingClause = Array.isArray(node.lockingClause)
160
- ? node.lockingClause.map((item: any) => this.transform(item as any, context))
161
- : this.transform(node.lockingClause as any, context);
155
+ ? node.lockingClause.map((item) => this.transform(item, context))
156
+ : this.transform(node.lockingClause, context);
162
157
  }
163
158
  if (node.withClause !== undefined) {
164
- result.withClause = this.transform(node.withClause as any, context);
159
+ result.withClause = this.transform(node.withClause, context);
165
160
  }
166
161
  if (node.op !== undefined) {
167
162
  result.op = node.op;
@@ -170,130 +165,120 @@ export class V15ToV16Transformer {
170
165
  result.all = node.all;
171
166
  }
172
167
  if (node.larg !== undefined) {
173
- result.larg = this.transform(node.larg as any, context);
168
+ result.larg = this.transform(node.larg, context);
174
169
  }
175
170
  if (node.rarg !== undefined) {
176
- result.rarg = this.transform(node.rarg as any, context);
171
+ result.rarg = this.transform(node.rarg, context);
177
172
  }
178
173
  return { SelectStmt: result };
179
174
  }
180
- A_Expr(node: any, context: any): {
181
- A_Expr: any;
182
- } {
183
- const result: any = {};
175
+ A_Expr(node, context) {
176
+ const result = {};
184
177
  if (node.kind !== undefined) {
185
178
  result.kind = node.kind;
186
179
  }
187
180
  if (node.name !== undefined) {
188
181
  result.name = Array.isArray(node.name)
189
- ? node.name.map((item: any) => this.transform(item as any, context))
190
- : this.transform(node.name as any, context);
182
+ ? node.name.map((item) => this.transform(item, context))
183
+ : this.transform(node.name, context);
191
184
  }
192
185
  if (node.lexpr !== undefined) {
193
- result.lexpr = this.transform(node.lexpr as any, context);
186
+ result.lexpr = this.transform(node.lexpr, context);
194
187
  }
195
188
  if (node.rexpr !== undefined) {
196
- result.rexpr = this.transform(node.rexpr as any, context);
189
+ result.rexpr = this.transform(node.rexpr, context);
197
190
  }
198
191
  if (node.location !== undefined) {
199
192
  result.location = node.location;
200
193
  }
201
194
  return { A_Expr: result };
202
195
  }
203
- InsertStmt(node: any, context: any): {
204
- InsertStmt: any;
205
- } {
206
- const result: any = {};
196
+ InsertStmt(node, context) {
197
+ const result = {};
207
198
  if (node.relation !== undefined) {
208
- result.relation = this.transform(node.relation as any, context);
199
+ result.relation = this.transform(node.relation, context);
209
200
  }
210
201
  if (node.cols !== undefined) {
211
202
  result.cols = Array.isArray(node.cols)
212
- ? node.cols.map((item: any) => this.transform(item as any, context))
213
- : this.transform(node.cols as any, context);
203
+ ? node.cols.map((item) => this.transform(item, context))
204
+ : this.transform(node.cols, context);
214
205
  }
215
206
  if (node.selectStmt !== undefined) {
216
- result.selectStmt = this.transform(node.selectStmt as any, context);
207
+ result.selectStmt = this.transform(node.selectStmt, context);
217
208
  }
218
209
  if (node.onConflictClause !== undefined) {
219
- result.onConflictClause = this.transform(node.onConflictClause as any, context);
210
+ result.onConflictClause = this.transform(node.onConflictClause, context);
220
211
  }
221
212
  if (node.returningList !== undefined) {
222
213
  result.returningList = Array.isArray(node.returningList)
223
- ? node.returningList.map((item: any) => this.transform(item as any, context))
224
- : this.transform(node.returningList as any, context);
214
+ ? node.returningList.map((item) => this.transform(item, context))
215
+ : this.transform(node.returningList, context);
225
216
  }
226
217
  if (node.withClause !== undefined) {
227
- result.withClause = this.transform(node.withClause as any, context);
218
+ result.withClause = this.transform(node.withClause, context);
228
219
  }
229
220
  if (node.override !== undefined) {
230
221
  result.override = node.override;
231
222
  }
232
223
  return { InsertStmt: result };
233
224
  }
234
- UpdateStmt(node: any, context: any): {
235
- UpdateStmt: any;
236
- } {
237
- const result: any = {};
225
+ UpdateStmt(node, context) {
226
+ const result = {};
238
227
  if (node.relation !== undefined) {
239
- result.relation = this.transform(node.relation as any, context);
228
+ result.relation = this.transform(node.relation, context);
240
229
  }
241
230
  if (node.targetList !== undefined) {
242
231
  result.targetList = Array.isArray(node.targetList)
243
- ? node.targetList.map((item: any) => this.transform(item as any, context))
244
- : this.transform(node.targetList as any, context);
232
+ ? node.targetList.map((item) => this.transform(item, context))
233
+ : this.transform(node.targetList, context);
245
234
  }
246
235
  if (node.whereClause !== undefined) {
247
- result.whereClause = this.transform(node.whereClause as any, context);
236
+ result.whereClause = this.transform(node.whereClause, context);
248
237
  }
249
238
  if (node.fromClause !== undefined) {
250
239
  result.fromClause = Array.isArray(node.fromClause)
251
- ? node.fromClause.map((item: any) => this.transform(item as any, context))
252
- : this.transform(node.fromClause as any, context);
240
+ ? node.fromClause.map((item) => this.transform(item, context))
241
+ : this.transform(node.fromClause, context);
253
242
  }
254
243
  if (node.returningList !== undefined) {
255
244
  result.returningList = Array.isArray(node.returningList)
256
- ? node.returningList.map((item: any) => this.transform(item as any, context))
257
- : this.transform(node.returningList as any, context);
245
+ ? node.returningList.map((item) => this.transform(item, context))
246
+ : this.transform(node.returningList, context);
258
247
  }
259
248
  if (node.withClause !== undefined) {
260
- result.withClause = this.transform(node.withClause as any, context);
249
+ result.withClause = this.transform(node.withClause, context);
261
250
  }
262
251
  return { UpdateStmt: result };
263
252
  }
264
- DeleteStmt(node: any, context: any): {
265
- DeleteStmt: any;
266
- } {
267
- const result: any = {};
253
+ DeleteStmt(node, context) {
254
+ const result = {};
268
255
  if (node.relation !== undefined) {
269
- result.relation = this.transform(node.relation as any, context);
256
+ result.relation = this.transform(node.relation, context);
270
257
  }
271
258
  if (node.usingClause !== undefined) {
272
259
  result.usingClause = Array.isArray(node.usingClause)
273
- ? node.usingClause.map((item: any) => this.transform(item as any, context))
274
- : this.transform(node.usingClause as any, context);
260
+ ? node.usingClause.map((item) => this.transform(item, context))
261
+ : this.transform(node.usingClause, context);
275
262
  }
276
263
  if (node.whereClause !== undefined) {
277
- result.whereClause = this.transform(node.whereClause as any, context);
264
+ result.whereClause = this.transform(node.whereClause, context);
278
265
  }
279
266
  if (node.returningList !== undefined) {
280
267
  result.returningList = Array.isArray(node.returningList)
281
- ? node.returningList.map((item: any) => this.transform(item as any, context))
282
- : this.transform(node.returningList as any, context);
268
+ ? node.returningList.map((item) => this.transform(item, context))
269
+ : this.transform(node.returningList, context);
283
270
  }
284
271
  if (node.withClause !== undefined) {
285
- result.withClause = this.transform(node.withClause as any, context);
272
+ result.withClause = this.transform(node.withClause, context);
286
273
  }
287
274
  return { DeleteStmt: result };
288
275
  }
289
- WithClause(node: any, context: any): {
290
- WithClause: any;
291
- } {
292
- const result: any = {};
276
+ WithClause(node, context) {
277
+ const result = {};
293
278
  if (node.ctes !== undefined) {
294
279
  result.ctes = Array.isArray(node.ctes)
295
- ? node.ctes.map((item: any) => this.transform(item as any, context))
296
- : this.transform(node.ctes as any, context);
280
+ ? node.ctes.map((item) => this.transform(item, context))
281
+ : this.transform(node.ctes, context);
297
282
  }
298
283
  if (node.recursive !== undefined) {
299
284
  result.recursive = node.recursive;
@@ -303,51 +288,43 @@ export class V15ToV16Transformer {
303
288
  }
304
289
  return { WithClause: result };
305
290
  }
306
- ResTarget(node: any, context: any): {
307
- ResTarget: any;
308
- } {
309
- const result: any = {};
291
+ ResTarget(node, context) {
292
+ const result = {};
310
293
  if (node.name !== undefined) {
311
294
  result.name = node.name;
312
295
  }
313
296
  if (node.indirection !== undefined) {
314
297
  result.indirection = Array.isArray(node.indirection)
315
- ? node.indirection.map((item: any) => this.transform(item as any, context))
316
- : this.transform(node.indirection as any, context);
298
+ ? node.indirection.map((item) => this.transform(item, context))
299
+ : this.transform(node.indirection, context);
317
300
  }
318
301
  if (node.val !== undefined) {
319
- result.val = this.transform(node.val as any, context);
302
+ result.val = this.transform(node.val, context);
320
303
  }
321
304
  if (node.location !== undefined) {
322
305
  result.location = node.location;
323
306
  }
324
307
  return { ResTarget: result };
325
308
  }
326
- BoolExpr(node: any, context: any): {
327
- BoolExpr: any;
328
- } {
329
- const result: any = {};
309
+ BoolExpr(node, context) {
310
+ const result = {};
330
311
  if (node.boolop !== undefined) {
331
312
  result.boolop = node.boolop;
332
313
  }
333
314
  if (node.args !== undefined) {
334
315
  result.args = Array.isArray(node.args)
335
- ? node.args.map((item: any) => this.transform(item as any, context))
336
- : this.transform(node.args as any, context);
316
+ ? node.args.map((item) => this.transform(item, context))
317
+ : this.transform(node.args, context);
337
318
  }
338
319
  if (node.location !== undefined) {
339
320
  result.location = node.location;
340
321
  }
341
322
  return { BoolExpr: result };
342
323
  }
343
- FuncCall(node: any, context: any): {
344
- FuncCall: any;
345
- } | {
346
- ColumnRef: any;
347
- } {
348
- const result: any = {};
324
+ FuncCall(node, context) {
325
+ const result = {};
349
326
  if (node.funcname !== undefined) {
350
- if (node.funcname.length === 1 && (node.funcname[0] as any)?.String?.sval === 'json_object') {
327
+ if (node.funcname.length === 1 && node.funcname[0]?.String?.sval === 'json_object') {
351
328
  result.funcname = [
352
329
  {
353
330
  String: { sval: 'pg_catalog' }
@@ -356,8 +333,8 @@ export class V15ToV16Transformer {
356
333
  ];
357
334
  }
358
335
  else if (node.funcname.length === 2 &&
359
- (node.funcname[0] as any)?.String?.sval === 'pg_catalog' &&
360
- (node.funcname[1] as any)?.String?.sval === 'system_user' &&
336
+ node.funcname[0]?.String?.sval === 'pg_catalog' &&
337
+ node.funcname[1]?.String?.sval === 'system_user' &&
361
338
  node.funcformat === 'COERCE_SQL_SYNTAX') {
362
339
  return {
363
340
  ColumnRef: {
@@ -369,25 +346,25 @@ export class V15ToV16Transformer {
369
346
  }
370
347
  else {
371
348
  result.funcname = Array.isArray(node.funcname)
372
- ? node.funcname.map((item: any) => this.transform(item as any, context))
373
- : this.transform(node.funcname as any, context);
349
+ ? node.funcname.map((item) => this.transform(item, context))
350
+ : this.transform(node.funcname, context);
374
351
  }
375
352
  }
376
353
  if (node.args !== undefined) {
377
354
  result.args = Array.isArray(node.args)
378
- ? node.args.map((item: any) => this.transform(item as any, context))
379
- : this.transform(node.args as any, context);
355
+ ? node.args.map((item) => this.transform(item, context))
356
+ : this.transform(node.args, context);
380
357
  }
381
358
  if (node.agg_order !== undefined) {
382
359
  result.agg_order = Array.isArray(node.agg_order)
383
- ? node.agg_order.map((item: any) => this.transform(item as any, context))
384
- : this.transform(node.agg_order as any, context);
360
+ ? node.agg_order.map((item) => this.transform(item, context))
361
+ : this.transform(node.agg_order, context);
385
362
  }
386
363
  if (node.agg_filter !== undefined) {
387
- result.agg_filter = this.transform(node.agg_filter as any, context);
364
+ result.agg_filter = this.transform(node.agg_filter, context);
388
365
  }
389
366
  if (node.over !== undefined) {
390
- result.over = this.transform(node.over as any, context);
367
+ result.over = this.transform(node.over, context);
391
368
  }
392
369
  if (node.agg_within_group !== undefined) {
393
370
  result.agg_within_group = node.agg_within_group;
@@ -409,12 +386,10 @@ export class V15ToV16Transformer {
409
386
  }
410
387
  return { FuncCall: result };
411
388
  }
412
- FuncExpr(node: any, context: any): {
413
- FuncExpr: any;
414
- } {
415
- const result: any = {};
389
+ FuncExpr(node, context) {
390
+ const result = {};
416
391
  if (node.xpr !== undefined) {
417
- result.xpr = this.transform(node.xpr as any, context);
392
+ result.xpr = this.transform(node.xpr, context);
418
393
  }
419
394
  if (node.funcid !== undefined) {
420
395
  result.funcid = node.funcid;
@@ -439,20 +414,18 @@ export class V15ToV16Transformer {
439
414
  }
440
415
  if (node.args !== undefined) {
441
416
  result.args = Array.isArray(node.args)
442
- ? node.args.map((item: any) => this.transform(item as any, context))
443
- : this.transform(node.args as any, context);
417
+ ? node.args.map((item) => this.transform(item, context))
418
+ : this.transform(node.args, context);
444
419
  }
445
420
  if (node.location !== undefined) {
446
421
  result.location = node.location;
447
422
  }
448
423
  return { FuncExpr: result };
449
424
  }
450
- A_Const(node: any, context: any): {
451
- A_Const: any;
452
- } {
453
- const result: any = { ...node };
425
+ A_Const(node, context) {
426
+ const result = { ...node };
454
427
  if (result.val) {
455
- const val: any = result.val;
428
+ const val = result.val;
456
429
  if (val.String && val.String.str !== undefined) {
457
430
  result.sval = val.String.str;
458
431
  delete result.val;
@@ -475,14 +448,10 @@ export class V15ToV16Transformer {
475
448
  }
476
449
  return { A_Const: result };
477
450
  }
478
- ColumnRef(node: any, context: any): {
479
- ColumnRef: any;
480
- } | {
481
- FuncCall: any;
482
- } {
451
+ ColumnRef(node, context) {
483
452
  if (node.fields && Array.isArray(node.fields) && node.fields.length === 1) {
484
453
  const field = node.fields[0];
485
- if ((field as any)?.String?.sval === 'system_user') {
454
+ if (field?.String?.sval === 'system_user') {
486
455
  return {
487
456
  FuncCall: {
488
457
  funcname: [
@@ -494,25 +463,23 @@ export class V15ToV16Transformer {
494
463
  };
495
464
  }
496
465
  }
497
- const result: any = {};
466
+ const result = {};
498
467
  if (node.fields !== undefined) {
499
468
  result.fields = Array.isArray(node.fields)
500
- ? node.fields.map((item: any) => this.transform(item as any, context))
501
- : this.transform(node.fields as any, context);
469
+ ? node.fields.map((item) => this.transform(item, context))
470
+ : this.transform(node.fields, context);
502
471
  }
503
472
  if (node.location !== undefined) {
504
473
  result.location = node.location;
505
474
  }
506
475
  return { ColumnRef: result };
507
476
  }
508
- TypeName(node: any, context: any): {
509
- TypeName: any;
510
- } {
511
- const result: any = {};
477
+ TypeName(node, context) {
478
+ const result = {};
512
479
  if (node.names !== undefined) {
513
480
  result.names = Array.isArray(node.names)
514
- ? node.names.map((item: any) => this.transform(item as any, context))
515
- : this.transform(node.names as any, context);
481
+ ? node.names.map((item) => this.transform(item, context))
482
+ : this.transform(node.names, context);
516
483
  }
517
484
  if (node.typeOid !== undefined) {
518
485
  result.typeOid = node.typeOid;
@@ -525,45 +492,39 @@ export class V15ToV16Transformer {
525
492
  }
526
493
  if (node.typmods !== undefined) {
527
494
  result.typmods = Array.isArray(node.typmods)
528
- ? node.typmods.map((item: any) => this.transform(item as any, context))
529
- : this.transform(node.typmods as any, context);
495
+ ? node.typmods.map((item) => this.transform(item, context))
496
+ : this.transform(node.typmods, context);
530
497
  }
531
498
  if (node.typemod !== undefined) {
532
499
  result.typemod = node.typemod;
533
500
  }
534
501
  if (node.arrayBounds !== undefined) {
535
- const childContext: any = {
502
+ const childContext = {
536
503
  ...context,
537
504
  parentNodeTypes: [...(context.parentNodeTypes || []), 'TypeName']
538
505
  };
539
506
  result.arrayBounds = Array.isArray(node.arrayBounds)
540
- ? node.arrayBounds.map((item: any) => this.transform(item as any, childContext))
541
- : this.transform(node.arrayBounds as any, childContext);
507
+ ? node.arrayBounds.map((item) => this.transform(item, childContext))
508
+ : this.transform(node.arrayBounds, childContext);
542
509
  }
543
510
  if (node.location !== undefined) {
544
511
  result.location = node.location;
545
512
  }
546
513
  return { TypeName: result };
547
514
  }
548
- Alias(node: any, context: any): {
549
- Alias: any;
550
- } {
551
- const result: any = {};
515
+ Alias(node, context) {
516
+ const result = {};
552
517
  if (node.aliasname !== undefined) {
553
518
  result.aliasname = node.aliasname;
554
519
  }
555
520
  if (node.colnames !== undefined) {
556
521
  result.colnames = Array.isArray(node.colnames)
557
- ? node.colnames.map((item: any) => this.transform(item as any, context))
558
- : this.transform(node.colnames as any, context);
522
+ ? node.colnames.map((item) => this.transform(item, context))
523
+ : this.transform(node.colnames, context);
559
524
  }
560
525
  return { Alias: result };
561
526
  }
562
- RangeVar(node: any, context: any): {
563
- RangeVar: any;
564
- } | {
565
- RangeFunction: any;
566
- } {
527
+ RangeVar(node, context) {
567
528
  if (node.relname === 'system_user' && node.inh === true && node.relpersistence === 'p') {
568
529
  return {
569
530
  RangeFunction: {
@@ -580,7 +541,7 @@ export class V15ToV16Transformer {
580
541
  funcformat: 'COERCE_SQL_SYNTAX'
581
542
  }
582
543
  },
583
- {} as any
544
+ {}
584
545
  ]
585
546
  }
586
547
  }
@@ -588,7 +549,7 @@ export class V15ToV16Transformer {
588
549
  }
589
550
  };
590
551
  }
591
- const result: any = {};
552
+ const result = {};
592
553
  if (node.catalogname !== undefined) {
593
554
  result.catalogname = node.catalogname;
594
555
  }
@@ -605,68 +566,58 @@ export class V15ToV16Transformer {
605
566
  result.relpersistence = node.relpersistence;
606
567
  }
607
568
  if (node.alias !== undefined) {
608
- result.alias = this.transform(node.alias as any, context);
569
+ result.alias = this.transform(node.alias, context);
609
570
  }
610
571
  if (node.location !== undefined) {
611
572
  result.location = node.location;
612
573
  }
613
574
  return { RangeVar: result };
614
575
  }
615
- A_ArrayExpr(node: any, context: any): {
616
- A_ArrayExpr: any;
617
- } {
618
- const result: any = {};
576
+ A_ArrayExpr(node, context) {
577
+ const result = {};
619
578
  if (node.elements !== undefined) {
620
579
  result.elements = Array.isArray(node.elements)
621
- ? node.elements.map((item: any) => this.transform(item as any, context))
622
- : this.transform(node.elements as any, context);
580
+ ? node.elements.map((item) => this.transform(item, context))
581
+ : this.transform(node.elements, context);
623
582
  }
624
583
  if (node.location !== undefined) {
625
584
  result.location = node.location;
626
585
  }
627
586
  return { A_ArrayExpr: result };
628
587
  }
629
- A_Indices(node: any, context: any): {
630
- A_Indices: any;
631
- } {
632
- const result: any = {};
588
+ A_Indices(node, context) {
589
+ const result = {};
633
590
  if (node.is_slice !== undefined) {
634
591
  result.is_slice = node.is_slice;
635
592
  }
636
593
  if (node.lidx !== undefined) {
637
- result.lidx = this.transform(node.lidx as any, context);
594
+ result.lidx = this.transform(node.lidx, context);
638
595
  }
639
596
  if (node.uidx !== undefined) {
640
- result.uidx = this.transform(node.uidx as any, context);
597
+ result.uidx = this.transform(node.uidx, context);
641
598
  }
642
599
  return { A_Indices: result };
643
600
  }
644
- A_Indirection(node: any, context: any): {
645
- A_Indirection: any;
646
- } {
647
- const result: any = {};
601
+ A_Indirection(node, context) {
602
+ const result = {};
648
603
  if (node.arg !== undefined) {
649
- result.arg = this.transform(node.arg as any, context);
604
+ result.arg = this.transform(node.arg, context);
650
605
  }
651
606
  if (node.indirection !== undefined) {
652
607
  result.indirection = Array.isArray(node.indirection)
653
- ? node.indirection.map((item: any) => this.transform(item as any, context))
654
- : this.transform(node.indirection as any, context);
608
+ ? node.indirection.map((item) => this.transform(item, context))
609
+ : this.transform(node.indirection, context);
655
610
  }
656
611
  return { A_Indirection: result };
657
612
  }
658
- A_Star(node: any, context: any): {
659
- A_Star: any;
660
- } {
661
- const result: any = {};
613
+ A_Star(node, context) {
614
+ const result = {};
662
615
  return { A_Star: result };
663
616
  }
664
- CaseExpr(node: any, context: any): {
665
- CaseExpr: any;
666
- } {
667
- const result: any = {};
617
+ CaseExpr(node, context) {
618
+ const result = {};
668
619
  if (node.xpr !== undefined) {
669
- result.xpr = this.transform(node.xpr as any, context);
620
+ result.xpr = this.transform(node.xpr, context);
670
621
  }
671
622
  if (node.casetype !== undefined) {
672
623
  result.casetype = node.casetype;
@@ -675,27 +626,25 @@ export class V15ToV16Transformer {
675
626
  result.casecollid = node.casecollid;
676
627
  }
677
628
  if (node.arg !== undefined) {
678
- result.arg = this.transform(node.arg as any, context);
629
+ result.arg = this.transform(node.arg, context);
679
630
  }
680
631
  if (node.args !== undefined) {
681
632
  result.args = Array.isArray(node.args)
682
- ? node.args.map((item: any) => this.transform(item as any, context))
683
- : this.transform(node.args as any, context);
633
+ ? node.args.map((item) => this.transform(item, context))
634
+ : this.transform(node.args, context);
684
635
  }
685
636
  if (node.defresult !== undefined) {
686
- result.defresult = this.transform(node.defresult as any, context);
637
+ result.defresult = this.transform(node.defresult, context);
687
638
  }
688
639
  if (node.location !== undefined) {
689
640
  result.location = node.location;
690
641
  }
691
642
  return { CaseExpr: result };
692
643
  }
693
- CoalesceExpr(node: any, context: any): {
694
- CoalesceExpr: any;
695
- } {
696
- const result: any = {};
644
+ CoalesceExpr(node, context) {
645
+ const result = {};
697
646
  if (node.xpr !== undefined) {
698
- result.xpr = this.transform(node.xpr as any, context);
647
+ result.xpr = this.transform(node.xpr, context);
699
648
  }
700
649
  if (node.coalescetype !== undefined) {
701
650
  result.coalescetype = node.coalescetype;
@@ -705,59 +654,53 @@ export class V15ToV16Transformer {
705
654
  }
706
655
  if (node.args !== undefined) {
707
656
  result.args = Array.isArray(node.args)
708
- ? node.args.map((item: any) => this.transform(item as any, context))
709
- : this.transform(node.args as any, context);
657
+ ? node.args.map((item) => this.transform(item, context))
658
+ : this.transform(node.args, context);
710
659
  }
711
660
  if (node.location !== undefined) {
712
661
  result.location = node.location;
713
662
  }
714
663
  return { CoalesceExpr: result };
715
664
  }
716
- TypeCast(node: any, context: any): {
717
- TypeCast: any;
718
- } {
719
- const result: any = {};
665
+ TypeCast(node, context) {
666
+ const result = {};
720
667
  if (node.arg !== undefined) {
721
- result.arg = this.transform(node.arg as any, context);
668
+ result.arg = this.transform(node.arg, context);
722
669
  }
723
670
  if (node.typeName !== undefined) {
724
- const childContext: any = {
671
+ const childContext = {
725
672
  ...context,
726
673
  parentNodeTypes: [...(context.parentNodeTypes || []), 'TypeCast']
727
674
  };
728
- result.typeName = this.TypeName(node.typeName as any, childContext).TypeName;
675
+ result.typeName = this.TypeName(node.typeName, childContext).TypeName;
729
676
  }
730
677
  if (node.location !== undefined) {
731
678
  result.location = node.location;
732
679
  }
733
680
  return { TypeCast: result };
734
681
  }
735
- CollateClause(node: any, context: any): {
736
- CollateClause: any;
737
- } {
738
- const result: any = {};
682
+ CollateClause(node, context) {
683
+ const result = {};
739
684
  if (node.arg !== undefined) {
740
- result.arg = this.transform(node.arg as any, context);
685
+ result.arg = this.transform(node.arg, context);
741
686
  }
742
687
  if (node.collname !== undefined) {
743
688
  result.collname = Array.isArray(node.collname)
744
- ? node.collname.map((item: any) => this.transform(item as any, context))
745
- : this.transform(node.collname as any, context);
689
+ ? node.collname.map((item) => this.transform(item, context))
690
+ : this.transform(node.collname, context);
746
691
  }
747
692
  if (node.location !== undefined) {
748
693
  result.location = node.location;
749
694
  }
750
695
  return { CollateClause: result };
751
696
  }
752
- BooleanTest(node: any, context: any): {
753
- BooleanTest: any;
754
- } {
755
- const result: any = {};
697
+ BooleanTest(node, context) {
698
+ const result = {};
756
699
  if (node.xpr !== undefined) {
757
- result.xpr = this.transform(node.xpr as any, context);
700
+ result.xpr = this.transform(node.xpr, context);
758
701
  }
759
702
  if (node.arg !== undefined) {
760
- result.arg = this.transform(node.arg as any, context);
703
+ result.arg = this.transform(node.arg, context);
761
704
  }
762
705
  if (node.booltesttype !== undefined) {
763
706
  result.booltesttype = node.booltesttype;
@@ -767,15 +710,13 @@ export class V15ToV16Transformer {
767
710
  }
768
711
  return { BooleanTest: result };
769
712
  }
770
- NullTest(node: any, context: any): {
771
- NullTest: any;
772
- } {
773
- const result: any = {};
713
+ NullTest(node, context) {
714
+ const result = {};
774
715
  if (node.xpr !== undefined) {
775
- result.xpr = this.transform(node.xpr as any, context);
716
+ result.xpr = this.transform(node.xpr, context);
776
717
  }
777
718
  if (node.arg !== undefined) {
778
- result.arg = this.transform(node.arg as any, context);
719
+ result.arg = this.transform(node.arg, context);
779
720
  }
780
721
  if (node.nulltesttype !== undefined) {
781
722
  result.nulltesttype = node.nulltesttype;
@@ -788,83 +729,67 @@ export class V15ToV16Transformer {
788
729
  }
789
730
  return { NullTest: result };
790
731
  }
791
- String(node: any, context: any): {
792
- String: any;
793
- } {
794
- const result: any = { ...node };
732
+ String(node, context) {
733
+ const result = { ...node };
795
734
  return { String: result };
796
735
  }
797
- Integer(node: any, context: any): {
798
- Integer: any;
799
- } {
800
- const result: any = { ...node };
736
+ Integer(node, context) {
737
+ const result = { ...node };
801
738
  return { Integer: result };
802
739
  }
803
- Float(node: any, context: any): {
804
- Float: any;
805
- } {
806
- const result: any = { ...node };
740
+ Float(node, context) {
741
+ const result = { ...node };
807
742
  return { Float: result };
808
743
  }
809
- Boolean(node: any, context: any): {
810
- Boolean: any;
811
- } {
812
- const result: any = { ...node };
744
+ Boolean(node, context) {
745
+ const result = { ...node };
813
746
  return { Boolean: result };
814
747
  }
815
- BitString(node: any, context: any): {
816
- BitString: any;
817
- } {
818
- const result: any = { ...node };
748
+ BitString(node, context) {
749
+ const result = { ...node };
819
750
  return { BitString: result };
820
751
  }
821
- Null(node: any, context: any): {
822
- Null: {};
823
- } {
752
+ Null(node, context) {
824
753
  return { Null: {} };
825
754
  }
826
- List(node: any, context: any): {
827
- List: any;
828
- } {
829
- const result: any = {};
755
+ List(node, context) {
756
+ const result = {};
830
757
  if (node.items !== undefined) {
831
758
  result.items = Array.isArray(node.items)
832
- ? node.items.map((item: any) => {
833
- const transformed = this.transform(item as any, context);
759
+ ? node.items.map((item) => {
760
+ const transformed = this.transform(item, context);
834
761
  if (transformed === null) {
835
762
  return {};
836
763
  }
837
764
  return transformed;
838
765
  })
839
- : this.transform(node.items as any, context);
766
+ : this.transform(node.items, context);
840
767
  }
841
768
  return { List: result };
842
769
  }
843
- CreateStmt(node: any, context: any): {
844
- CreateStmt: any;
845
- } {
846
- const result: any = {};
770
+ CreateStmt(node, context) {
771
+ const result = {};
847
772
  if (node.relation !== undefined) {
848
- result.relation = this.transform(node.relation as any, context);
773
+ result.relation = this.transform(node.relation, context);
849
774
  }
850
775
  if (node.tableElts !== undefined) {
851
776
  result.tableElts = Array.isArray(node.tableElts)
852
- ? node.tableElts.map((item: any) => this.transform(item as any, context))
853
- : this.transform(node.tableElts as any, context);
777
+ ? node.tableElts.map((item) => this.transform(item, context))
778
+ : this.transform(node.tableElts, context);
854
779
  }
855
780
  if (node.inhRelations !== undefined) {
856
781
  result.inhRelations = Array.isArray(node.inhRelations)
857
- ? node.inhRelations.map((item: any) => this.transform(item as any, context))
858
- : this.transform(node.inhRelations as any, context);
782
+ ? node.inhRelations.map((item) => this.transform(item, context))
783
+ : this.transform(node.inhRelations, context);
859
784
  }
860
785
  if (node.partbound !== undefined) {
861
- result.partbound = this.transform(node.partbound as any, context);
786
+ result.partbound = this.transform(node.partbound, context);
862
787
  }
863
788
  if (node.partspec !== undefined) {
864
789
  // Handle partspec transformation directly since it's a plain object, not a wrapped node
865
- const partspec: any = { ...node.partspec };
790
+ const partspec = { ...node.partspec };
866
791
  if (partspec.strategy !== undefined) {
867
- const strategyMap: Record<string, string> = {
792
+ const strategyMap = {
868
793
  'range': 'PARTITION_STRATEGY_RANGE',
869
794
  'list': 'PARTITION_STRATEGY_LIST',
870
795
  'hash': 'PARTITION_STRATEGY_HASH'
@@ -873,23 +798,23 @@ export class V15ToV16Transformer {
873
798
  }
874
799
  if (partspec.partParams !== undefined) {
875
800
  partspec.partParams = Array.isArray(partspec.partParams)
876
- ? partspec.partParams.map((item: any) => this.transform(item as any, context))
877
- : this.transform(partspec.partParams as any, context);
801
+ ? partspec.partParams.map((item) => this.transform(item, context))
802
+ : this.transform(partspec.partParams, context);
878
803
  }
879
804
  result.partspec = partspec;
880
805
  }
881
806
  if (node.ofTypename !== undefined) {
882
- result.ofTypename = this.transform(node.ofTypename as any, context);
807
+ result.ofTypename = this.transform(node.ofTypename, context);
883
808
  }
884
809
  if (node.constraints !== undefined) {
885
810
  result.constraints = Array.isArray(node.constraints)
886
- ? node.constraints.map((item: any) => this.transform(item as any, context))
887
- : this.transform(node.constraints as any, context);
811
+ ? node.constraints.map((item) => this.transform(item, context))
812
+ : this.transform(node.constraints, context);
888
813
  }
889
814
  if (node.options !== undefined) {
890
815
  result.options = Array.isArray(node.options)
891
- ? node.options.map((item: any) => this.transform(item as any, context))
892
- : this.transform(node.options as any, context);
816
+ ? node.options.map((item) => this.transform(item, context))
817
+ : this.transform(node.options, context);
893
818
  }
894
819
  if (node.oncommit !== undefined) {
895
820
  result.oncommit = node.oncommit;
@@ -905,15 +830,13 @@ export class V15ToV16Transformer {
905
830
  }
906
831
  return { CreateStmt: result };
907
832
  }
908
- ColumnDef(node: any, context: any): {
909
- ColumnDef: any;
910
- } {
911
- const result: any = {};
833
+ ColumnDef(node, context) {
834
+ const result = {};
912
835
  if (node.colname !== undefined) {
913
836
  result.colname = node.colname;
914
837
  }
915
838
  if (node.typeName !== undefined) {
916
- const transformedTypeName = this.transform({ TypeName: node.typeName } as any, context);
839
+ const transformedTypeName = this.transform({ TypeName: node.typeName }, context);
917
840
  result.typeName = transformedTypeName.TypeName;
918
841
  }
919
842
  if (node.inhcount !== undefined) {
@@ -932,45 +855,43 @@ export class V15ToV16Transformer {
932
855
  result.storage = node.storage;
933
856
  }
934
857
  if (node.raw_default !== undefined) {
935
- result.raw_default = this.transform(node.raw_default as any, context);
858
+ result.raw_default = this.transform(node.raw_default, context);
936
859
  }
937
860
  if (node.cooked_default !== undefined) {
938
- result.cooked_default = this.transform(node.cooked_default as any, context);
861
+ result.cooked_default = this.transform(node.cooked_default, context);
939
862
  }
940
863
  if (node.identity !== undefined) {
941
864
  result.identity = node.identity;
942
865
  }
943
866
  if (node.identitySequence !== undefined) {
944
- result.identitySequence = this.transform(node.identitySequence as any, context);
867
+ result.identitySequence = this.transform(node.identitySequence, context);
945
868
  }
946
869
  if (node.generated !== undefined) {
947
870
  result.generated = node.generated;
948
871
  }
949
872
  if (node.collClause !== undefined) {
950
- result.collClause = this.transform(node.collClause as any, context);
873
+ result.collClause = this.transform(node.collClause, context);
951
874
  }
952
875
  if (node.collOid !== undefined) {
953
876
  result.collOid = node.collOid;
954
877
  }
955
878
  if (node.constraints !== undefined) {
956
879
  result.constraints = Array.isArray(node.constraints)
957
- ? node.constraints.map((item: any) => this.transform(item as any, context))
958
- : this.transform(node.constraints as any, context);
880
+ ? node.constraints.map((item) => this.transform(item, context))
881
+ : this.transform(node.constraints, context);
959
882
  }
960
883
  if (node.fdwoptions !== undefined) {
961
884
  result.fdwoptions = Array.isArray(node.fdwoptions)
962
- ? node.fdwoptions.map((item: any) => this.transform(item as any, context))
963
- : this.transform(node.fdwoptions as any, context);
885
+ ? node.fdwoptions.map((item) => this.transform(item, context))
886
+ : this.transform(node.fdwoptions, context);
964
887
  }
965
888
  if (node.location !== undefined) {
966
889
  result.location = node.location;
967
890
  }
968
891
  return { ColumnDef: result };
969
892
  }
970
- Constraint(node: any, context: any): {
971
- Constraint: any;
972
- } {
973
- const result: any = {};
893
+ Constraint(node, context) {
894
+ const result = {};
974
895
  if (node.contype !== undefined) {
975
896
  result.contype = node.contype;
976
897
  }
@@ -990,7 +911,7 @@ export class V15ToV16Transformer {
990
911
  result.is_no_inherit = node.is_no_inherit;
991
912
  }
992
913
  if (node.raw_expr !== undefined) {
993
- result.raw_expr = this.transform(node.raw_expr as any, context);
914
+ result.raw_expr = this.transform(node.raw_expr, context);
994
915
  }
995
916
  if (node.cooked_expr !== undefined) {
996
917
  result.cooked_expr = node.cooked_expr;
@@ -1000,23 +921,23 @@ export class V15ToV16Transformer {
1000
921
  }
1001
922
  if (node.keys !== undefined) {
1002
923
  result.keys = Array.isArray(node.keys)
1003
- ? node.keys.map((item: any) => this.transform(item as any, context))
1004
- : this.transform(node.keys as any, context);
924
+ ? node.keys.map((item) => this.transform(item, context))
925
+ : this.transform(node.keys, context);
1005
926
  }
1006
927
  if (node.including !== undefined) {
1007
928
  result.including = Array.isArray(node.including)
1008
- ? node.including.map((item: any) => this.transform(item as any, context))
1009
- : this.transform(node.including as any, context);
929
+ ? node.including.map((item) => this.transform(item, context))
930
+ : this.transform(node.including, context);
1010
931
  }
1011
932
  if (node.exclusions !== undefined) {
1012
933
  result.exclusions = Array.isArray(node.exclusions)
1013
- ? node.exclusions.map((item: any) => this.transform(item as any, context))
1014
- : this.transform(node.exclusions as any, context);
934
+ ? node.exclusions.map((item) => this.transform(item, context))
935
+ : this.transform(node.exclusions, context);
1015
936
  }
1016
937
  if (node.options !== undefined) {
1017
938
  result.options = Array.isArray(node.options)
1018
- ? node.options.map((item: any) => this.transform(item as any, context))
1019
- : this.transform(node.options as any, context);
939
+ ? node.options.map((item) => this.transform(item, context))
940
+ : this.transform(node.options, context);
1020
941
  }
1021
942
  if (node.indexname !== undefined) {
1022
943
  result.indexname = node.indexname;
@@ -1031,20 +952,20 @@ export class V15ToV16Transformer {
1031
952
  result.access_method = node.access_method;
1032
953
  }
1033
954
  if (node.where_clause !== undefined) {
1034
- result.where_clause = this.transform(node.where_clause as any, context);
955
+ result.where_clause = this.transform(node.where_clause, context);
1035
956
  }
1036
957
  if (node.pktable !== undefined) {
1037
- result.pktable = this.transform(node.pktable as any, context);
958
+ result.pktable = this.transform(node.pktable, context);
1038
959
  }
1039
960
  if (node.fk_attrs !== undefined) {
1040
961
  result.fk_attrs = Array.isArray(node.fk_attrs)
1041
- ? node.fk_attrs.map((item: any) => this.transform(item as any, context))
1042
- : this.transform(node.fk_attrs as any, context);
962
+ ? node.fk_attrs.map((item) => this.transform(item, context))
963
+ : this.transform(node.fk_attrs, context);
1043
964
  }
1044
965
  if (node.pk_attrs !== undefined) {
1045
966
  result.pk_attrs = Array.isArray(node.pk_attrs)
1046
- ? node.pk_attrs.map((item: any) => this.transform(item as any, context))
1047
- : this.transform(node.pk_attrs as any, context);
967
+ ? node.pk_attrs.map((item) => this.transform(item, context))
968
+ : this.transform(node.pk_attrs, context);
1048
969
  }
1049
970
  if (node.fk_matchtype !== undefined) {
1050
971
  result.fk_matchtype = node.fk_matchtype;
@@ -1057,8 +978,8 @@ export class V15ToV16Transformer {
1057
978
  }
1058
979
  if (node.old_conpfeqop !== undefined) {
1059
980
  result.old_conpfeqop = Array.isArray(node.old_conpfeqop)
1060
- ? node.old_conpfeqop.map((item: any) => this.transform(item as any, context))
1061
- : this.transform(node.old_conpfeqop as any, context);
981
+ ? node.old_conpfeqop.map((item) => this.transform(item, context))
982
+ : this.transform(node.old_conpfeqop, context);
1062
983
  }
1063
984
  if (node.old_pktable_oid !== undefined) {
1064
985
  result.old_pktable_oid = node.old_pktable_oid;
@@ -1074,12 +995,10 @@ export class V15ToV16Transformer {
1074
995
  }
1075
996
  return { Constraint: result };
1076
997
  }
1077
- SubLink(node: any, context: any): {
1078
- SubLink: any;
1079
- } {
1080
- const result: any = {};
998
+ SubLink(node, context) {
999
+ const result = {};
1081
1000
  if (node.xpr !== undefined) {
1082
- result.xpr = this.transform(node.xpr as any, context);
1001
+ result.xpr = this.transform(node.xpr, context);
1083
1002
  }
1084
1003
  if (node.subLinkType !== undefined) {
1085
1004
  result.subLinkType = node.subLinkType;
@@ -1088,43 +1007,39 @@ export class V15ToV16Transformer {
1088
1007
  result.subLinkId = node.subLinkId;
1089
1008
  }
1090
1009
  if (node.testexpr !== undefined) {
1091
- result.testexpr = this.transform(node.testexpr as any, context);
1010
+ result.testexpr = this.transform(node.testexpr, context);
1092
1011
  }
1093
1012
  if (node.operName !== undefined) {
1094
1013
  result.operName = Array.isArray(node.operName)
1095
- ? node.operName.map((item: any) => this.transform(item as any, context))
1096
- : this.transform(node.operName as any, context);
1014
+ ? node.operName.map((item) => this.transform(item, context))
1015
+ : this.transform(node.operName, context);
1097
1016
  }
1098
1017
  if (node.subselect !== undefined) {
1099
- result.subselect = this.transform(node.subselect as any, context);
1018
+ result.subselect = this.transform(node.subselect, context);
1100
1019
  }
1101
1020
  if (node.location !== undefined) {
1102
1021
  result.location = node.location;
1103
1022
  }
1104
1023
  return { SubLink: result };
1105
1024
  }
1106
- CaseWhen(node: any, context: any): {
1107
- CaseWhen: any;
1108
- } {
1109
- const result: any = {};
1025
+ CaseWhen(node, context) {
1026
+ const result = {};
1110
1027
  if (node.xpr !== undefined) {
1111
- result.xpr = this.transform(node.xpr as any, context);
1028
+ result.xpr = this.transform(node.xpr, context);
1112
1029
  }
1113
1030
  if (node.expr !== undefined) {
1114
- result.expr = this.transform(node.expr as any, context);
1031
+ result.expr = this.transform(node.expr, context);
1115
1032
  }
1116
1033
  if (node.result !== undefined) {
1117
- result.result = this.transform(node.result as any, context);
1034
+ result.result = this.transform(node.result, context);
1118
1035
  }
1119
1036
  if (node.location !== undefined) {
1120
1037
  result.location = node.location;
1121
1038
  }
1122
1039
  return { CaseWhen: result };
1123
1040
  }
1124
- WindowDef(node: any, context: any): {
1125
- WindowDef: any;
1126
- } {
1127
- const result: any = {};
1041
+ WindowDef(node, context) {
1042
+ const result = {};
1128
1043
  if (node.name !== undefined) {
1129
1044
  result.name = node.name;
1130
1045
  }
@@ -1133,34 +1048,32 @@ export class V15ToV16Transformer {
1133
1048
  }
1134
1049
  if (node.partitionClause !== undefined) {
1135
1050
  result.partitionClause = Array.isArray(node.partitionClause)
1136
- ? node.partitionClause.map((item: any) => this.transform(item as any, context))
1137
- : this.transform(node.partitionClause as any, context);
1051
+ ? node.partitionClause.map((item) => this.transform(item, context))
1052
+ : this.transform(node.partitionClause, context);
1138
1053
  }
1139
1054
  if (node.orderClause !== undefined) {
1140
1055
  result.orderClause = Array.isArray(node.orderClause)
1141
- ? node.orderClause.map((item: any) => this.transform(item as any, context))
1142
- : this.transform(node.orderClause as any, context);
1056
+ ? node.orderClause.map((item) => this.transform(item, context))
1057
+ : this.transform(node.orderClause, context);
1143
1058
  }
1144
1059
  if (node.frameOptions !== undefined) {
1145
1060
  result.frameOptions = node.frameOptions;
1146
1061
  }
1147
1062
  if (node.startOffset !== undefined) {
1148
- result.startOffset = this.transform(node.startOffset as any, context);
1063
+ result.startOffset = this.transform(node.startOffset, context);
1149
1064
  }
1150
1065
  if (node.endOffset !== undefined) {
1151
- result.endOffset = this.transform(node.endOffset as any, context);
1066
+ result.endOffset = this.transform(node.endOffset, context);
1152
1067
  }
1153
1068
  if (node.location !== undefined) {
1154
1069
  result.location = node.location;
1155
1070
  }
1156
1071
  return { WindowDef: result };
1157
1072
  }
1158
- SortBy(node: any, context: any): {
1159
- SortBy: any;
1160
- } {
1161
- const result: any = {};
1073
+ SortBy(node, context) {
1074
+ const result = {};
1162
1075
  if (node.node !== undefined) {
1163
- result.node = this.transform(node.node as any, context);
1076
+ result.node = this.transform(node.node, context);
1164
1077
  }
1165
1078
  if (node.sortby_dir !== undefined) {
1166
1079
  result.sortby_dir = node.sortby_dir;
@@ -1170,48 +1083,44 @@ export class V15ToV16Transformer {
1170
1083
  }
1171
1084
  if (node.useOp !== undefined) {
1172
1085
  result.useOp = Array.isArray(node.useOp)
1173
- ? node.useOp.map((item: any) => this.transform(item as any, context))
1174
- : this.transform(node.useOp as any, context);
1086
+ ? node.useOp.map((item) => this.transform(item, context))
1087
+ : this.transform(node.useOp, context);
1175
1088
  }
1176
1089
  if (node.location !== undefined) {
1177
1090
  result.location = node.location;
1178
1091
  }
1179
1092
  return { SortBy: result };
1180
1093
  }
1181
- GroupingSet(node: any, context: any): {
1182
- GroupingSet: any;
1183
- } {
1184
- const result: any = {};
1094
+ GroupingSet(node, context) {
1095
+ const result = {};
1185
1096
  if (node.kind !== undefined) {
1186
1097
  result.kind = node.kind;
1187
1098
  }
1188
1099
  if (node.content !== undefined) {
1189
1100
  result.content = Array.isArray(node.content)
1190
- ? node.content.map((item: any) => this.transform(item as any, context))
1191
- : this.transform(node.content as any, context);
1101
+ ? node.content.map((item) => this.transform(item, context))
1102
+ : this.transform(node.content, context);
1192
1103
  }
1193
1104
  if (node.location !== undefined) {
1194
1105
  result.location = node.location;
1195
1106
  }
1196
1107
  return { GroupingSet: result };
1197
1108
  }
1198
- CommonTableExpr(node: any, context: any): {
1199
- CommonTableExpr: any;
1200
- } {
1201
- const result: any = {};
1109
+ CommonTableExpr(node, context) {
1110
+ const result = {};
1202
1111
  if (node.ctename !== undefined) {
1203
1112
  result.ctename = node.ctename;
1204
1113
  }
1205
1114
  if (node.aliascolnames !== undefined) {
1206
1115
  result.aliascolnames = Array.isArray(node.aliascolnames)
1207
- ? node.aliascolnames.map((item: any) => this.transform(item as any, context))
1208
- : this.transform(node.aliascolnames as any, context);
1116
+ ? node.aliascolnames.map((item) => this.transform(item, context))
1117
+ : this.transform(node.aliascolnames, context);
1209
1118
  }
1210
1119
  if (node.ctematerialized !== undefined) {
1211
1120
  result.ctematerialized = node.ctematerialized;
1212
1121
  }
1213
1122
  if (node.ctequery !== undefined) {
1214
- result.ctequery = this.transform(node.ctequery as any, context);
1123
+ result.ctequery = this.transform(node.ctequery, context);
1215
1124
  }
1216
1125
  if (node.location !== undefined) {
1217
1126
  result.location = node.location;
@@ -1224,30 +1133,28 @@ export class V15ToV16Transformer {
1224
1133
  }
1225
1134
  if (node.ctecolnames !== undefined) {
1226
1135
  result.ctecolnames = Array.isArray(node.ctecolnames)
1227
- ? node.ctecolnames.map((item: any) => this.transform(item as any, context))
1228
- : this.transform(node.ctecolnames as any, context);
1136
+ ? node.ctecolnames.map((item) => this.transform(item, context))
1137
+ : this.transform(node.ctecolnames, context);
1229
1138
  }
1230
1139
  if (node.ctecoltypes !== undefined) {
1231
1140
  result.ctecoltypes = Array.isArray(node.ctecoltypes)
1232
- ? node.ctecoltypes.map((item: any) => this.transform(item as any, context))
1233
- : this.transform(node.ctecoltypes as any, context);
1141
+ ? node.ctecoltypes.map((item) => this.transform(item, context))
1142
+ : this.transform(node.ctecoltypes, context);
1234
1143
  }
1235
1144
  if (node.ctecoltypmods !== undefined) {
1236
1145
  result.ctecoltypmods = Array.isArray(node.ctecoltypmods)
1237
- ? node.ctecoltypmods.map((item: any) => this.transform(item as any, context))
1238
- : this.transform(node.ctecoltypmods as any, context);
1146
+ ? node.ctecoltypmods.map((item) => this.transform(item, context))
1147
+ : this.transform(node.ctecoltypmods, context);
1239
1148
  }
1240
1149
  if (node.ctecolcollations !== undefined) {
1241
1150
  result.ctecolcollations = Array.isArray(node.ctecolcollations)
1242
- ? node.ctecolcollations.map((item: any) => this.transform(item as any, context))
1243
- : this.transform(node.ctecolcollations as any, context);
1151
+ ? node.ctecolcollations.map((item) => this.transform(item, context))
1152
+ : this.transform(node.ctecolcollations, context);
1244
1153
  }
1245
1154
  return { CommonTableExpr: result };
1246
1155
  }
1247
- ParamRef(node: any, context: any): {
1248
- ParamRef: any;
1249
- } {
1250
- const result: any = {};
1156
+ ParamRef(node, context) {
1157
+ const result = {};
1251
1158
  if (node.number !== undefined) {
1252
1159
  result.number = node.number;
1253
1160
  }
@@ -1256,14 +1163,12 @@ export class V15ToV16Transformer {
1256
1163
  }
1257
1164
  return { ParamRef: result };
1258
1165
  }
1259
- LockingClause(node: any, context: any): {
1260
- LockingClause: any;
1261
- } {
1262
- const result: any = {};
1166
+ LockingClause(node, context) {
1167
+ const result = {};
1263
1168
  if (node.lockedRels !== undefined) {
1264
1169
  result.lockedRels = Array.isArray(node.lockedRels)
1265
- ? node.lockedRels.map((item: any) => this.transform(item as any, context))
1266
- : this.transform(node.lockedRels as any, context);
1170
+ ? node.lockedRels.map((item) => this.transform(item, context))
1171
+ : this.transform(node.lockedRels, context);
1267
1172
  }
1268
1173
  if (node.strength !== undefined) {
1269
1174
  result.strength = node.strength;
@@ -1273,12 +1178,10 @@ export class V15ToV16Transformer {
1273
1178
  }
1274
1179
  return { LockingClause: result };
1275
1180
  }
1276
- MinMaxExpr(node: any, context: any): {
1277
- MinMaxExpr: any;
1278
- } {
1279
- const result: any = {};
1181
+ MinMaxExpr(node, context) {
1182
+ const result = {};
1280
1183
  if (node.xpr !== undefined) {
1281
- result.xpr = this.transform(node.xpr as any, context);
1184
+ result.xpr = this.transform(node.xpr, context);
1282
1185
  }
1283
1186
  if (node.minmaxtype !== undefined) {
1284
1187
  result.minmaxtype = node.minmaxtype;
@@ -1294,25 +1197,23 @@ export class V15ToV16Transformer {
1294
1197
  }
1295
1198
  if (node.args !== undefined) {
1296
1199
  result.args = Array.isArray(node.args)
1297
- ? node.args.map((item: any) => this.transform(item as any, context))
1298
- : this.transform(node.args as any, context);
1200
+ ? node.args.map((item) => this.transform(item, context))
1201
+ : this.transform(node.args, context);
1299
1202
  }
1300
1203
  if (node.location !== undefined) {
1301
1204
  result.location = node.location;
1302
1205
  }
1303
1206
  return { MinMaxExpr: result };
1304
1207
  }
1305
- RowExpr(node: any, context: any): {
1306
- RowExpr: any;
1307
- } {
1308
- const result: any = {};
1208
+ RowExpr(node, context) {
1209
+ const result = {};
1309
1210
  if (node.xpr !== undefined) {
1310
- result.xpr = this.transform(node.xpr as any, context);
1211
+ result.xpr = this.transform(node.xpr, context);
1311
1212
  }
1312
1213
  if (node.args !== undefined) {
1313
1214
  result.args = Array.isArray(node.args)
1314
- ? node.args.map((item: any) => this.transform(item as any, context))
1315
- : this.transform(node.args as any, context);
1215
+ ? node.args.map((item) => this.transform(item, context))
1216
+ : this.transform(node.args, context);
1316
1217
  }
1317
1218
  if (node.row_typeid !== undefined) {
1318
1219
  result.row_typeid = node.row_typeid;
@@ -1322,20 +1223,18 @@ export class V15ToV16Transformer {
1322
1223
  }
1323
1224
  if (node.colnames !== undefined) {
1324
1225
  result.colnames = Array.isArray(node.colnames)
1325
- ? node.colnames.map((item: any) => this.transform(item as any, context))
1326
- : this.transform(node.colnames as any, context);
1226
+ ? node.colnames.map((item) => this.transform(item, context))
1227
+ : this.transform(node.colnames, context);
1327
1228
  }
1328
1229
  if (node.location !== undefined) {
1329
1230
  result.location = node.location;
1330
1231
  }
1331
1232
  return { RowExpr: result };
1332
1233
  }
1333
- OpExpr(node: any, context: any): {
1334
- OpExpr: any;
1335
- } {
1336
- const result: any = {};
1234
+ OpExpr(node, context) {
1235
+ const result = {};
1337
1236
  if (node.xpr !== undefined) {
1338
- result.xpr = this.transform(node.xpr as any, context);
1237
+ result.xpr = this.transform(node.xpr, context);
1339
1238
  }
1340
1239
  if (node.opno !== undefined) {
1341
1240
  result.opno = node.opno;
@@ -1357,20 +1256,18 @@ export class V15ToV16Transformer {
1357
1256
  }
1358
1257
  if (node.args !== undefined) {
1359
1258
  result.args = Array.isArray(node.args)
1360
- ? node.args.map((item: any) => this.transform(item as any, context))
1361
- : this.transform(node.args as any, context);
1259
+ ? node.args.map((item) => this.transform(item, context))
1260
+ : this.transform(node.args, context);
1362
1261
  }
1363
1262
  if (node.location !== undefined) {
1364
1263
  result.location = node.location;
1365
1264
  }
1366
1265
  return { OpExpr: result };
1367
1266
  }
1368
- DistinctExpr(node: any, context: any): {
1369
- DistinctExpr: any;
1370
- } {
1371
- const result: any = {};
1267
+ DistinctExpr(node, context) {
1268
+ const result = {};
1372
1269
  if (node.xpr !== undefined) {
1373
- result.xpr = this.transform(node.xpr as any, context);
1270
+ result.xpr = this.transform(node.xpr, context);
1374
1271
  }
1375
1272
  if (node.opno !== undefined) {
1376
1273
  result.opno = node.opno;
@@ -1392,20 +1289,18 @@ export class V15ToV16Transformer {
1392
1289
  }
1393
1290
  if (node.args !== undefined) {
1394
1291
  result.args = Array.isArray(node.args)
1395
- ? node.args.map((item: any) => this.transform(item as any, context))
1396
- : this.transform(node.args as any, context);
1292
+ ? node.args.map((item) => this.transform(item, context))
1293
+ : this.transform(node.args, context);
1397
1294
  }
1398
1295
  if (node.location !== undefined) {
1399
1296
  result.location = node.location;
1400
1297
  }
1401
1298
  return { DistinctExpr: result };
1402
1299
  }
1403
- NullIfExpr(node: any, context: any): {
1404
- NullIfExpr: any;
1405
- } {
1406
- const result: any = {};
1300
+ NullIfExpr(node, context) {
1301
+ const result = {};
1407
1302
  if (node.xpr !== undefined) {
1408
- result.xpr = this.transform(node.xpr as any, context);
1303
+ result.xpr = this.transform(node.xpr, context);
1409
1304
  }
1410
1305
  if (node.opno !== undefined) {
1411
1306
  result.opno = node.opno;
@@ -1427,20 +1322,18 @@ export class V15ToV16Transformer {
1427
1322
  }
1428
1323
  if (node.args !== undefined) {
1429
1324
  result.args = Array.isArray(node.args)
1430
- ? node.args.map((item: any) => this.transform(item as any, context))
1431
- : this.transform(node.args as any, context);
1325
+ ? node.args.map((item) => this.transform(item, context))
1326
+ : this.transform(node.args, context);
1432
1327
  }
1433
1328
  if (node.location !== undefined) {
1434
1329
  result.location = node.location;
1435
1330
  }
1436
1331
  return { NullIfExpr: result };
1437
1332
  }
1438
- ScalarArrayOpExpr(node: any, context: any): {
1439
- ScalarArrayOpExpr: any;
1440
- } {
1441
- const result: any = {};
1333
+ ScalarArrayOpExpr(node, context) {
1334
+ const result = {};
1442
1335
  if (node.xpr !== undefined) {
1443
- result.xpr = this.transform(node.xpr as any, context);
1336
+ result.xpr = this.transform(node.xpr, context);
1444
1337
  }
1445
1338
  if (node.opno !== undefined) {
1446
1339
  result.opno = node.opno;
@@ -1459,20 +1352,18 @@ export class V15ToV16Transformer {
1459
1352
  }
1460
1353
  if (node.args !== undefined) {
1461
1354
  result.args = Array.isArray(node.args)
1462
- ? node.args.map((item: any) => this.transform(item as any, context))
1463
- : this.transform(node.args as any, context);
1355
+ ? node.args.map((item) => this.transform(item, context))
1356
+ : this.transform(node.args, context);
1464
1357
  }
1465
1358
  if (node.location !== undefined) {
1466
1359
  result.location = node.location;
1467
1360
  }
1468
1361
  return { ScalarArrayOpExpr: result };
1469
1362
  }
1470
- Aggref(node: any, context: any): {
1471
- Aggref: any;
1472
- } {
1473
- const result: any = {};
1363
+ Aggref(node, context) {
1364
+ const result = {};
1474
1365
  if (node.xpr !== undefined) {
1475
- result.xpr = this.transform(node.xpr as any, context);
1366
+ result.xpr = this.transform(node.xpr, context);
1476
1367
  }
1477
1368
  if (node.aggfnoid !== undefined) {
1478
1369
  result.aggfnoid = node.aggfnoid;
@@ -1491,31 +1382,31 @@ export class V15ToV16Transformer {
1491
1382
  }
1492
1383
  if (node.aggargtypes !== undefined) {
1493
1384
  result.aggargtypes = Array.isArray(node.aggargtypes)
1494
- ? node.aggargtypes.map((item: any) => this.transform(item as any, context))
1495
- : this.transform(node.aggargtypes as any, context);
1385
+ ? node.aggargtypes.map((item) => this.transform(item, context))
1386
+ : this.transform(node.aggargtypes, context);
1496
1387
  }
1497
1388
  if (node.aggdirectargs !== undefined) {
1498
1389
  result.aggdirectargs = Array.isArray(node.aggdirectargs)
1499
- ? node.aggdirectargs.map((item: any) => this.transform(item as any, context))
1500
- : this.transform(node.aggdirectargs as any, context);
1390
+ ? node.aggdirectargs.map((item) => this.transform(item, context))
1391
+ : this.transform(node.aggdirectargs, context);
1501
1392
  }
1502
1393
  if (node.args !== undefined) {
1503
1394
  result.args = Array.isArray(node.args)
1504
- ? node.args.map((item: any) => this.transform(item as any, context))
1505
- : this.transform(node.args as any, context);
1395
+ ? node.args.map((item) => this.transform(item, context))
1396
+ : this.transform(node.args, context);
1506
1397
  }
1507
1398
  if (node.aggorder !== undefined) {
1508
1399
  result.aggorder = Array.isArray(node.aggorder)
1509
- ? node.aggorder.map((item: any) => this.transform(item as any, context))
1510
- : this.transform(node.aggorder as any, context);
1400
+ ? node.aggorder.map((item) => this.transform(item, context))
1401
+ : this.transform(node.aggorder, context);
1511
1402
  }
1512
1403
  if (node.aggdistinct !== undefined) {
1513
1404
  result.aggdistinct = Array.isArray(node.aggdistinct)
1514
- ? node.aggdistinct.map((item: any) => this.transform(item as any, context))
1515
- : this.transform(node.aggdistinct as any, context);
1405
+ ? node.aggdistinct.map((item) => this.transform(item, context))
1406
+ : this.transform(node.aggdistinct, context);
1516
1407
  }
1517
1408
  if (node.aggfilter !== undefined) {
1518
- result.aggfilter = this.transform(node.aggfilter as any, context);
1409
+ result.aggfilter = this.transform(node.aggfilter, context);
1519
1410
  }
1520
1411
  if (node.aggstar !== undefined) {
1521
1412
  result.aggstar = node.aggstar;
@@ -1543,12 +1434,10 @@ export class V15ToV16Transformer {
1543
1434
  }
1544
1435
  return { Aggref: result };
1545
1436
  }
1546
- WindowFunc(node: any, context: any): {
1547
- WindowFunc: any;
1548
- } {
1549
- const result: any = {};
1437
+ WindowFunc(node, context) {
1438
+ const result = {};
1550
1439
  if (node.xpr !== undefined) {
1551
- result.xpr = this.transform(node.xpr as any, context);
1440
+ result.xpr = this.transform(node.xpr, context);
1552
1441
  }
1553
1442
  if (node.winfnoid !== undefined) {
1554
1443
  result.winfnoid = node.winfnoid;
@@ -1564,11 +1453,11 @@ export class V15ToV16Transformer {
1564
1453
  }
1565
1454
  if (node.args !== undefined) {
1566
1455
  result.args = Array.isArray(node.args)
1567
- ? node.args.map((item: any) => this.transform(item as any, context))
1568
- : this.transform(node.args as any, context);
1456
+ ? node.args.map((item) => this.transform(item, context))
1457
+ : this.transform(node.args, context);
1569
1458
  }
1570
1459
  if (node.aggfilter !== undefined) {
1571
- result.aggfilter = this.transform(node.aggfilter as any, context);
1460
+ result.aggfilter = this.transform(node.aggfilter, context);
1572
1461
  }
1573
1462
  if (node.winref !== undefined) {
1574
1463
  result.winref = node.winref;
@@ -1584,15 +1473,13 @@ export class V15ToV16Transformer {
1584
1473
  }
1585
1474
  return { WindowFunc: result };
1586
1475
  }
1587
- FieldSelect(node: any, context: any): {
1588
- FieldSelect: any;
1589
- } {
1590
- const result: any = {};
1476
+ FieldSelect(node, context) {
1477
+ const result = {};
1591
1478
  if (node.xpr !== undefined) {
1592
- result.xpr = this.transform(node.xpr as any, context);
1479
+ result.xpr = this.transform(node.xpr, context);
1593
1480
  }
1594
1481
  if (node.arg !== undefined) {
1595
- result.arg = this.transform(node.arg as any, context);
1482
+ result.arg = this.transform(node.arg, context);
1596
1483
  }
1597
1484
  if (node.fieldnum !== undefined) {
1598
1485
  result.fieldnum = node.fieldnum;
@@ -1608,15 +1495,13 @@ export class V15ToV16Transformer {
1608
1495
  }
1609
1496
  return { FieldSelect: result };
1610
1497
  }
1611
- RelabelType(node: any, context: any): {
1612
- RelabelType: any;
1613
- } {
1614
- const result: any = {};
1498
+ RelabelType(node, context) {
1499
+ const result = {};
1615
1500
  if (node.xpr !== undefined) {
1616
- result.xpr = this.transform(node.xpr as any, context);
1501
+ result.xpr = this.transform(node.xpr, context);
1617
1502
  }
1618
1503
  if (node.arg !== undefined) {
1619
- result.arg = this.transform(node.arg as any, context);
1504
+ result.arg = this.transform(node.arg, context);
1620
1505
  }
1621
1506
  if (node.resulttype !== undefined) {
1622
1507
  result.resulttype = node.resulttype;
@@ -1635,15 +1520,13 @@ export class V15ToV16Transformer {
1635
1520
  }
1636
1521
  return { RelabelType: result };
1637
1522
  }
1638
- CoerceViaIO(node: any, context: any): {
1639
- CoerceViaIO: any;
1640
- } {
1641
- const result: any = {};
1523
+ CoerceViaIO(node, context) {
1524
+ const result = {};
1642
1525
  if (node.xpr !== undefined) {
1643
- result.xpr = this.transform(node.xpr as any, context);
1526
+ result.xpr = this.transform(node.xpr, context);
1644
1527
  }
1645
1528
  if (node.arg !== undefined) {
1646
- result.arg = this.transform(node.arg as any, context);
1529
+ result.arg = this.transform(node.arg, context);
1647
1530
  }
1648
1531
  if (node.resulttype !== undefined) {
1649
1532
  result.resulttype = node.resulttype;
@@ -1659,18 +1542,16 @@ export class V15ToV16Transformer {
1659
1542
  }
1660
1543
  return { CoerceViaIO: result };
1661
1544
  }
1662
- ArrayCoerceExpr(node: any, context: any): {
1663
- ArrayCoerceExpr: any;
1664
- } {
1665
- const result: any = {};
1545
+ ArrayCoerceExpr(node, context) {
1546
+ const result = {};
1666
1547
  if (node.xpr !== undefined) {
1667
- result.xpr = this.transform(node.xpr as any, context);
1548
+ result.xpr = this.transform(node.xpr, context);
1668
1549
  }
1669
1550
  if (node.arg !== undefined) {
1670
- result.arg = this.transform(node.arg as any, context);
1551
+ result.arg = this.transform(node.arg, context);
1671
1552
  }
1672
1553
  if (node.elemexpr !== undefined) {
1673
- result.elemexpr = this.transform(node.elemexpr as any, context);
1554
+ result.elemexpr = this.transform(node.elemexpr, context);
1674
1555
  }
1675
1556
  if (node.resulttype !== undefined) {
1676
1557
  result.resulttype = node.resulttype;
@@ -1689,15 +1570,13 @@ export class V15ToV16Transformer {
1689
1570
  }
1690
1571
  return { ArrayCoerceExpr: result };
1691
1572
  }
1692
- ConvertRowtypeExpr(node: any, context: any): {
1693
- ConvertRowtypeExpr: any;
1694
- } {
1695
- const result: any = {};
1573
+ ConvertRowtypeExpr(node, context) {
1574
+ const result = {};
1696
1575
  if (node.xpr !== undefined) {
1697
- result.xpr = this.transform(node.xpr as any, context);
1576
+ result.xpr = this.transform(node.xpr, context);
1698
1577
  }
1699
1578
  if (node.arg !== undefined) {
1700
- result.arg = this.transform(node.arg as any, context);
1579
+ result.arg = this.transform(node.arg, context);
1701
1580
  }
1702
1581
  if (node.resulttype !== undefined) {
1703
1582
  result.resulttype = node.resulttype;
@@ -1710,15 +1589,13 @@ export class V15ToV16Transformer {
1710
1589
  }
1711
1590
  return { ConvertRowtypeExpr: result };
1712
1591
  }
1713
- NamedArgExpr(node: any, context: any): {
1714
- NamedArgExpr: any;
1715
- } {
1716
- const result: any = {};
1592
+ NamedArgExpr(node, context) {
1593
+ const result = {};
1717
1594
  if (node.xpr !== undefined) {
1718
- result.xpr = this.transform(node.xpr as any, context);
1595
+ result.xpr = this.transform(node.xpr, context);
1719
1596
  }
1720
1597
  if (node.arg !== undefined) {
1721
- result.arg = this.transform(node.arg as any, context);
1598
+ result.arg = this.transform(node.arg, context);
1722
1599
  }
1723
1600
  if (node.name !== undefined) {
1724
1601
  result.name = node.name;
@@ -1731,43 +1608,39 @@ export class V15ToV16Transformer {
1731
1608
  }
1732
1609
  return { NamedArgExpr: result };
1733
1610
  }
1734
- ViewStmt(node: any, context: any): {
1735
- ViewStmt: any;
1736
- } {
1737
- const result: any = {};
1611
+ ViewStmt(node, context) {
1612
+ const result = {};
1738
1613
  if (node.view !== undefined) {
1739
- result.view = this.transform(node.view as any, context);
1614
+ result.view = this.transform(node.view, context);
1740
1615
  }
1741
1616
  if (node.aliases !== undefined) {
1742
1617
  result.aliases = Array.isArray(node.aliases)
1743
- ? node.aliases.map((item: any) => this.transform(item as any, context))
1744
- : this.transform(node.aliases as any, context);
1618
+ ? node.aliases.map((item) => this.transform(item, context))
1619
+ : this.transform(node.aliases, context);
1745
1620
  }
1746
1621
  if (node.query !== undefined) {
1747
- result.query = this.transform(node.query as any, context);
1622
+ result.query = this.transform(node.query, context);
1748
1623
  }
1749
1624
  if (node.replace !== undefined) {
1750
1625
  result.replace = node.replace;
1751
1626
  }
1752
1627
  if (node.options !== undefined) {
1753
1628
  result.options = Array.isArray(node.options)
1754
- ? node.options.map((item: any) => this.transform(item as any, context))
1755
- : this.transform(node.options as any, context);
1629
+ ? node.options.map((item) => this.transform(item, context))
1630
+ : this.transform(node.options, context);
1756
1631
  }
1757
1632
  if (node.withCheckOption !== undefined) {
1758
1633
  result.withCheckOption = node.withCheckOption;
1759
1634
  }
1760
1635
  return { ViewStmt: result };
1761
1636
  }
1762
- IndexStmt(node: any, context: any): {
1763
- IndexStmt: any;
1764
- } {
1765
- const result: any = {};
1637
+ IndexStmt(node, context) {
1638
+ const result = {};
1766
1639
  if (node.idxname !== undefined) {
1767
1640
  result.idxname = node.idxname;
1768
1641
  }
1769
1642
  if (node.relation !== undefined) {
1770
- result.relation = this.transform(node.relation as any, context);
1643
+ result.relation = this.transform(node.relation, context);
1771
1644
  }
1772
1645
  if (node.accessMethod !== undefined) {
1773
1646
  result.accessMethod = node.accessMethod;
@@ -1777,26 +1650,26 @@ export class V15ToV16Transformer {
1777
1650
  }
1778
1651
  if (node.indexParams !== undefined) {
1779
1652
  result.indexParams = Array.isArray(node.indexParams)
1780
- ? node.indexParams.map((item: any) => this.transform(item as any, context))
1781
- : this.transform(node.indexParams as any, context);
1653
+ ? node.indexParams.map((item) => this.transform(item, context))
1654
+ : this.transform(node.indexParams, context);
1782
1655
  }
1783
1656
  if (node.indexIncludingParams !== undefined) {
1784
1657
  result.indexIncludingParams = Array.isArray(node.indexIncludingParams)
1785
- ? node.indexIncludingParams.map((item: any) => this.transform(item as any, context))
1786
- : this.transform(node.indexIncludingParams as any, context);
1658
+ ? node.indexIncludingParams.map((item) => this.transform(item, context))
1659
+ : this.transform(node.indexIncludingParams, context);
1787
1660
  }
1788
1661
  if (node.options !== undefined) {
1789
1662
  result.options = Array.isArray(node.options)
1790
- ? node.options.map((item: any) => this.transform(item as any, context))
1791
- : this.transform(node.options as any, context);
1663
+ ? node.options.map((item) => this.transform(item, context))
1664
+ : this.transform(node.options, context);
1792
1665
  }
1793
1666
  if (node.whereClause !== undefined) {
1794
- result.whereClause = this.transform(node.whereClause as any, context);
1667
+ result.whereClause = this.transform(node.whereClause, context);
1795
1668
  }
1796
1669
  if (node.excludeOpNames !== undefined) {
1797
1670
  result.excludeOpNames = Array.isArray(node.excludeOpNames)
1798
- ? node.excludeOpNames.map((item: any) => this.transform(item as any, context))
1799
- : this.transform(node.excludeOpNames as any, context);
1671
+ ? node.excludeOpNames.map((item) => this.transform(item, context))
1672
+ : this.transform(node.excludeOpNames, context);
1800
1673
  }
1801
1674
  if (node.idxcomment !== undefined) {
1802
1675
  result.idxcomment = node.idxcomment;
@@ -1845,33 +1718,31 @@ export class V15ToV16Transformer {
1845
1718
  }
1846
1719
  return { IndexStmt: result };
1847
1720
  }
1848
- IndexElem(node: any, context: any): {
1849
- IndexElem: any;
1850
- } {
1851
- const result: any = {};
1721
+ IndexElem(node, context) {
1722
+ const result = {};
1852
1723
  if (node.name !== undefined) {
1853
1724
  result.name = node.name;
1854
1725
  }
1855
1726
  if (node.expr !== undefined) {
1856
- result.expr = this.transform(node.expr as any, context);
1727
+ result.expr = this.transform(node.expr, context);
1857
1728
  }
1858
1729
  if (node.indexcolname !== undefined) {
1859
1730
  result.indexcolname = node.indexcolname;
1860
1731
  }
1861
1732
  if (node.collation !== undefined) {
1862
1733
  result.collation = Array.isArray(node.collation)
1863
- ? node.collation.map((item: any) => this.transform(item as any, context))
1864
- : this.transform(node.collation as any, context);
1734
+ ? node.collation.map((item) => this.transform(item, context))
1735
+ : this.transform(node.collation, context);
1865
1736
  }
1866
1737
  if (node.opclass !== undefined) {
1867
1738
  result.opclass = Array.isArray(node.opclass)
1868
- ? node.opclass.map((item: any) => this.transform(item as any, context))
1869
- : this.transform(node.opclass as any, context);
1739
+ ? node.opclass.map((item) => this.transform(item, context))
1740
+ : this.transform(node.opclass, context);
1870
1741
  }
1871
1742
  if (node.opclassopts !== undefined) {
1872
1743
  result.opclassopts = Array.isArray(node.opclassopts)
1873
- ? node.opclassopts.map((item: any) => this.transform(item as any, context))
1874
- : this.transform(node.opclassopts as any, context);
1744
+ ? node.opclassopts.map((item) => this.transform(item, context))
1745
+ : this.transform(node.opclassopts, context);
1875
1746
  }
1876
1747
  if (node.ordering !== undefined) {
1877
1748
  result.ordering = node.ordering;
@@ -1881,50 +1752,44 @@ export class V15ToV16Transformer {
1881
1752
  }
1882
1753
  return { IndexElem: result };
1883
1754
  }
1884
- PartitionElem(node: any, context: any): {
1885
- PartitionElem: any;
1886
- } {
1887
- const result: any = {};
1755
+ PartitionElem(node, context) {
1756
+ const result = {};
1888
1757
  if (node.name !== undefined) {
1889
1758
  result.name = node.name;
1890
1759
  }
1891
1760
  if (node.expr !== undefined) {
1892
- result.expr = this.transform(node.expr as any, context);
1761
+ result.expr = this.transform(node.expr, context);
1893
1762
  }
1894
1763
  if (node.collation !== undefined) {
1895
1764
  result.collation = Array.isArray(node.collation)
1896
- ? node.collation.map((item: any) => this.transform(item as any, context))
1897
- : this.transform(node.collation as any, context);
1765
+ ? node.collation.map((item) => this.transform(item, context))
1766
+ : this.transform(node.collation, context);
1898
1767
  }
1899
1768
  if (node.opclass !== undefined) {
1900
1769
  result.opclass = Array.isArray(node.opclass)
1901
- ? node.opclass.map((item: any) => this.transform(item as any, context))
1902
- : this.transform(node.opclass as any, context);
1770
+ ? node.opclass.map((item) => this.transform(item, context))
1771
+ : this.transform(node.opclass, context);
1903
1772
  }
1904
1773
  if (node.location !== undefined) {
1905
1774
  result.location = node.location;
1906
1775
  }
1907
1776
  return { PartitionElem: result };
1908
1777
  }
1909
- PartitionCmd(node: any, context: any): {
1910
- PartitionCmd: any;
1911
- } {
1912
- const result: any = {};
1778
+ PartitionCmd(node, context) {
1779
+ const result = {};
1913
1780
  if (node.name !== undefined) {
1914
- result.name = this.transform(node.name as any, context);
1781
+ result.name = this.transform(node.name, context);
1915
1782
  }
1916
1783
  if (node.bound !== undefined) {
1917
- result.bound = this.transform(node.bound as any, context);
1784
+ result.bound = this.transform(node.bound, context);
1918
1785
  }
1919
1786
  if (node.concurrent !== undefined) {
1920
1787
  result.concurrent = node.concurrent;
1921
1788
  }
1922
1789
  return { PartitionCmd: result };
1923
1790
  }
1924
- JoinExpr(node: any, context: any): {
1925
- JoinExpr: any;
1926
- } {
1927
- const result: any = {};
1791
+ JoinExpr(node, context) {
1792
+ const result = {};
1928
1793
  if (node.jointype !== undefined) {
1929
1794
  result.jointype = node.jointype;
1930
1795
  }
@@ -1932,55 +1797,51 @@ export class V15ToV16Transformer {
1932
1797
  result.isNatural = node.isNatural;
1933
1798
  }
1934
1799
  if (node.larg !== undefined) {
1935
- result.larg = this.transform(node.larg as any, context);
1800
+ result.larg = this.transform(node.larg, context);
1936
1801
  }
1937
1802
  if (node.rarg !== undefined) {
1938
- result.rarg = this.transform(node.rarg as any, context);
1803
+ result.rarg = this.transform(node.rarg, context);
1939
1804
  }
1940
1805
  if (node.usingClause !== undefined) {
1941
1806
  result.usingClause = Array.isArray(node.usingClause)
1942
- ? node.usingClause.map((item: any) => this.transform(item as any, context))
1943
- : this.transform(node.usingClause as any, context);
1807
+ ? node.usingClause.map((item) => this.transform(item, context))
1808
+ : this.transform(node.usingClause, context);
1944
1809
  }
1945
1810
  if (node.join_using_alias !== undefined) {
1946
- result.join_using_alias = this.transform(node.join_using_alias as any, context);
1811
+ result.join_using_alias = this.transform(node.join_using_alias, context);
1947
1812
  }
1948
1813
  if (node.quals !== undefined) {
1949
- result.quals = this.transform(node.quals as any, context);
1814
+ result.quals = this.transform(node.quals, context);
1950
1815
  }
1951
1816
  if (node.alias !== undefined) {
1952
- result.alias = this.transform(node.alias as any, context);
1817
+ result.alias = this.transform(node.alias, context);
1953
1818
  }
1954
1819
  if (node.rtindex !== undefined) {
1955
1820
  result.rtindex = node.rtindex;
1956
1821
  }
1957
1822
  return { JoinExpr: result };
1958
1823
  }
1959
- FromExpr(node: any, context: any): {
1960
- FromExpr: any;
1961
- } {
1962
- const result: any = {};
1824
+ FromExpr(node, context) {
1825
+ const result = {};
1963
1826
  if (node.fromlist !== undefined) {
1964
1827
  result.fromlist = Array.isArray(node.fromlist)
1965
- ? node.fromlist.map((item: any) => this.transform(item as any, context))
1966
- : this.transform(node.fromlist as any, context);
1828
+ ? node.fromlist.map((item) => this.transform(item, context))
1829
+ : this.transform(node.fromlist, context);
1967
1830
  }
1968
1831
  if (node.quals !== undefined) {
1969
- result.quals = this.transform(node.quals as any, context);
1832
+ result.quals = this.transform(node.quals, context);
1970
1833
  }
1971
1834
  return { FromExpr: result };
1972
1835
  }
1973
- TransactionStmt(node: any, context: any): {
1974
- TransactionStmt: any;
1975
- } {
1976
- const result: any = {};
1836
+ TransactionStmt(node, context) {
1837
+ const result = {};
1977
1838
  if (node.kind !== undefined) {
1978
1839
  result.kind = node.kind;
1979
1840
  }
1980
1841
  if (node.options !== undefined) {
1981
1842
  result.options = Array.isArray(node.options)
1982
- ? node.options.map((item: any) => this.transform(item as any, context))
1983
- : this.transform(node.options as any, context);
1843
+ ? node.options.map((item) => this.transform(item, context))
1844
+ : this.transform(node.options, context);
1984
1845
  }
1985
1846
  if (node.savepoint_name !== undefined) {
1986
1847
  result.savepoint_name = node.savepoint_name;
@@ -1993,10 +1854,8 @@ export class V15ToV16Transformer {
1993
1854
  }
1994
1855
  return { TransactionStmt: result };
1995
1856
  }
1996
- VariableSetStmt(node: any, context: any): {
1997
- VariableSetStmt: any;
1998
- } {
1999
- const result: any = {};
1857
+ VariableSetStmt(node, context) {
1858
+ const result = {};
2000
1859
  if (node.kind !== undefined) {
2001
1860
  result.kind = node.kind;
2002
1861
  }
@@ -2005,47 +1864,41 @@ export class V15ToV16Transformer {
2005
1864
  }
2006
1865
  if (node.args !== undefined) {
2007
1866
  result.args = Array.isArray(node.args)
2008
- ? node.args.map((item: any) => this.transform(item as any, context))
2009
- : this.transform(node.args as any, context);
1867
+ ? node.args.map((item) => this.transform(item, context))
1868
+ : this.transform(node.args, context);
2010
1869
  }
2011
1870
  if (node.is_local !== undefined) {
2012
1871
  result.is_local = node.is_local;
2013
1872
  }
2014
1873
  return { VariableSetStmt: result };
2015
1874
  }
2016
- VariableShowStmt(node: any, context: any): {
2017
- VariableShowStmt: any;
2018
- } {
2019
- const result: any = {};
1875
+ VariableShowStmt(node, context) {
1876
+ const result = {};
2020
1877
  if (node.name !== undefined) {
2021
1878
  result.name = node.name;
2022
1879
  }
2023
1880
  return { VariableShowStmt: result };
2024
1881
  }
2025
- CreateSchemaStmt(node: any, context: any): {
2026
- CreateSchemaStmt: any;
2027
- } {
2028
- const result: any = {};
1882
+ CreateSchemaStmt(node, context) {
1883
+ const result = {};
2029
1884
  if (node.schemaname !== undefined) {
2030
1885
  result.schemaname = node.schemaname;
2031
1886
  }
2032
1887
  if (node.authrole !== undefined) {
2033
- result.authrole = this.transform(node.authrole as any, context);
1888
+ result.authrole = this.transform(node.authrole, context);
2034
1889
  }
2035
1890
  if (node.schemaElts !== undefined) {
2036
1891
  result.schemaElts = Array.isArray(node.schemaElts)
2037
- ? node.schemaElts.map((item: any) => this.transform(item as any, context))
2038
- : this.transform(node.schemaElts as any, context);
1892
+ ? node.schemaElts.map((item) => this.transform(item, context))
1893
+ : this.transform(node.schemaElts, context);
2039
1894
  }
2040
1895
  if (node.if_not_exists !== undefined) {
2041
1896
  result.if_not_exists = node.if_not_exists;
2042
1897
  }
2043
1898
  return { CreateSchemaStmt: result };
2044
1899
  }
2045
- RoleSpec(node: any, context: any): {
2046
- RoleSpec: any;
2047
- } {
2048
- const result: any = {};
1900
+ RoleSpec(node, context) {
1901
+ const result = {};
2049
1902
  if (node.roletype !== undefined) {
2050
1903
  result.roletype = node.roletype;
2051
1904
  }
@@ -2057,14 +1910,12 @@ export class V15ToV16Transformer {
2057
1910
  }
2058
1911
  return { RoleSpec: result };
2059
1912
  }
2060
- DropStmt(node: any, context: any): {
2061
- DropStmt: any;
2062
- } {
2063
- const result: any = {};
1913
+ DropStmt(node, context) {
1914
+ const result = {};
2064
1915
  if (node.objects !== undefined) {
2065
1916
  result.objects = Array.isArray(node.objects)
2066
- ? node.objects.map((item: any) => this.transform(item as any, context))
2067
- : this.transform(node.objects as any, context);
1917
+ ? node.objects.map((item) => this.transform(item, context))
1918
+ : this.transform(node.objects, context);
2068
1919
  }
2069
1920
  if (node.removeType !== undefined) {
2070
1921
  result.removeType = node.removeType;
@@ -2080,14 +1931,12 @@ export class V15ToV16Transformer {
2080
1931
  }
2081
1932
  return { DropStmt: result };
2082
1933
  }
2083
- TruncateStmt(node: any, context: any): {
2084
- TruncateStmt: any;
2085
- } {
2086
- const result: any = {};
1934
+ TruncateStmt(node, context) {
1935
+ const result = {};
2087
1936
  if (node.relations !== undefined) {
2088
1937
  result.relations = Array.isArray(node.relations)
2089
- ? node.relations.map((item: any) => this.transform(item as any, context))
2090
- : this.transform(node.relations as any, context);
1938
+ ? node.relations.map((item) => this.transform(item, context))
1939
+ : this.transform(node.relations, context);
2091
1940
  }
2092
1941
  if (node.restart_seqs !== undefined) {
2093
1942
  result.restart_seqs = node.restart_seqs;
@@ -2097,52 +1946,46 @@ export class V15ToV16Transformer {
2097
1946
  }
2098
1947
  return { TruncateStmt: result };
2099
1948
  }
2100
- ReturnStmt(node: any, context: any): {
2101
- ReturnStmt: any;
2102
- } {
2103
- const result: any = {};
1949
+ ReturnStmt(node, context) {
1950
+ const result = {};
2104
1951
  if (node.returnval !== undefined) {
2105
- result.returnval = this.transform(node.returnval as any, context);
1952
+ result.returnval = this.transform(node.returnval, context);
2106
1953
  }
2107
1954
  return { ReturnStmt: result };
2108
1955
  }
2109
- PLAssignStmt(node: any, context: any): {
2110
- PLAssignStmt: any;
2111
- } {
2112
- const result: any = {};
1956
+ PLAssignStmt(node, context) {
1957
+ const result = {};
2113
1958
  if (node.name !== undefined) {
2114
1959
  result.name = node.name;
2115
1960
  }
2116
1961
  if (node.indirection !== undefined) {
2117
1962
  result.indirection = Array.isArray(node.indirection)
2118
- ? node.indirection.map((item: any) => this.transform(item as any, context))
2119
- : this.transform(node.indirection as any, context);
1963
+ ? node.indirection.map((item) => this.transform(item, context))
1964
+ : this.transform(node.indirection, context);
2120
1965
  }
2121
1966
  if (node.nnames !== undefined) {
2122
1967
  result.nnames = node.nnames;
2123
1968
  }
2124
1969
  if (node.val !== undefined) {
2125
- result.val = this.transform(node.val as any, context);
1970
+ result.val = this.transform(node.val, context);
2126
1971
  }
2127
1972
  if (node.location !== undefined) {
2128
1973
  result.location = node.location;
2129
1974
  }
2130
1975
  return { PLAssignStmt: result };
2131
1976
  }
2132
- CopyStmt(node: any, context: any): {
2133
- CopyStmt: any;
2134
- } {
2135
- const result: any = {};
1977
+ CopyStmt(node, context) {
1978
+ const result = {};
2136
1979
  if (node.relation !== undefined) {
2137
- result.relation = this.transform(node.relation as any, context);
1980
+ result.relation = this.transform(node.relation, context);
2138
1981
  }
2139
1982
  if (node.query !== undefined) {
2140
- result.query = this.transform(node.query as any, context);
1983
+ result.query = this.transform(node.query, context);
2141
1984
  }
2142
1985
  if (node.attlist !== undefined) {
2143
1986
  result.attlist = Array.isArray(node.attlist)
2144
- ? node.attlist.map((item: any) => this.transform(item as any, context))
2145
- : this.transform(node.attlist as any, context);
1987
+ ? node.attlist.map((item) => this.transform(item, context))
1988
+ : this.transform(node.attlist, context);
2146
1989
  }
2147
1990
  if (node.is_from !== undefined) {
2148
1991
  result.is_from = node.is_from;
@@ -2155,25 +1998,23 @@ export class V15ToV16Transformer {
2155
1998
  }
2156
1999
  if (node.options !== undefined) {
2157
2000
  result.options = Array.isArray(node.options)
2158
- ? node.options.map((item: any) => this.transform(item as any, context))
2159
- : this.transform(node.options as any, context);
2001
+ ? node.options.map((item) => this.transform(item, context))
2002
+ : this.transform(node.options, context);
2160
2003
  }
2161
2004
  if (node.whereClause !== undefined) {
2162
- result.whereClause = this.transform(node.whereClause as any, context);
2005
+ result.whereClause = this.transform(node.whereClause, context);
2163
2006
  }
2164
2007
  return { CopyStmt: result };
2165
2008
  }
2166
- AlterTableStmt(node: any, context: any): {
2167
- AlterTableStmt: any;
2168
- } {
2169
- const result: any = {};
2009
+ AlterTableStmt(node, context) {
2010
+ const result = {};
2170
2011
  if (node.relation !== undefined) {
2171
- result.relation = this.transform(node.relation as any, context);
2012
+ result.relation = this.transform(node.relation, context);
2172
2013
  }
2173
2014
  if (node.cmds !== undefined) {
2174
2015
  result.cmds = Array.isArray(node.cmds)
2175
- ? node.cmds.map((item: any) => this.transform(item as any, context))
2176
- : this.transform(node.cmds as any, context);
2016
+ ? node.cmds.map((item) => this.transform(item, context))
2017
+ : this.transform(node.cmds, context);
2177
2018
  }
2178
2019
  if (node.objtype !== undefined) {
2179
2020
  result.objtype = node.objtype;
@@ -2183,10 +2024,8 @@ export class V15ToV16Transformer {
2183
2024
  }
2184
2025
  return { AlterTableStmt: result };
2185
2026
  }
2186
- AlterTableCmd(node: any, context: any): {
2187
- AlterTableCmd: any;
2188
- } {
2189
- const result: any = {};
2027
+ AlterTableCmd(node, context) {
2028
+ const result = {};
2190
2029
  if (node.subtype !== undefined) {
2191
2030
  result.subtype = node.subtype;
2192
2031
  }
@@ -2197,10 +2036,10 @@ export class V15ToV16Transformer {
2197
2036
  result.num = node.num;
2198
2037
  }
2199
2038
  if (node.newowner !== undefined) {
2200
- result.newowner = this.transform(node.newowner as any, context);
2039
+ result.newowner = this.transform(node.newowner, context);
2201
2040
  }
2202
2041
  if (node.def !== undefined) {
2203
- result.def = this.transform(node.def as any, context);
2042
+ result.def = this.transform(node.def, context);
2204
2043
  }
2205
2044
  if (node.behavior !== undefined) {
2206
2045
  result.behavior = node.behavior;
@@ -2210,10 +2049,8 @@ export class V15ToV16Transformer {
2210
2049
  }
2211
2050
  return { AlterTableCmd: result };
2212
2051
  }
2213
- CreateFunctionStmt(node: any, context: any): {
2214
- CreateFunctionStmt: any;
2215
- } {
2216
- const result: any = {};
2052
+ CreateFunctionStmt(node, context) {
2053
+ const result = {};
2217
2054
  if (node.is_procedure !== undefined) {
2218
2055
  result.is_procedure = node.is_procedure;
2219
2056
  }
@@ -2222,74 +2059,66 @@ export class V15ToV16Transformer {
2222
2059
  }
2223
2060
  if (node.funcname !== undefined) {
2224
2061
  result.funcname = Array.isArray(node.funcname)
2225
- ? node.funcname.map((item: any) => this.transform(item as any, context))
2226
- : this.transform(node.funcname as any, context);
2062
+ ? node.funcname.map((item) => this.transform(item, context))
2063
+ : this.transform(node.funcname, context);
2227
2064
  }
2228
2065
  if (node.parameters !== undefined) {
2229
2066
  result.parameters = Array.isArray(node.parameters)
2230
- ? node.parameters.map((item: any) => this.transform(item as any, context))
2231
- : this.transform(node.parameters as any, context);
2067
+ ? node.parameters.map((item) => this.transform(item, context))
2068
+ : this.transform(node.parameters, context);
2232
2069
  }
2233
2070
  if (node.returnType !== undefined) {
2234
- result.returnType = this.transform(node.returnType as any, context);
2071
+ result.returnType = this.transform(node.returnType, context);
2235
2072
  }
2236
2073
  if (node.options !== undefined) {
2237
2074
  result.options = Array.isArray(node.options)
2238
- ? node.options.map((item: any) => this.transform(item as any, context))
2239
- : this.transform(node.options as any, context);
2075
+ ? node.options.map((item) => this.transform(item, context))
2076
+ : this.transform(node.options, context);
2240
2077
  }
2241
2078
  if (node.sql_body !== undefined) {
2242
- result.sql_body = this.transform(node.sql_body as any, context);
2079
+ result.sql_body = this.transform(node.sql_body, context);
2243
2080
  }
2244
2081
  return { CreateFunctionStmt: result };
2245
2082
  }
2246
- FunctionParameter(node: any, context: any): {
2247
- FunctionParameter: any;
2248
- } {
2249
- const result: any = {};
2083
+ FunctionParameter(node, context) {
2084
+ const result = {};
2250
2085
  if (node.name !== undefined) {
2251
2086
  result.name = node.name;
2252
2087
  }
2253
2088
  if (node.argType !== undefined) {
2254
- result.argType = this.transform(node.argType as any, context);
2089
+ result.argType = this.transform(node.argType, context);
2255
2090
  }
2256
2091
  if (node.mode !== undefined) {
2257
2092
  result.mode = node.mode;
2258
2093
  }
2259
2094
  if (node.defexpr !== undefined) {
2260
- result.defexpr = this.transform(node.defexpr as any, context);
2095
+ result.defexpr = this.transform(node.defexpr, context);
2261
2096
  }
2262
2097
  return { FunctionParameter: result };
2263
2098
  }
2264
- CompositeTypeStmt(node: any, context: any): {
2265
- CompositeTypeStmt: any;
2266
- } {
2267
- const result: any = {};
2099
+ CompositeTypeStmt(node, context) {
2100
+ const result = {};
2268
2101
  if (node.typevar !== undefined) {
2269
- result.typevar = this.transform(node.typevar as any, context);
2102
+ result.typevar = this.transform(node.typevar, context);
2270
2103
  }
2271
2104
  if (node.coldeflist !== undefined) {
2272
2105
  result.coldeflist = Array.isArray(node.coldeflist)
2273
- ? node.coldeflist.map((item: any) => this.transform(item as any, context))
2274
- : this.transform(node.coldeflist as any, context);
2106
+ ? node.coldeflist.map((item) => this.transform(item, context))
2107
+ : this.transform(node.coldeflist, context);
2275
2108
  }
2276
2109
  return { CompositeTypeStmt: result };
2277
2110
  }
2278
- DoStmt(node: any, context: any): {
2279
- DoStmt: any;
2280
- } {
2281
- const result: any = {};
2111
+ DoStmt(node, context) {
2112
+ const result = {};
2282
2113
  if (node.args !== undefined) {
2283
2114
  result.args = Array.isArray(node.args)
2284
- ? node.args.map((item: any) => this.transform(item as any, context))
2285
- : this.transform(node.args as any, context);
2115
+ ? node.args.map((item) => this.transform(item, context))
2116
+ : this.transform(node.args, context);
2286
2117
  }
2287
2118
  return { DoStmt: result };
2288
2119
  }
2289
- DefineStmt(node: any, context: any): {
2290
- DefineStmt: any;
2291
- } {
2292
- const result: any = {};
2120
+ DefineStmt(node, context) {
2121
+ const result = {};
2293
2122
  if (node.kind !== undefined) {
2294
2123
  result.kind = node.kind;
2295
2124
  }
@@ -2298,18 +2127,18 @@ export class V15ToV16Transformer {
2298
2127
  }
2299
2128
  if (node.defnames !== undefined) {
2300
2129
  result.defnames = Array.isArray(node.defnames)
2301
- ? node.defnames.map((item: any) => this.transform(item as any, context))
2302
- : this.transform(node.defnames as any, context);
2130
+ ? node.defnames.map((item) => this.transform(item, context))
2131
+ : this.transform(node.defnames, context);
2303
2132
  }
2304
2133
  if (node.args !== undefined) {
2305
2134
  result.args = Array.isArray(node.args)
2306
- ? node.args.map((item: any) => this.transform(item as any, context))
2307
- : this.transform(node.args as any, context);
2135
+ ? node.args.map((item) => this.transform(item, context))
2136
+ : this.transform(node.args, context);
2308
2137
  }
2309
2138
  if (node.definition !== undefined) {
2310
2139
  result.definition = Array.isArray(node.definition)
2311
- ? node.definition.map((item: any) => this.transform(item as any, context))
2312
- : this.transform(node.definition as any, context);
2140
+ ? node.definition.map((item) => this.transform(item, context))
2141
+ : this.transform(node.definition, context);
2313
2142
  }
2314
2143
  if (node.if_not_exists !== undefined) {
2315
2144
  result.if_not_exists = node.if_not_exists;
@@ -2319,63 +2148,55 @@ export class V15ToV16Transformer {
2319
2148
  }
2320
2149
  return { DefineStmt: result };
2321
2150
  }
2322
- RangeSubselect(node: any, context: any): {
2323
- RangeSubselect: any;
2324
- } {
2325
- const result: any = {};
2151
+ RangeSubselect(node, context) {
2152
+ const result = {};
2326
2153
  if (node.lateral !== undefined) {
2327
2154
  result.lateral = node.lateral;
2328
2155
  }
2329
2156
  if (node.subquery !== undefined) {
2330
- result.subquery = this.transform(node.subquery as any, context);
2157
+ result.subquery = this.transform(node.subquery, context);
2331
2158
  }
2332
2159
  if (node.alias !== undefined) {
2333
- result.alias = this.transform(node.alias as any, context);
2160
+ result.alias = this.transform(node.alias, context);
2334
2161
  }
2335
2162
  return { RangeSubselect: result };
2336
2163
  }
2337
- CreateEnumStmt(node: any, context: any): {
2338
- CreateEnumStmt: any;
2339
- } {
2340
- const result: any = {};
2164
+ CreateEnumStmt(node, context) {
2165
+ const result = {};
2341
2166
  if (node.typeName !== undefined) {
2342
2167
  result.typeName = Array.isArray(node.typeName)
2343
- ? node.typeName.map((item: any) => this.transform(item as any, context))
2344
- : this.transform(node.typeName as any, context);
2168
+ ? node.typeName.map((item) => this.transform(item, context))
2169
+ : this.transform(node.typeName, context);
2345
2170
  }
2346
2171
  if (node.vals !== undefined) {
2347
2172
  result.vals = Array.isArray(node.vals)
2348
- ? node.vals.map((item: any) => this.transform(item as any, context))
2349
- : this.transform(node.vals as any, context);
2173
+ ? node.vals.map((item) => this.transform(item, context))
2174
+ : this.transform(node.vals, context);
2350
2175
  }
2351
2176
  return { CreateEnumStmt: result };
2352
2177
  }
2353
- CreateDomainStmt(node: any, context: any): {
2354
- CreateDomainStmt: any;
2355
- } {
2356
- const result: any = {};
2178
+ CreateDomainStmt(node, context) {
2179
+ const result = {};
2357
2180
  if (node.domainname !== undefined) {
2358
2181
  result.domainname = Array.isArray(node.domainname)
2359
- ? node.domainname.map((item: any) => this.transform(item as any, context))
2360
- : this.transform(node.domainname as any, context);
2182
+ ? node.domainname.map((item) => this.transform(item, context))
2183
+ : this.transform(node.domainname, context);
2361
2184
  }
2362
2185
  if (node.typeName !== undefined) {
2363
- result.typeName = this.transform(node.typeName as any, context);
2186
+ result.typeName = this.transform(node.typeName, context);
2364
2187
  }
2365
2188
  if (node.collClause !== undefined) {
2366
- result.collClause = this.transform(node.collClause as any, context);
2189
+ result.collClause = this.transform(node.collClause, context);
2367
2190
  }
2368
2191
  if (node.constraints !== undefined) {
2369
2192
  result.constraints = Array.isArray(node.constraints)
2370
- ? node.constraints.map((item: any) => this.transform(item as any, context))
2371
- : this.transform(node.constraints as any, context);
2193
+ ? node.constraints.map((item) => this.transform(item, context))
2194
+ : this.transform(node.constraints, context);
2372
2195
  }
2373
2196
  return { CreateDomainStmt: result };
2374
2197
  }
2375
- CreateRoleStmt(node: any, context: any): {
2376
- CreateRoleStmt: any;
2377
- } {
2378
- const result: any = {};
2198
+ CreateRoleStmt(node, context) {
2199
+ const result = {};
2379
2200
  if (node.stmt_type !== undefined) {
2380
2201
  result.stmt_type = node.stmt_type;
2381
2202
  }
@@ -2384,15 +2205,13 @@ export class V15ToV16Transformer {
2384
2205
  }
2385
2206
  if (node.options !== undefined) {
2386
2207
  result.options = Array.isArray(node.options)
2387
- ? node.options.map((item: any) => this.transform(item as any, context))
2388
- : this.transform(node.options as any, context);
2208
+ ? node.options.map((item) => this.transform(item, context))
2209
+ : this.transform(node.options, context);
2389
2210
  }
2390
2211
  return { CreateRoleStmt: result };
2391
2212
  }
2392
- DefElem(node: any, context: any): {
2393
- DefElem: any;
2394
- } {
2395
- const result: any = {};
2213
+ DefElem(node, context) {
2214
+ const result = {};
2396
2215
  if (node.defnamespace !== undefined) {
2397
2216
  result.defnamespace = node.defnamespace;
2398
2217
  }
@@ -2400,7 +2219,7 @@ export class V15ToV16Transformer {
2400
2219
  result.defname = node.defname;
2401
2220
  }
2402
2221
  if (node.arg !== undefined) {
2403
- result.arg = this.transform(node.arg as any, context);
2222
+ result.arg = this.transform(node.arg, context);
2404
2223
  }
2405
2224
  if (node.defaction !== undefined) {
2406
2225
  result.defaction = node.defaction;
@@ -2410,30 +2229,26 @@ export class V15ToV16Transformer {
2410
2229
  }
2411
2230
  return { DefElem: result };
2412
2231
  }
2413
- CreateTableSpaceStmt(node: any, context: any): {
2414
- CreateTableSpaceStmt: any;
2415
- } {
2416
- const result: any = {};
2232
+ CreateTableSpaceStmt(node, context) {
2233
+ const result = {};
2417
2234
  if (node.tablespacename !== undefined) {
2418
2235
  result.tablespacename = node.tablespacename;
2419
2236
  }
2420
2237
  if (node.owner !== undefined) {
2421
- result.owner = this.transform(node.owner as any, context);
2238
+ result.owner = this.transform(node.owner, context);
2422
2239
  }
2423
2240
  if (node.location !== undefined) {
2424
2241
  result.location = node.location;
2425
2242
  }
2426
2243
  if (node.options !== undefined) {
2427
2244
  result.options = Array.isArray(node.options)
2428
- ? node.options.map((item: any) => this.transform(item as any, context))
2429
- : this.transform(node.options as any, context);
2245
+ ? node.options.map((item) => this.transform(item, context))
2246
+ : this.transform(node.options, context);
2430
2247
  }
2431
2248
  return { CreateTableSpaceStmt: result };
2432
2249
  }
2433
- DropTableSpaceStmt(node: any, context: any): {
2434
- DropTableSpaceStmt: any;
2435
- } {
2436
- const result: any = {};
2250
+ DropTableSpaceStmt(node, context) {
2251
+ const result = {};
2437
2252
  if (node.tablespacename !== undefined) {
2438
2253
  result.tablespacename = node.tablespacename;
2439
2254
  }
@@ -2442,27 +2257,23 @@ export class V15ToV16Transformer {
2442
2257
  }
2443
2258
  return { DropTableSpaceStmt: result };
2444
2259
  }
2445
- AlterTableSpaceOptionsStmt(node: any, context: any): {
2446
- AlterTableSpaceOptionsStmt: any;
2447
- } {
2448
- const result: any = {};
2260
+ AlterTableSpaceOptionsStmt(node, context) {
2261
+ const result = {};
2449
2262
  if (node.tablespacename !== undefined) {
2450
2263
  result.tablespacename = node.tablespacename;
2451
2264
  }
2452
2265
  if (node.options !== undefined) {
2453
2266
  result.options = Array.isArray(node.options)
2454
- ? node.options.map((item: any) => this.transform(item as any, context))
2455
- : this.transform(node.options as any, context);
2267
+ ? node.options.map((item) => this.transform(item, context))
2268
+ : this.transform(node.options, context);
2456
2269
  }
2457
2270
  if (node.isReset !== undefined) {
2458
2271
  result.isReset = node.isReset;
2459
2272
  }
2460
2273
  return { AlterTableSpaceOptionsStmt: result };
2461
2274
  }
2462
- CreateExtensionStmt(node: any, context: any): {
2463
- CreateExtensionStmt: any;
2464
- } {
2465
- const result: any = {};
2275
+ CreateExtensionStmt(node, context) {
2276
+ const result = {};
2466
2277
  if (node.extname !== undefined) {
2467
2278
  result.extname = node.extname;
2468
2279
  }
@@ -2471,377 +2282,263 @@ export class V15ToV16Transformer {
2471
2282
  }
2472
2283
  if (node.options !== undefined) {
2473
2284
  result.options = Array.isArray(node.options)
2474
- ? node.options.map((item: any) => this.transform(item as any, context))
2475
- : this.transform(node.options as any, context);
2285
+ ? node.options.map((item) => this.transform(item, context))
2286
+ : this.transform(node.options, context);
2476
2287
  }
2477
2288
  return { CreateExtensionStmt: result };
2478
2289
  }
2479
- AlterExtensionStmt(node: any, context: any): {
2480
- AlterExtensionStmt: any;
2481
- } {
2482
- const result: any = {};
2290
+ AlterExtensionStmt(node, context) {
2291
+ const result = {};
2483
2292
  if (node.extname !== undefined) {
2484
2293
  result.extname = node.extname;
2485
2294
  }
2486
2295
  if (node.options !== undefined) {
2487
2296
  result.options = Array.isArray(node.options)
2488
- ? node.options.map((item: any) => this.transform(item as any, context))
2489
- : this.transform(node.options as any, context);
2297
+ ? node.options.map((item) => this.transform(item, context))
2298
+ : this.transform(node.options, context);
2490
2299
  }
2491
2300
  return { AlterExtensionStmt: result };
2492
2301
  }
2493
- CreateFdwStmt(node: any, context: any): {
2494
- CreateFdwStmt: any;
2495
- } {
2496
- const result: any = { ...node };
2302
+ CreateFdwStmt(node, context) {
2303
+ const result = { ...node };
2497
2304
  return { CreateFdwStmt: result };
2498
2305
  }
2499
- SetOperationStmt(node: any, context: any): {
2500
- SetOperationStmt: any;
2501
- } {
2502
- const result: any = { ...node };
2306
+ SetOperationStmt(node, context) {
2307
+ const result = { ...node };
2503
2308
  return { SetOperationStmt: result };
2504
2309
  }
2505
- ReplicaIdentityStmt(node: any, context: any): {
2506
- ReplicaIdentityStmt: any;
2507
- } {
2508
- const result: any = { ...node };
2310
+ ReplicaIdentityStmt(node, context) {
2311
+ const result = { ...node };
2509
2312
  return { ReplicaIdentityStmt: result };
2510
2313
  }
2511
- AlterCollationStmt(node: any, context: any): {
2512
- AlterCollationStmt: any;
2513
- } {
2514
- const result: any = { ...node };
2314
+ AlterCollationStmt(node, context) {
2315
+ const result = { ...node };
2515
2316
  return { AlterCollationStmt: result };
2516
2317
  }
2517
- AlterDomainStmt(node: any, context: any): {
2518
- AlterDomainStmt: any;
2519
- } {
2520
- const result: any = { ...node };
2318
+ AlterDomainStmt(node, context) {
2319
+ const result = { ...node };
2521
2320
  return { AlterDomainStmt: result };
2522
2321
  }
2523
- PrepareStmt(node: any, context: any): {
2524
- PrepareStmt: any;
2525
- } {
2526
- const result: any = { ...node };
2322
+ PrepareStmt(node, context) {
2323
+ const result = { ...node };
2527
2324
  return { PrepareStmt: result };
2528
2325
  }
2529
- ExecuteStmt(node: any, context: any): {
2530
- ExecuteStmt: any;
2531
- } {
2532
- const result: any = { ...node };
2326
+ ExecuteStmt(node, context) {
2327
+ const result = { ...node };
2533
2328
  return { ExecuteStmt: result };
2534
2329
  }
2535
- DeallocateStmt(node: any, context: any): {
2536
- DeallocateStmt: any;
2537
- } {
2538
- const result: any = { ...node };
2330
+ DeallocateStmt(node, context) {
2331
+ const result = { ...node };
2539
2332
  return { DeallocateStmt: result };
2540
2333
  }
2541
- NotifyStmt(node: any, context: any): {
2542
- NotifyStmt: any;
2543
- } {
2544
- const result: any = { ...node };
2334
+ NotifyStmt(node, context) {
2335
+ const result = { ...node };
2545
2336
  return { NotifyStmt: result };
2546
2337
  }
2547
- ListenStmt(node: any, context: any): {
2548
- ListenStmt: any;
2549
- } {
2550
- const result: any = { ...node };
2338
+ ListenStmt(node, context) {
2339
+ const result = { ...node };
2551
2340
  return { ListenStmt: result };
2552
2341
  }
2553
- UnlistenStmt(node: any, context: any): {
2554
- UnlistenStmt: any;
2555
- } {
2556
- const result: any = { ...node };
2342
+ UnlistenStmt(node, context) {
2343
+ const result = { ...node };
2557
2344
  return { UnlistenStmt: result };
2558
2345
  }
2559
- CheckPointStmt(node: any, context: any): {
2560
- CheckPointStmt: any;
2561
- } {
2562
- const result: any = { ...node };
2346
+ CheckPointStmt(node, context) {
2347
+ const result = { ...node };
2563
2348
  return { CheckPointStmt: result };
2564
2349
  }
2565
- LoadStmt(node: any, context: any): {
2566
- LoadStmt: any;
2567
- } {
2568
- const result: any = { ...node };
2350
+ LoadStmt(node, context) {
2351
+ const result = { ...node };
2569
2352
  return { LoadStmt: result };
2570
2353
  }
2571
- DiscardStmt(node: any, context: any): {
2572
- DiscardStmt: any;
2573
- } {
2574
- const result: any = { ...node };
2354
+ DiscardStmt(node, context) {
2355
+ const result = { ...node };
2575
2356
  return { DiscardStmt: result };
2576
2357
  }
2577
- CommentStmt(node: any, context: any): {
2578
- CommentStmt: any;
2579
- } {
2580
- const result: any = {};
2358
+ CommentStmt(node, context) {
2359
+ const result = {};
2581
2360
  if (node.objtype !== undefined) {
2582
2361
  result.objtype = node.objtype;
2583
2362
  }
2584
2363
  if (node.object !== undefined) {
2585
- result.object = this.transform(node.object as any, context);
2364
+ result.object = this.transform(node.object, context);
2586
2365
  }
2587
2366
  if (node.comment !== undefined) {
2588
2367
  result.comment = node.comment;
2589
2368
  }
2590
2369
  return { CommentStmt: result };
2591
2370
  }
2592
- LockStmt(node: any, context: any): {
2593
- LockStmt: any;
2594
- } {
2595
- const result: any = { ...node };
2371
+ LockStmt(node, context) {
2372
+ const result = { ...node };
2596
2373
  return { LockStmt: result };
2597
2374
  }
2598
- CreatePolicyStmt(node: any, context: any): {
2599
- CreatePolicyStmt: any;
2600
- } {
2601
- const result: any = { ...node };
2375
+ CreatePolicyStmt(node, context) {
2376
+ const result = { ...node };
2602
2377
  return { CreatePolicyStmt: result };
2603
2378
  }
2604
- AlterPolicyStmt(node: any, context: any): {
2605
- AlterPolicyStmt: any;
2606
- } {
2607
- const result: any = { ...node };
2379
+ AlterPolicyStmt(node, context) {
2380
+ const result = { ...node };
2608
2381
  return { AlterPolicyStmt: result };
2609
2382
  }
2610
- CreateUserMappingStmt(node: any, context: any): {
2611
- CreateUserMappingStmt: any;
2612
- } {
2613
- const result: any = { ...node };
2383
+ CreateUserMappingStmt(node, context) {
2384
+ const result = { ...node };
2614
2385
  return { CreateUserMappingStmt: result };
2615
2386
  }
2616
- CreateStatsStmt(node: any, context: any): {
2617
- CreateStatsStmt: any;
2618
- } {
2619
- const result: any = { ...node };
2387
+ CreateStatsStmt(node, context) {
2388
+ const result = { ...node };
2620
2389
  return { CreateStatsStmt: result };
2621
2390
  }
2622
- StatsElem(node: any, context: any): {
2623
- StatsElem: any;
2624
- } {
2625
- const result: any = { ...node };
2391
+ StatsElem(node, context) {
2392
+ const result = { ...node };
2626
2393
  return { StatsElem: result };
2627
2394
  }
2628
- CreatePublicationStmt(node: any, context: any): {
2629
- CreatePublicationStmt: any;
2630
- } {
2631
- const result: any = { ...node };
2395
+ CreatePublicationStmt(node, context) {
2396
+ const result = { ...node };
2632
2397
  return { CreatePublicationStmt: result };
2633
2398
  }
2634
- CreateSubscriptionStmt(node: any, context: any): {
2635
- CreateSubscriptionStmt: any;
2636
- } {
2637
- const result: any = { ...node };
2399
+ CreateSubscriptionStmt(node, context) {
2400
+ const result = { ...node };
2638
2401
  return { CreateSubscriptionStmt: result };
2639
2402
  }
2640
- AlterPublicationStmt(node: any, context: any): {
2641
- AlterPublicationStmt: any;
2642
- } {
2643
- const result: any = { ...node };
2403
+ AlterPublicationStmt(node, context) {
2404
+ const result = { ...node };
2644
2405
  return { AlterPublicationStmt: result };
2645
2406
  }
2646
- AlterSubscriptionStmt(node: any, context: any): {
2647
- AlterSubscriptionStmt: any;
2648
- } {
2649
- const result: any = { ...node };
2407
+ AlterSubscriptionStmt(node, context) {
2408
+ const result = { ...node };
2650
2409
  return { AlterSubscriptionStmt: result };
2651
2410
  }
2652
- DropSubscriptionStmt(node: any, context: any): {
2653
- DropSubscriptionStmt: any;
2654
- } {
2655
- const result: any = { ...node };
2411
+ DropSubscriptionStmt(node, context) {
2412
+ const result = { ...node };
2656
2413
  return { DropSubscriptionStmt: result };
2657
2414
  }
2658
- InlineCodeBlock(node: any, context: any): {
2659
- InlineCodeBlock: any;
2660
- } {
2661
- const result: any = { ...node };
2415
+ InlineCodeBlock(node, context) {
2416
+ const result = { ...node };
2662
2417
  return { InlineCodeBlock: result };
2663
2418
  }
2664
- CallContext(node: any, context: any): {
2665
- CallContext: any;
2666
- } {
2667
- const result: any = { ...node };
2419
+ CallContext(node, context) {
2420
+ const result = { ...node };
2668
2421
  return { CallContext: result };
2669
2422
  }
2670
- ConstraintsSetStmt(node: any, context: any): {
2671
- ConstraintsSetStmt: any;
2672
- } {
2673
- const result: any = { ...node };
2423
+ ConstraintsSetStmt(node, context) {
2424
+ const result = { ...node };
2674
2425
  return { ConstraintsSetStmt: result };
2675
2426
  }
2676
- AlterSystemStmt(node: any, context: any): {
2677
- AlterSystemStmt: any;
2678
- } {
2679
- const result: any = { ...node };
2427
+ AlterSystemStmt(node, context) {
2428
+ const result = { ...node };
2680
2429
  return { AlterSystemStmt: result };
2681
2430
  }
2682
- VacuumRelation(node: any, context: any): {
2683
- VacuumRelation: any;
2684
- } {
2685
- const result: any = { ...node };
2431
+ VacuumRelation(node, context) {
2432
+ const result = { ...node };
2686
2433
  return { VacuumRelation: result };
2687
2434
  }
2688
- DropOwnedStmt(node: any, context: any): {
2689
- DropOwnedStmt: any;
2690
- } {
2691
- const result: any = { ...node };
2435
+ DropOwnedStmt(node, context) {
2436
+ const result = { ...node };
2692
2437
  return { DropOwnedStmt: result };
2693
2438
  }
2694
- ReassignOwnedStmt(node: any, context: any): {
2695
- ReassignOwnedStmt: any;
2696
- } {
2697
- const result: any = { ...node };
2439
+ ReassignOwnedStmt(node, context) {
2440
+ const result = { ...node };
2698
2441
  return { ReassignOwnedStmt: result };
2699
2442
  }
2700
- AlterTSDictionaryStmt(node: any, context: any): {
2701
- AlterTSDictionaryStmt: any;
2702
- } {
2703
- const result: any = { ...node };
2443
+ AlterTSDictionaryStmt(node, context) {
2444
+ const result = { ...node };
2704
2445
  return { AlterTSDictionaryStmt: result };
2705
2446
  }
2706
- AlterTSConfigurationStmt(node: any, context: any): {
2707
- AlterTSConfigurationStmt: any;
2708
- } {
2709
- const result: any = { ...node };
2447
+ AlterTSConfigurationStmt(node, context) {
2448
+ const result = { ...node };
2710
2449
  return { AlterTSConfigurationStmt: result };
2711
2450
  }
2712
- ClosePortalStmt(node: any, context: any): {
2713
- ClosePortalStmt: any;
2714
- } {
2715
- const result: any = { ...node };
2451
+ ClosePortalStmt(node, context) {
2452
+ const result = { ...node };
2716
2453
  return { ClosePortalStmt: result };
2717
2454
  }
2718
- FetchStmt(node: any, context: any): {
2719
- FetchStmt: any;
2720
- } {
2721
- const result: any = { ...node };
2455
+ FetchStmt(node, context) {
2456
+ const result = { ...node };
2722
2457
  return { FetchStmt: result };
2723
2458
  }
2724
- AlterStatsStmt(node: any, context: any): {
2725
- AlterStatsStmt: any;
2726
- } {
2727
- const result: any = { ...node };
2459
+ AlterStatsStmt(node, context) {
2460
+ const result = { ...node };
2728
2461
  return { AlterStatsStmt: result };
2729
2462
  }
2730
- ObjectWithArgs(node: any, context: any): {
2731
- ObjectWithArgs: any;
2732
- } {
2733
- const result: any = { ...node };
2463
+ ObjectWithArgs(node, context) {
2464
+ const result = { ...node };
2734
2465
  return { ObjectWithArgs: result };
2735
2466
  }
2736
- AlterOperatorStmt(node: any, context: any): {
2737
- AlterOperatorStmt: any;
2738
- } {
2739
- const result: any = { ...node };
2467
+ AlterOperatorStmt(node, context) {
2468
+ const result = { ...node };
2740
2469
  return { AlterOperatorStmt: result };
2741
2470
  }
2742
- AlterFdwStmt(node: any, context: any): {
2743
- AlterFdwStmt: any;
2744
- } {
2745
- const result: any = { ...node };
2471
+ AlterFdwStmt(node, context) {
2472
+ const result = { ...node };
2746
2473
  return { AlterFdwStmt: result };
2747
2474
  }
2748
- CreateForeignServerStmt(node: any, context: any): {
2749
- CreateForeignServerStmt: any;
2750
- } {
2751
- const result: any = { ...node };
2475
+ CreateForeignServerStmt(node, context) {
2476
+ const result = { ...node };
2752
2477
  return { CreateForeignServerStmt: result };
2753
2478
  }
2754
- AlterForeignServerStmt(node: any, context: any): {
2755
- AlterForeignServerStmt: any;
2756
- } {
2757
- const result: any = { ...node };
2479
+ AlterForeignServerStmt(node, context) {
2480
+ const result = { ...node };
2758
2481
  return { AlterForeignServerStmt: result };
2759
2482
  }
2760
- AlterUserMappingStmt(node: any, context: any): {
2761
- AlterUserMappingStmt: any;
2762
- } {
2763
- const result: any = { ...node };
2483
+ AlterUserMappingStmt(node, context) {
2484
+ const result = { ...node };
2764
2485
  return { AlterUserMappingStmt: result };
2765
2486
  }
2766
- DropUserMappingStmt(node: any, context: any): {
2767
- DropUserMappingStmt: any;
2768
- } {
2769
- const result: any = { ...node };
2487
+ DropUserMappingStmt(node, context) {
2488
+ const result = { ...node };
2770
2489
  return { DropUserMappingStmt: result };
2771
2490
  }
2772
- ImportForeignSchemaStmt(node: any, context: any): {
2773
- ImportForeignSchemaStmt: any;
2774
- } {
2775
- const result: any = { ...node };
2491
+ ImportForeignSchemaStmt(node, context) {
2492
+ const result = { ...node };
2776
2493
  return { ImportForeignSchemaStmt: result };
2777
2494
  }
2778
- ClusterStmt(node: any, context: any): {
2779
- ClusterStmt: any;
2780
- } {
2781
- const result: any = { ...node };
2495
+ ClusterStmt(node, context) {
2496
+ const result = { ...node };
2782
2497
  return { ClusterStmt: result };
2783
2498
  }
2784
- VacuumStmt(node: any, context: any): {
2785
- VacuumStmt: any;
2786
- } {
2787
- const result: any = { ...node };
2499
+ VacuumStmt(node, context) {
2500
+ const result = { ...node };
2788
2501
  return { VacuumStmt: result };
2789
2502
  }
2790
- ExplainStmt(node: any, context: any): {
2791
- ExplainStmt: any;
2792
- } {
2793
- const result: any = { ...node };
2503
+ ExplainStmt(node, context) {
2504
+ const result = { ...node };
2794
2505
  return { ExplainStmt: result };
2795
2506
  }
2796
- ReindexStmt(node: any, context: any): {
2797
- ReindexStmt: any;
2798
- } {
2799
- const result: any = { ...node };
2507
+ ReindexStmt(node, context) {
2508
+ const result = { ...node };
2800
2509
  return { ReindexStmt: result };
2801
2510
  }
2802
- CallStmt(node: any, context: any): {
2803
- CallStmt: any;
2804
- } {
2805
- const result: any = { ...node };
2511
+ CallStmt(node, context) {
2512
+ const result = { ...node };
2806
2513
  return { CallStmt: result };
2807
2514
  }
2808
- CreatedbStmt(node: any, context: any): {
2809
- CreatedbStmt: any;
2810
- } {
2811
- const result: any = { ...node };
2515
+ CreatedbStmt(node, context) {
2516
+ const result = { ...node };
2812
2517
  return { CreatedbStmt: result };
2813
2518
  }
2814
- DropdbStmt(node: any, context: any): {
2815
- DropdbStmt: any;
2816
- } {
2817
- const result: any = { ...node };
2519
+ DropdbStmt(node, context) {
2520
+ const result = { ...node };
2818
2521
  return { DropdbStmt: result };
2819
2522
  }
2820
- RenameStmt(node: any, context: any): {
2821
- RenameStmt: any;
2822
- } {
2823
- const result: any = { ...node };
2523
+ RenameStmt(node, context) {
2524
+ const result = { ...node };
2824
2525
  return { RenameStmt: result };
2825
2526
  }
2826
- AlterOwnerStmt(node: any, context: any): {
2827
- AlterOwnerStmt: any;
2828
- } {
2829
- const result: any = { ...node };
2527
+ AlterOwnerStmt(node, context) {
2528
+ const result = { ...node };
2830
2529
  return { AlterOwnerStmt: result };
2831
2530
  }
2832
- GrantRoleStmt(node: any, context: any): {
2833
- GrantRoleStmt: any;
2834
- } {
2835
- const result: any = {};
2531
+ GrantRoleStmt(node, context) {
2532
+ const result = {};
2836
2533
  if (node.granted_roles !== undefined) {
2837
2534
  result.granted_roles = Array.isArray(node.granted_roles)
2838
- ? node.granted_roles.map((item: any) => this.transform(item as any, context))
2839
- : this.transform(node.granted_roles as any, context);
2535
+ ? node.granted_roles.map((item) => this.transform(item, context))
2536
+ : this.transform(node.granted_roles, context);
2840
2537
  }
2841
2538
  if (node.grantee_roles !== undefined) {
2842
2539
  result.grantee_roles = Array.isArray(node.grantee_roles)
2843
- ? node.grantee_roles.map((item: any) => this.transform(item as any, context))
2844
- : this.transform(node.grantee_roles as any, context);
2540
+ ? node.grantee_roles.map((item) => this.transform(item, context))
2541
+ : this.transform(node.grantee_roles, context);
2845
2542
  }
2846
2543
  if (node.is_grant !== undefined) {
2847
2544
  result.is_grant = node.is_grant;
@@ -2849,7 +2546,7 @@ export class V15ToV16Transformer {
2849
2546
  if (node.behavior !== undefined) {
2850
2547
  result.behavior = node.behavior;
2851
2548
  }
2852
- const nodeAny = node as any;
2549
+ const nodeAny = node;
2853
2550
  if (nodeAny.admin_opt === true) {
2854
2551
  result.opt = [
2855
2552
  {
@@ -2868,259 +2565,179 @@ export class V15ToV16Transformer {
2868
2565
  else if (nodeAny.opt !== undefined) {
2869
2566
  // Handle any existing opt field by transforming it
2870
2567
  result.opt = Array.isArray(nodeAny.opt)
2871
- ? nodeAny.opt.map((item: any) => this.transform(item as any, context))
2872
- : this.transform(nodeAny.opt as any, context);
2568
+ ? nodeAny.opt.map((item) => this.transform(item, context))
2569
+ : this.transform(nodeAny.opt, context);
2873
2570
  }
2874
2571
  return { GrantRoleStmt: result };
2875
2572
  }
2876
- SecLabelStmt(node: any, context: any): {
2877
- SecLabelStmt: any;
2878
- } {
2879
- const result: any = { ...node };
2573
+ SecLabelStmt(node, context) {
2574
+ const result = { ...node };
2880
2575
  return { SecLabelStmt: result };
2881
2576
  }
2882
- AlterDefaultPrivilegesStmt(node: any, context: any): {
2883
- AlterDefaultPrivilegesStmt: any;
2884
- } {
2885
- const result: any = { ...node };
2577
+ AlterDefaultPrivilegesStmt(node, context) {
2578
+ const result = { ...node };
2886
2579
  return { AlterDefaultPrivilegesStmt: result };
2887
2580
  }
2888
- CreateConversionStmt(node: any, context: any): {
2889
- CreateConversionStmt: any;
2890
- } {
2891
- const result: any = { ...node };
2581
+ CreateConversionStmt(node, context) {
2582
+ const result = { ...node };
2892
2583
  return { CreateConversionStmt: result };
2893
2584
  }
2894
- CreateCastStmt(node: any, context: any): {
2895
- CreateCastStmt: any;
2896
- } {
2897
- const result: any = { ...node };
2585
+ CreateCastStmt(node, context) {
2586
+ const result = { ...node };
2898
2587
  return { CreateCastStmt: result };
2899
2588
  }
2900
- CreatePLangStmt(node: any, context: any): {
2901
- CreatePLangStmt: any;
2902
- } {
2903
- const result: any = { ...node };
2589
+ CreatePLangStmt(node, context) {
2590
+ const result = { ...node };
2904
2591
  return { CreatePLangStmt: result };
2905
2592
  }
2906
- CreateTransformStmt(node: any, context: any): {
2907
- CreateTransformStmt: any;
2908
- } {
2909
- const result: any = { ...node };
2593
+ CreateTransformStmt(node, context) {
2594
+ const result = { ...node };
2910
2595
  return { CreateTransformStmt: result };
2911
2596
  }
2912
- CreateTrigStmt(node: any, context: any): {
2913
- CreateTrigStmt: any;
2914
- } {
2915
- const result: any = { ...node };
2597
+ CreateTrigStmt(node, context) {
2598
+ const result = { ...node };
2916
2599
  return { CreateTrigStmt: result };
2917
2600
  }
2918
- TriggerTransition(node: any, context: any): {
2919
- TriggerTransition: any;
2920
- } {
2921
- const result: any = { ...node };
2601
+ TriggerTransition(node, context) {
2602
+ const result = { ...node };
2922
2603
  return { TriggerTransition: result };
2923
2604
  }
2924
- CreateEventTrigStmt(node: any, context: any): {
2925
- CreateEventTrigStmt: any;
2926
- } {
2927
- const result: any = { ...node };
2605
+ CreateEventTrigStmt(node, context) {
2606
+ const result = { ...node };
2928
2607
  return { CreateEventTrigStmt: result };
2929
2608
  }
2930
- AlterEventTrigStmt(node: any, context: any): {
2931
- AlterEventTrigStmt: any;
2932
- } {
2933
- const result: any = { ...node };
2609
+ AlterEventTrigStmt(node, context) {
2610
+ const result = { ...node };
2934
2611
  return { AlterEventTrigStmt: result };
2935
2612
  }
2936
- CreateOpClassStmt(node: any, context: any): {
2937
- CreateOpClassStmt: any;
2938
- } {
2939
- const result: any = { ...node };
2613
+ CreateOpClassStmt(node, context) {
2614
+ const result = { ...node };
2940
2615
  return { CreateOpClassStmt: result };
2941
2616
  }
2942
- CreateOpFamilyStmt(node: any, context: any): {
2943
- CreateOpFamilyStmt: any;
2944
- } {
2945
- const result: any = { ...node };
2617
+ CreateOpFamilyStmt(node, context) {
2618
+ const result = { ...node };
2946
2619
  return { CreateOpFamilyStmt: result };
2947
2620
  }
2948
- AlterOpFamilyStmt(node: any, context: any): {
2949
- AlterOpFamilyStmt: any;
2950
- } {
2951
- const result: any = { ...node };
2621
+ AlterOpFamilyStmt(node, context) {
2622
+ const result = { ...node };
2952
2623
  return { AlterOpFamilyStmt: result };
2953
2624
  }
2954
- MergeStmt(node: any, context: any): {
2955
- MergeStmt: any;
2956
- } {
2957
- const result: any = { ...node };
2625
+ MergeStmt(node, context) {
2626
+ const result = { ...node };
2958
2627
  return { MergeStmt: result };
2959
2628
  }
2960
- AlterTableMoveAllStmt(node: any, context: any): {
2961
- AlterTableMoveAllStmt: any;
2962
- } {
2963
- const result: any = { ...node };
2629
+ AlterTableMoveAllStmt(node, context) {
2630
+ const result = { ...node };
2964
2631
  return { AlterTableMoveAllStmt: result };
2965
2632
  }
2966
- CreateSeqStmt(node: any, context: any): {
2967
- CreateSeqStmt: any;
2968
- } {
2969
- const result: any = { ...node };
2633
+ CreateSeqStmt(node, context) {
2634
+ const result = { ...node };
2970
2635
  return { CreateSeqStmt: result };
2971
2636
  }
2972
- AlterSeqStmt(node: any, context: any): {
2973
- AlterSeqStmt: any;
2974
- } {
2975
- const result: any = { ...node };
2637
+ AlterSeqStmt(node, context) {
2638
+ const result = { ...node };
2976
2639
  return { AlterSeqStmt: result };
2977
2640
  }
2978
- CreateRangeStmt(node: any, context: any): {
2979
- CreateRangeStmt: any;
2980
- } {
2981
- const result: any = {};
2641
+ CreateRangeStmt(node, context) {
2642
+ const result = {};
2982
2643
  if (node.typeName !== undefined) {
2983
2644
  result.typeName = Array.isArray(node.typeName)
2984
- ? node.typeName.map((item: any) => this.transform(item as any, context))
2985
- : this.transform(node.typeName as any, context);
2645
+ ? node.typeName.map((item) => this.transform(item, context))
2646
+ : this.transform(node.typeName, context);
2986
2647
  }
2987
2648
  if (node.params !== undefined) {
2988
2649
  result.params = Array.isArray(node.params)
2989
- ? node.params.map((item: any) => this.transform(item as any, context))
2990
- : this.transform(node.params as any, context);
2650
+ ? node.params.map((item) => this.transform(item, context))
2651
+ : this.transform(node.params, context);
2991
2652
  }
2992
2653
  return { CreateRangeStmt: result };
2993
2654
  }
2994
- AlterEnumStmt(node: any, context: any): {
2995
- AlterEnumStmt: any;
2996
- } {
2997
- const result: any = { ...node };
2655
+ AlterEnumStmt(node, context) {
2656
+ const result = { ...node };
2998
2657
  return { AlterEnumStmt: result };
2999
2658
  }
3000
- AlterTypeStmt(node: any, context: any): {
3001
- AlterTypeStmt: any;
3002
- } {
3003
- const result: any = { ...node };
2659
+ AlterTypeStmt(node, context) {
2660
+ const result = { ...node };
3004
2661
  return { AlterTypeStmt: result };
3005
2662
  }
3006
- AlterRoleStmt(node: any, context: any): {
3007
- AlterRoleStmt: any;
3008
- } {
3009
- const result: any = { ...node };
2663
+ AlterRoleStmt(node, context) {
2664
+ const result = { ...node };
3010
2665
  return { AlterRoleStmt: result };
3011
2666
  }
3012
- CreateTableAsStmt(node: any, context: any): {
3013
- CreateTableAsStmt: any;
3014
- } {
3015
- const result: any = { ...node };
2667
+ CreateTableAsStmt(node, context) {
2668
+ const result = { ...node };
3016
2669
  return { CreateTableAsStmt: result };
3017
2670
  }
3018
- RefreshMatViewStmt(node: any, context: any): {
3019
- RefreshMatViewStmt: any;
3020
- } {
3021
- const result: any = { ...node };
2671
+ RefreshMatViewStmt(node, context) {
2672
+ const result = { ...node };
3022
2673
  return { RefreshMatViewStmt: result };
3023
2674
  }
3024
- AccessPriv(node: any, context: any): {
3025
- AccessPriv: any;
3026
- } {
3027
- const result: any = { ...node };
2675
+ AccessPriv(node, context) {
2676
+ const result = { ...node };
3028
2677
  return { AccessPriv: result };
3029
2678
  }
3030
- AlterDatabaseStmt(node: any, context: any): {
3031
- AlterDatabaseStmt: any;
3032
- } {
3033
- const result: any = { ...node };
2679
+ AlterDatabaseStmt(node, context) {
2680
+ const result = { ...node };
3034
2681
  return { AlterDatabaseStmt: result };
3035
2682
  }
3036
- AlterDatabaseRefreshCollStmt(node: any, context: any): {
3037
- AlterDatabaseRefreshCollStmt: any;
3038
- } {
3039
- const result: any = { ...node };
2683
+ AlterDatabaseRefreshCollStmt(node, context) {
2684
+ const result = { ...node };
3040
2685
  return { AlterDatabaseRefreshCollStmt: result };
3041
2686
  }
3042
- AlterDatabaseSetStmt(node: any, context: any): {
3043
- AlterDatabaseSetStmt: any;
3044
- } {
3045
- const result: any = { ...node };
2687
+ AlterDatabaseSetStmt(node, context) {
2688
+ const result = { ...node };
3046
2689
  return { AlterDatabaseSetStmt: result };
3047
2690
  }
3048
- DeclareCursorStmt(node: any, context: any): {
3049
- DeclareCursorStmt: any;
3050
- } {
3051
- const result: any = { ...node };
2691
+ DeclareCursorStmt(node, context) {
2692
+ const result = { ...node };
3052
2693
  return { DeclareCursorStmt: result };
3053
2694
  }
3054
- PublicationObjSpec(node: any, context: any): {
3055
- PublicationObjSpec: any;
3056
- } {
3057
- const result: any = { ...node };
2695
+ PublicationObjSpec(node, context) {
2696
+ const result = { ...node };
3058
2697
  return { PublicationObjSpec: result };
3059
2698
  }
3060
- PublicationTable(node: any, context: any): {
3061
- PublicationTable: any;
3062
- } {
3063
- const result: any = { ...node };
2699
+ PublicationTable(node, context) {
2700
+ const result = { ...node };
3064
2701
  return { PublicationTable: result };
3065
2702
  }
3066
- CreateAmStmt(node: any, context: any): {
3067
- CreateAmStmt: any;
3068
- } {
3069
- const result: any = { ...node };
2703
+ CreateAmStmt(node, context) {
2704
+ const result = { ...node };
3070
2705
  return { CreateAmStmt: result };
3071
2706
  }
3072
- IntoClause(node: any, context: any): {
3073
- IntoClause: any;
3074
- } {
3075
- const result: any = { ...node };
2707
+ IntoClause(node, context) {
2708
+ const result = { ...node };
3076
2709
  return { IntoClause: result };
3077
2710
  }
3078
- OnConflictExpr(node: any, context: any): {
3079
- OnConflictExpr: any;
3080
- } {
3081
- const result: any = { ...node };
2711
+ OnConflictExpr(node, context) {
2712
+ const result = { ...node };
3082
2713
  return { OnConflictExpr: result };
3083
2714
  }
3084
- ScanToken(node: any, context: any): {
3085
- ScanToken: any;
3086
- } {
3087
- const result: any = { ...node };
2715
+ ScanToken(node, context) {
2716
+ const result = { ...node };
3088
2717
  return { ScanToken: result };
3089
2718
  }
3090
- CreateOpClassItem(node: any, context: any): {
3091
- CreateOpClassItem: any;
3092
- } {
3093
- const result: any = { ...node };
2719
+ CreateOpClassItem(node, context) {
2720
+ const result = { ...node };
3094
2721
  return { CreateOpClassItem: result };
3095
2722
  }
3096
- Var(node: any, context: any): {
3097
- Var: any;
3098
- } {
3099
- const result: any = { ...node };
2723
+ Var(node, context) {
2724
+ const result = { ...node };
3100
2725
  return { Var: result };
3101
2726
  }
3102
- TableFunc(node: any, context: any): {
3103
- TableFunc: any;
3104
- } {
3105
- const result: any = { ...node };
2727
+ TableFunc(node, context) {
2728
+ const result = { ...node };
3106
2729
  return { TableFunc: result };
3107
2730
  }
3108
- RangeTableFunc(node: any, context: any): {
3109
- RangeTableFunc: any;
3110
- } {
3111
- const result: any = { ...node };
2731
+ RangeTableFunc(node, context) {
2732
+ const result = { ...node };
3112
2733
  return { RangeTableFunc: result };
3113
2734
  }
3114
- RangeTableFuncCol(node: any, context: any): {
3115
- RangeTableFuncCol: any;
3116
- } {
3117
- const result: any = { ...node };
2735
+ RangeTableFuncCol(node, context) {
2736
+ const result = { ...node };
3118
2737
  return { RangeTableFuncCol: result };
3119
2738
  }
3120
- RangeFunction(node: any, context: any): {
3121
- RangeFunction: any;
3122
- } {
3123
- const result: any = { ...node };
2739
+ RangeFunction(node, context) {
2740
+ const result = { ...node };
3124
2741
  if (node.lateral !== undefined) {
3125
2742
  result.lateral = node.lateral;
3126
2743
  }
@@ -3132,139 +2749,111 @@ export class V15ToV16Transformer {
3132
2749
  }
3133
2750
  if (node.functions !== undefined) {
3134
2751
  result.functions = Array.isArray(node.functions)
3135
- ? node.functions.map((item: any) => this.transform(item as any, context))
3136
- : this.transform(node.functions as any, context);
2752
+ ? node.functions.map((item) => this.transform(item, context))
2753
+ : this.transform(node.functions, context);
3137
2754
  }
3138
2755
  if (node.alias !== undefined) {
3139
- result.alias = this.transform(node.alias as any, context);
2756
+ result.alias = this.transform(node.alias, context);
3140
2757
  }
3141
2758
  if (node.coldeflist !== undefined) {
3142
2759
  result.coldeflist = Array.isArray(node.coldeflist)
3143
- ? node.coldeflist.map((item: any) => this.transform(item as any, context))
3144
- : this.transform(node.coldeflist as any, context);
2760
+ ? node.coldeflist.map((item) => this.transform(item, context))
2761
+ : this.transform(node.coldeflist, context);
3145
2762
  }
3146
2763
  return { RangeFunction: result };
3147
2764
  }
3148
- RangeTableSample(node: any, context: any): {
3149
- RangeTableSample: any;
3150
- } {
3151
- const result: any = { ...node };
2765
+ RangeTableSample(node, context) {
2766
+ const result = { ...node };
3152
2767
  if (node.relation !== undefined) {
3153
- result.relation = this.transform(node.relation as any, context);
2768
+ result.relation = this.transform(node.relation, context);
3154
2769
  }
3155
2770
  if (node.method !== undefined) {
3156
2771
  result.method = Array.isArray(node.method)
3157
- ? node.method.map((item: any) => this.transform(item as any, context))
3158
- : this.transform(node.method as any, context);
2772
+ ? node.method.map((item) => this.transform(item, context))
2773
+ : this.transform(node.method, context);
3159
2774
  }
3160
2775
  if (node.args !== undefined) {
3161
2776
  result.args = Array.isArray(node.args)
3162
- ? node.args.map((item: any) => this.transform(item as any, context))
3163
- : this.transform(node.args as any, context);
2777
+ ? node.args.map((item) => this.transform(item, context))
2778
+ : this.transform(node.args, context);
3164
2779
  }
3165
2780
  if (node.repeatable !== undefined) {
3166
- result.repeatable = this.transform(node.repeatable as any, context);
2781
+ result.repeatable = this.transform(node.repeatable, context);
3167
2782
  }
3168
2783
  return { RangeTableSample: result };
3169
2784
  }
3170
- XmlSerialize(node: any, context: any): {
3171
- XmlSerialize: any;
3172
- } {
3173
- const result: any = { ...node };
2785
+ XmlSerialize(node, context) {
2786
+ const result = { ...node };
3174
2787
  if (node.xmloption !== undefined) {
3175
2788
  result.xmloption = node.xmloption;
3176
2789
  }
3177
2790
  if (node.expr !== undefined) {
3178
- result.expr = this.transform(node.expr as any, context);
2791
+ result.expr = this.transform(node.expr, context);
3179
2792
  }
3180
2793
  if (node.typeName !== undefined) {
3181
- result.typeName = this.transform(node.typeName as any, context);
2794
+ result.typeName = this.transform(node.typeName, context);
3182
2795
  }
3183
2796
  if (node.location !== undefined) {
3184
2797
  result.location = node.location;
3185
2798
  }
3186
2799
  return { XmlSerialize: result };
3187
2800
  }
3188
- RuleStmt(node: any, context: any): {
3189
- RuleStmt: any;
3190
- } {
3191
- const result: any = { ...node };
2801
+ RuleStmt(node, context) {
2802
+ const result = { ...node };
3192
2803
  return { RuleStmt: result };
3193
2804
  }
3194
- SQLValueFunction(node: any, context: any): {
3195
- SQLValueFunction: any;
3196
- } {
3197
- const result: any = { ...node };
2805
+ SQLValueFunction(node, context) {
2806
+ const result = { ...node };
3198
2807
  return { SQLValueFunction: result };
3199
2808
  }
3200
- GroupingFunc(node: any, context: any): {
3201
- GroupingFunc: any;
3202
- } {
3203
- const result: any = { ...node };
2809
+ GroupingFunc(node, context) {
2810
+ const result = { ...node };
3204
2811
  return { GroupingFunc: result };
3205
2812
  }
3206
- MultiAssignRef(node: any, context: any): {
3207
- MultiAssignRef: any;
3208
- } {
3209
- const result: any = { ...node };
2813
+ MultiAssignRef(node, context) {
2814
+ const result = { ...node };
3210
2815
  return { MultiAssignRef: result };
3211
2816
  }
3212
- SetToDefault(node: any, context: any): {
3213
- SetToDefault: any;
3214
- } {
3215
- const result: any = { ...node };
2817
+ SetToDefault(node, context) {
2818
+ const result = { ...node };
3216
2819
  return { SetToDefault: result };
3217
2820
  }
3218
- CurrentOfExpr(node: any, context: any): {
3219
- CurrentOfExpr: any;
3220
- } {
3221
- const result: any = { ...node };
2821
+ CurrentOfExpr(node, context) {
2822
+ const result = { ...node };
3222
2823
  return { CurrentOfExpr: result };
3223
2824
  }
3224
- TableLikeClause(node: any, context: any): {
3225
- TableLikeClause: any;
3226
- } {
3227
- const result: any = { ...node };
2825
+ TableLikeClause(node, context) {
2826
+ const result = { ...node };
3228
2827
  return { TableLikeClause: result };
3229
2828
  }
3230
- AlterFunctionStmt(node: any, context: any): {
3231
- AlterFunctionStmt: any;
3232
- } {
3233
- const result: any = { ...node };
2829
+ AlterFunctionStmt(node, context) {
2830
+ const result = { ...node };
3234
2831
  return { AlterFunctionStmt: result };
3235
2832
  }
3236
- AlterObjectSchemaStmt(node: any, context: any): {
3237
- AlterObjectSchemaStmt: any;
3238
- } {
3239
- const result: any = { ...node };
2833
+ AlterObjectSchemaStmt(node, context) {
2834
+ const result = { ...node };
3240
2835
  return { AlterObjectSchemaStmt: result };
3241
2836
  }
3242
- CreateForeignTableStmt(node: any, context: any): {
3243
- CreateForeignTableStmt: any;
3244
- } {
3245
- const result: any = { ...node };
2837
+ CreateForeignTableStmt(node, context) {
2838
+ const result = { ...node };
3246
2839
  return { CreateForeignTableStmt: result };
3247
2840
  }
3248
- DropRoleStmt(node: any, context: any): {
3249
- DropRoleStmt: any;
3250
- } {
3251
- const result: any = { ...node };
2841
+ DropRoleStmt(node, context) {
2842
+ const result = { ...node };
3252
2843
  if (node.missing_ok !== undefined) {
3253
2844
  result.missing_ok = node.missing_ok;
3254
2845
  }
3255
2846
  if (node.roles !== undefined) {
3256
2847
  result.roles = Array.isArray(node.roles)
3257
- ? node.roles.map((item: any) => this.transform(item as any, context))
3258
- : this.transform(node.roles as any, context);
2848
+ ? node.roles.map((item) => this.transform(item, context))
2849
+ : this.transform(node.roles, context);
3259
2850
  }
3260
2851
  return { DropRoleStmt: result };
3261
2852
  }
3262
- XmlExpr(node: any, context: any): {
3263
- XmlExpr: any;
3264
- } {
3265
- const result: any = { ...node };
2853
+ XmlExpr(node, context) {
2854
+ const result = { ...node };
3266
2855
  if (node.xpr !== undefined) {
3267
- result.xpr = this.transform(node.xpr as any, context);
2856
+ result.xpr = this.transform(node.xpr, context);
3268
2857
  }
3269
2858
  if (node.op !== undefined) {
3270
2859
  result.op = node.op;
@@ -3274,18 +2863,18 @@ export class V15ToV16Transformer {
3274
2863
  }
3275
2864
  if (node.named_args !== undefined) {
3276
2865
  result.named_args = Array.isArray(node.named_args)
3277
- ? node.named_args.map((item: any) => this.transform(item as any, context))
3278
- : this.transform(node.named_args as any, context);
2866
+ ? node.named_args.map((item) => this.transform(item, context))
2867
+ : this.transform(node.named_args, context);
3279
2868
  }
3280
2869
  if (node.arg_names !== undefined) {
3281
2870
  result.arg_names = Array.isArray(node.arg_names)
3282
- ? node.arg_names.map((item: any) => this.transform(item as any, context))
3283
- : this.transform(node.arg_names as any, context);
2871
+ ? node.arg_names.map((item) => this.transform(item, context))
2872
+ : this.transform(node.arg_names, context);
3284
2873
  }
3285
2874
  if (node.args !== undefined) {
3286
2875
  result.args = Array.isArray(node.args)
3287
- ? node.args.map((item: any) => this.transform(item as any, context))
3288
- : this.transform(node.args as any, context);
2876
+ ? node.args.map((item) => this.transform(item, context))
2877
+ : this.transform(node.args, context);
3289
2878
  }
3290
2879
  if (node.xmloption !== undefined) {
3291
2880
  result.xmloption = node.xmloption;
@@ -3301,25 +2890,21 @@ export class V15ToV16Transformer {
3301
2890
  }
3302
2891
  return { XmlExpr: result };
3303
2892
  }
3304
- AlterRoleSetStmt(node: any, context: any): {
3305
- AlterRoleSetStmt: any;
3306
- } {
3307
- const result: any = { ...node };
2893
+ AlterRoleSetStmt(node, context) {
2894
+ const result = { ...node };
3308
2895
  if (node.role !== undefined) {
3309
- result.role = this.transform(node.role as any, context);
2896
+ result.role = this.transform(node.role, context);
3310
2897
  }
3311
2898
  if (node.database !== undefined) {
3312
2899
  result.database = node.database;
3313
2900
  }
3314
2901
  if (node.setstmt !== undefined) {
3315
- result.setstmt = this.transform(node.setstmt as any, context);
2902
+ result.setstmt = this.transform(node.setstmt, context);
3316
2903
  }
3317
2904
  return { AlterRoleSetStmt: result };
3318
2905
  }
3319
- GrantStmt(node: any, context: any): {
3320
- GrantStmt: any;
3321
- } {
3322
- const result: any = { ...node };
2906
+ GrantStmt(node, context) {
2907
+ const result = { ...node };
3323
2908
  if (node.is_grant !== undefined) {
3324
2909
  result.is_grant = node.is_grant;
3325
2910
  }
@@ -3331,18 +2916,18 @@ export class V15ToV16Transformer {
3331
2916
  }
3332
2917
  if (node.objects !== undefined) {
3333
2918
  result.objects = Array.isArray(node.objects)
3334
- ? node.objects.map((item: any) => this.transform(item as any, context))
3335
- : this.transform(node.objects as any, context);
2919
+ ? node.objects.map((item) => this.transform(item, context))
2920
+ : this.transform(node.objects, context);
3336
2921
  }
3337
2922
  if (node.privileges !== undefined) {
3338
2923
  result.privileges = Array.isArray(node.privileges)
3339
- ? node.privileges.map((item: any) => this.transform(item as any, context))
3340
- : this.transform(node.privileges as any, context);
2924
+ ? node.privileges.map((item) => this.transform(item, context))
2925
+ : this.transform(node.privileges, context);
3341
2926
  }
3342
2927
  if (node.grantees !== undefined) {
3343
2928
  result.grantees = Array.isArray(node.grantees)
3344
- ? node.grantees.map((item: any) => this.transform(item as any, context))
3345
- : this.transform(node.grantees as any, context);
2929
+ ? node.grantees.map((item) => this.transform(item, context))
2930
+ : this.transform(node.grantees, context);
3346
2931
  }
3347
2932
  if (node.grant_option !== undefined) {
3348
2933
  result.grant_option = node.grant_option;