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.
- package/LICENSE +21 -0
- package/README.md +12 -10
- package/deparser/deparser.d.ts +308 -0
- package/deparser/deparser.js +10477 -0
- package/deparser/index.d.ts +9 -0
- package/deparser/index.js +17 -0
- package/deparser/utils/list-utils.d.ts +8 -0
- package/deparser/utils/list-utils.js +30 -0
- package/deparser/utils/quote-utils.d.ts +24 -0
- package/deparser/utils/quote-utils.js +89 -0
- package/deparser/utils/sql-formatter.d.ts +16 -0
- package/deparser/utils/sql-formatter.js +40 -0
- package/deparser/visitors/base.d.ts +68 -0
- package/deparser/visitors/base.js +122 -0
- package/{src/deparser/deparser.ts → esm/deparser/deparser.js} +751 -752
- package/{src/deparser/index.ts → esm/deparser/index.js} +3 -4
- package/{src/deparser/utils/list-utils.ts → esm/deparser/utils/list-utils.js} +2 -3
- package/{src/deparser/utils/quote-utils.ts → esm/deparser/utils/quote-utils.js} +6 -7
- package/{src/deparser/utils/sql-formatter.ts → esm/deparser/utils/sql-formatter.js} +10 -11
- package/{src/deparser/visitors/base.ts → esm/deparser/visitors/base.js} +34 -62
- package/esm/index.js +15 -0
- package/{src/v13-to-v14.ts → esm/v13-to-v14.js} +472 -609
- package/{src/v13-to-v17-direct.ts → esm/v13-to-v17-direct.js} +11 -12
- package/{src/v14-to-v15.ts → esm/v14-to-v15.js} +261 -662
- package/{src/v15-to-v16.ts → esm/v15-to-v16.js} +814 -1229
- package/esm/v16-to-v17.js +1488 -0
- package/index.d.ts +9 -0
- package/index.js +19 -0
- package/package.json +5 -5
- package/v13-to-v14.d.ts +253 -0
- package/v13-to-v14.js +2754 -0
- package/v13-to-v17-direct.d.ts +24 -0
- package/v13-to-v17-direct.js +82 -0
- package/v14-to-v15.d.ts +616 -0
- package/v14-to-v15.js +1227 -0
- package/v15-to-v16.d.ts +633 -0
- package/v15-to-v16.js +2944 -0
- package/v16-to-v17.d.ts +638 -0
- package/v16-to-v17.js +1492 -0
- package/src/index.ts +0 -27
- package/src/v16-to-v17.ts +0 -1897
- package/tsconfig.esm.json +0 -8
- 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
|
* V14 to V15 AST Transformer
|
|
9
8
|
* Transforms PostgreSQL v14 AST nodes to v15 format
|
|
10
9
|
*/
|
|
11
10
|
export class V14ToV15Transformer {
|
|
12
|
-
transform(node
|
|
11
|
+
transform(node, context = { parentNodeTypes: [] }) {
|
|
13
12
|
if (node == null) {
|
|
14
13
|
return null;
|
|
15
14
|
}
|
|
@@ -24,39 +23,39 @@ export class V14ToV15Transformer {
|
|
|
24
23
|
}
|
|
25
24
|
catch (error) {
|
|
26
25
|
const nodeType = Object.keys(node)[0];
|
|
27
|
-
throw new Error(`Error transforming ${nodeType}: ${
|
|
26
|
+
throw new Error(`Error transforming ${nodeType}: ${error.message}`);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
visit(node
|
|
29
|
+
visit(node, context = { parentNodeTypes: [] }) {
|
|
31
30
|
const nodeType = this.getNodeType(node);
|
|
32
31
|
// Handle empty objects
|
|
33
32
|
if (!nodeType) {
|
|
34
33
|
return {};
|
|
35
34
|
}
|
|
36
35
|
const nodeData = this.getNodeData(node);
|
|
37
|
-
const methodName = nodeType
|
|
36
|
+
const methodName = nodeType;
|
|
38
37
|
if (typeof this[methodName] === 'function') {
|
|
39
|
-
const childContext
|
|
38
|
+
const childContext = {
|
|
40
39
|
...context,
|
|
41
40
|
parentNodeTypes: [...context.parentNodeTypes, nodeType]
|
|
42
41
|
};
|
|
43
|
-
const result =
|
|
42
|
+
const result = this[methodName](nodeData, childContext);
|
|
44
43
|
return result;
|
|
45
44
|
}
|
|
46
45
|
// If no specific method, use transformGenericNode to handle nested transformations
|
|
47
46
|
return this.transformGenericNode(node, context);
|
|
48
47
|
}
|
|
49
|
-
getNodeType(node
|
|
48
|
+
getNodeType(node) {
|
|
50
49
|
return Object.keys(node)[0];
|
|
51
50
|
}
|
|
52
|
-
getNodeData(node
|
|
51
|
+
getNodeData(node) {
|
|
53
52
|
const keys = Object.keys(node);
|
|
54
|
-
if (keys.length === 1 && typeof
|
|
55
|
-
return
|
|
53
|
+
if (keys.length === 1 && typeof node[keys[0]] === 'object') {
|
|
54
|
+
return node[keys[0]];
|
|
56
55
|
}
|
|
57
56
|
return node;
|
|
58
57
|
}
|
|
59
|
-
|
|
58
|
+
transformGenericNode(node, context) {
|
|
60
59
|
if (typeof node !== 'object' || node === null)
|
|
61
60
|
return node;
|
|
62
61
|
if (Array.isArray(node))
|
|
@@ -65,16 +64,16 @@ export class V14ToV15Transformer {
|
|
|
65
64
|
if (keys.length === 1 && typeof node[keys[0]] === 'object' && node[keys[0]] !== null && !Array.isArray(node[keys[0]])) {
|
|
66
65
|
const nodeType = keys[0];
|
|
67
66
|
const nodeData = node[keys[0]];
|
|
68
|
-
const transformedData
|
|
67
|
+
const transformedData = {};
|
|
69
68
|
for (const [key, value] of Object.entries(nodeData)) {
|
|
70
69
|
if (Array.isArray(value)) {
|
|
71
70
|
if (key === 'arrayBounds') {
|
|
72
71
|
transformedData[key] = value.map(item => {
|
|
73
|
-
return this.transform(item
|
|
72
|
+
return this.transform(item, context);
|
|
74
73
|
});
|
|
75
74
|
}
|
|
76
75
|
else {
|
|
77
|
-
transformedData[key] = value.map(item => this.transform(item
|
|
76
|
+
transformedData[key] = value.map(item => this.transform(item, context));
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
else if (typeof value === 'object' && value !== null) {
|
|
@@ -82,11 +81,11 @@ export class V14ToV15Transformer {
|
|
|
82
81
|
const isNumericKeysObject = keys.every(k => /^\d+$/.test(k));
|
|
83
82
|
if (isNumericKeysObject && keys.length > 0) {
|
|
84
83
|
const sortedKeys = keys.sort((a, b) => parseInt(a) - parseInt(b));
|
|
85
|
-
transformedData[key] = sortedKeys.map(k => this.transform(
|
|
84
|
+
transformedData[key] = sortedKeys.map(k => this.transform(value[k], context));
|
|
86
85
|
}
|
|
87
86
|
else {
|
|
88
87
|
// Regular object transformation
|
|
89
|
-
transformedData[key] = this.transform(value
|
|
88
|
+
transformedData[key] = this.transform(value, context);
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
else {
|
|
@@ -95,16 +94,16 @@ export class V14ToV15Transformer {
|
|
|
95
94
|
}
|
|
96
95
|
return { [nodeType]: transformedData };
|
|
97
96
|
}
|
|
98
|
-
const result
|
|
97
|
+
const result = {};
|
|
99
98
|
for (const [key, value] of Object.entries(node)) {
|
|
100
99
|
if (Array.isArray(value)) {
|
|
101
100
|
if (key === 'arrayBounds') {
|
|
102
101
|
result[key] = value.map(item => {
|
|
103
|
-
return this.transform(item
|
|
102
|
+
return this.transform(item, context);
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
105
|
else {
|
|
107
|
-
result[key] = value.map(item => this.transform(item
|
|
106
|
+
result[key] = value.map(item => this.transform(item, context));
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
else if (typeof value === 'object' && value !== null) {
|
|
@@ -112,11 +111,11 @@ export class V14ToV15Transformer {
|
|
|
112
111
|
const isNumericKeysObject = keys.every(k => /^\d+$/.test(k));
|
|
113
112
|
if (isNumericKeysObject && keys.length > 0) {
|
|
114
113
|
const sortedKeys = keys.sort((a, b) => parseInt(a) - parseInt(b));
|
|
115
|
-
result[key] = sortedKeys.map(k => this.transform(
|
|
114
|
+
result[key] = sortedKeys.map(k => this.transform(value[k], context));
|
|
116
115
|
}
|
|
117
116
|
else {
|
|
118
117
|
// Regular object transformation
|
|
119
|
-
result[key] = this.transform(value
|
|
118
|
+
result[key] = this.transform(value, context);
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
121
|
else {
|
|
@@ -125,11 +124,11 @@ export class V14ToV15Transformer {
|
|
|
125
124
|
}
|
|
126
125
|
return result;
|
|
127
126
|
}
|
|
128
|
-
ParseResult(node
|
|
127
|
+
ParseResult(node, context) {
|
|
129
128
|
if (node && typeof node === 'object' && 'version' in node && 'stmts' in node) {
|
|
130
129
|
return {
|
|
131
130
|
version: 150000, // PG15 version
|
|
132
|
-
stmts: node.stmts.map((stmt
|
|
131
|
+
stmts: node.stmts.map((stmt) => {
|
|
133
132
|
if (stmt && typeof stmt === 'object' && 'stmt' in stmt) {
|
|
134
133
|
return {
|
|
135
134
|
...stmt,
|
|
@@ -140,83 +139,59 @@ export class V14ToV15Transformer {
|
|
|
140
139
|
})
|
|
141
140
|
};
|
|
142
141
|
}
|
|
143
|
-
return node
|
|
142
|
+
return node;
|
|
144
143
|
}
|
|
145
|
-
RawStmt(node
|
|
146
|
-
RawStmt: any;
|
|
147
|
-
} {
|
|
144
|
+
RawStmt(node, context) {
|
|
148
145
|
const result = this.transformGenericNode(node, context);
|
|
149
146
|
return { RawStmt: result };
|
|
150
147
|
}
|
|
151
|
-
SelectStmt(node
|
|
152
|
-
SelectStmt: any;
|
|
153
|
-
} {
|
|
148
|
+
SelectStmt(node, context) {
|
|
154
149
|
const result = this.transformGenericNode(node, context);
|
|
155
150
|
return { SelectStmt: result };
|
|
156
151
|
}
|
|
157
|
-
A_Expr(node
|
|
158
|
-
A_Expr: any;
|
|
159
|
-
} {
|
|
152
|
+
A_Expr(node, context) {
|
|
160
153
|
const result = this.transformGenericNode(node, context);
|
|
161
154
|
return { A_Expr: result };
|
|
162
155
|
}
|
|
163
|
-
InsertStmt(node
|
|
164
|
-
InsertStmt: any;
|
|
165
|
-
} {
|
|
156
|
+
InsertStmt(node, context) {
|
|
166
157
|
const result = this.transformGenericNode(node, context);
|
|
167
158
|
return { InsertStmt: result };
|
|
168
159
|
}
|
|
169
|
-
UpdateStmt(node
|
|
170
|
-
UpdateStmt: any;
|
|
171
|
-
} {
|
|
160
|
+
UpdateStmt(node, context) {
|
|
172
161
|
const result = this.transformGenericNode(node, context);
|
|
173
162
|
return { UpdateStmt: result };
|
|
174
163
|
}
|
|
175
|
-
DeleteStmt(node
|
|
176
|
-
DeleteStmt: any;
|
|
177
|
-
} {
|
|
164
|
+
DeleteStmt(node, context) {
|
|
178
165
|
const result = this.transformGenericNode(node, context);
|
|
179
166
|
return { DeleteStmt: result };
|
|
180
167
|
}
|
|
181
|
-
WithClause(node
|
|
182
|
-
WithClause: any;
|
|
183
|
-
} {
|
|
168
|
+
WithClause(node, context) {
|
|
184
169
|
const result = this.transformGenericNode(node, context);
|
|
185
170
|
return { WithClause: result };
|
|
186
171
|
}
|
|
187
|
-
ResTarget(node
|
|
188
|
-
ResTarget: any;
|
|
189
|
-
} {
|
|
172
|
+
ResTarget(node, context) {
|
|
190
173
|
const result = this.transformGenericNode(node, context);
|
|
191
174
|
return { ResTarget: result };
|
|
192
175
|
}
|
|
193
|
-
BoolExpr(node
|
|
194
|
-
BoolExpr: any;
|
|
195
|
-
} {
|
|
176
|
+
BoolExpr(node, context) {
|
|
196
177
|
const result = this.transformGenericNode(node, context);
|
|
197
178
|
return { BoolExpr: result };
|
|
198
179
|
}
|
|
199
|
-
FuncCall(node
|
|
200
|
-
FuncCall: any;
|
|
201
|
-
} {
|
|
180
|
+
FuncCall(node, context) {
|
|
202
181
|
const result = this.transformGenericNode(node, context);
|
|
203
182
|
return { FuncCall: result };
|
|
204
183
|
}
|
|
205
|
-
FuncExpr(node
|
|
206
|
-
FuncExpr: any;
|
|
207
|
-
} {
|
|
184
|
+
FuncExpr(node, context) {
|
|
208
185
|
const result = this.transformGenericNode(node, context);
|
|
209
186
|
return { FuncExpr: result };
|
|
210
187
|
}
|
|
211
|
-
A_Const(node
|
|
212
|
-
|
|
213
|
-
} {
|
|
214
|
-
const result: any = {};
|
|
188
|
+
A_Const(node, context) {
|
|
189
|
+
const result = {};
|
|
215
190
|
for (const [key, value] of Object.entries(node)) {
|
|
216
191
|
result[key] = value;
|
|
217
192
|
}
|
|
218
193
|
if (result.val) {
|
|
219
|
-
const val
|
|
194
|
+
const val = result.val;
|
|
220
195
|
if (val.String && val.String.str !== undefined) {
|
|
221
196
|
result.sval = { sval: val.String.str };
|
|
222
197
|
delete result.val;
|
|
@@ -251,96 +226,72 @@ export class V14ToV15Transformer {
|
|
|
251
226
|
// Handle ival field directly (not nested in val) - removed overly broad conversion
|
|
252
227
|
return { A_Const: result };
|
|
253
228
|
}
|
|
254
|
-
ColumnRef(node
|
|
255
|
-
ColumnRef: any;
|
|
256
|
-
} {
|
|
229
|
+
ColumnRef(node, context) {
|
|
257
230
|
const result = this.transformGenericNode(node, context);
|
|
258
231
|
return { ColumnRef: result };
|
|
259
232
|
}
|
|
260
|
-
TypeName(node
|
|
261
|
-
TypeName: any;
|
|
262
|
-
} {
|
|
233
|
+
TypeName(node, context) {
|
|
263
234
|
const result = this.transformGenericNode(node, context);
|
|
264
235
|
return { TypeName: result };
|
|
265
236
|
}
|
|
266
|
-
Alias(node
|
|
267
|
-
Alias: any;
|
|
268
|
-
} {
|
|
237
|
+
Alias(node, context) {
|
|
269
238
|
const result = this.transformGenericNode(node, context);
|
|
270
239
|
return { Alias: result };
|
|
271
240
|
}
|
|
272
|
-
RangeVar(node
|
|
273
|
-
RangeVar: any;
|
|
274
|
-
} {
|
|
241
|
+
RangeVar(node, context) {
|
|
275
242
|
const result = this.transformGenericNode(node, context);
|
|
276
243
|
return { RangeVar: result };
|
|
277
244
|
}
|
|
278
|
-
A_ArrayExpr(node
|
|
279
|
-
A_ArrayExpr: any;
|
|
280
|
-
} {
|
|
245
|
+
A_ArrayExpr(node, context) {
|
|
281
246
|
const result = this.transformGenericNode(node, context);
|
|
282
247
|
return { A_ArrayExpr: result };
|
|
283
248
|
}
|
|
284
|
-
A_Indices(node
|
|
285
|
-
|
|
286
|
-
} {
|
|
287
|
-
const result: any = {};
|
|
249
|
+
A_Indices(node, context) {
|
|
250
|
+
const result = {};
|
|
288
251
|
if (node.is_slice !== undefined) {
|
|
289
252
|
result.is_slice = node.is_slice;
|
|
290
253
|
}
|
|
291
254
|
if (node.lidx !== undefined) {
|
|
292
|
-
result.lidx = this.transform(node.lidx
|
|
255
|
+
result.lidx = this.transform(node.lidx, context);
|
|
293
256
|
}
|
|
294
257
|
if (node.uidx !== undefined) {
|
|
295
258
|
const childContext = {
|
|
296
259
|
...context,
|
|
297
260
|
parentNodeTypes: [...(context.parentNodeTypes || []), 'A_Indices']
|
|
298
261
|
};
|
|
299
|
-
result.uidx = this.transform(node.uidx
|
|
262
|
+
result.uidx = this.transform(node.uidx, childContext);
|
|
300
263
|
}
|
|
301
264
|
return { A_Indices: result };
|
|
302
265
|
}
|
|
303
|
-
A_Indirection(node
|
|
304
|
-
A_Indirection: any;
|
|
305
|
-
} {
|
|
266
|
+
A_Indirection(node, context) {
|
|
306
267
|
const result = this.transformGenericNode(node, context);
|
|
307
268
|
return { A_Indirection: result };
|
|
308
269
|
}
|
|
309
|
-
A_Star(node
|
|
310
|
-
A_Star: any;
|
|
311
|
-
} {
|
|
270
|
+
A_Star(node, context) {
|
|
312
271
|
const result = this.transformGenericNode(node, context);
|
|
313
272
|
return { A_Star: result };
|
|
314
273
|
}
|
|
315
|
-
CaseExpr(node
|
|
316
|
-
CaseExpr: any;
|
|
317
|
-
} {
|
|
274
|
+
CaseExpr(node, context) {
|
|
318
275
|
const result = this.transformGenericNode(node, context);
|
|
319
276
|
return { CaseExpr: result };
|
|
320
277
|
}
|
|
321
|
-
CoalesceExpr(node
|
|
322
|
-
CoalesceExpr: any;
|
|
323
|
-
} {
|
|
278
|
+
CoalesceExpr(node, context) {
|
|
324
279
|
const result = this.transformGenericNode(node, context);
|
|
325
280
|
return { CoalesceExpr: result };
|
|
326
281
|
}
|
|
327
|
-
TypeCast(node
|
|
328
|
-
TypeCast: any;
|
|
329
|
-
} | {
|
|
330
|
-
A_Const: any;
|
|
331
|
-
} {
|
|
282
|
+
TypeCast(node, context) {
|
|
332
283
|
if (node.location === -1 && node.typeName && node.typeName.names) {
|
|
333
284
|
const typeNames = node.typeName.names.map(name => {
|
|
334
285
|
if (name && typeof name === 'object' && 'String' in name) {
|
|
335
286
|
const stringVal = name.String;
|
|
336
|
-
return
|
|
287
|
+
return stringVal.sval || stringVal.str;
|
|
337
288
|
}
|
|
338
289
|
return null;
|
|
339
290
|
}).filter(Boolean);
|
|
340
291
|
const hasPgCatalog = typeNames.includes('pg_catalog');
|
|
341
292
|
const hasBool = typeNames.includes('bool');
|
|
342
293
|
if (hasPgCatalog && hasBool && node.arg) {
|
|
343
|
-
const arg = node.arg
|
|
294
|
+
const arg = node.arg;
|
|
344
295
|
if (arg.A_Const) {
|
|
345
296
|
let stringValue = null;
|
|
346
297
|
// Handle both sval and val.String formats
|
|
@@ -377,42 +328,30 @@ export class V14ToV15Transformer {
|
|
|
377
328
|
const result = this.transformGenericNode(node, context);
|
|
378
329
|
return { TypeCast: result };
|
|
379
330
|
}
|
|
380
|
-
CollateClause(node
|
|
381
|
-
CollateClause: any;
|
|
382
|
-
} {
|
|
331
|
+
CollateClause(node, context) {
|
|
383
332
|
const result = this.transformGenericNode(node, context);
|
|
384
333
|
return { CollateClause: result };
|
|
385
334
|
}
|
|
386
|
-
BooleanTest(node
|
|
387
|
-
BooleanTest: any;
|
|
388
|
-
} {
|
|
335
|
+
BooleanTest(node, context) {
|
|
389
336
|
const result = this.transformGenericNode(node, context);
|
|
390
337
|
return { BooleanTest: result };
|
|
391
338
|
}
|
|
392
|
-
NullTest(node
|
|
393
|
-
NullTest: any;
|
|
394
|
-
} {
|
|
339
|
+
NullTest(node, context) {
|
|
395
340
|
const result = this.transformGenericNode(node, context);
|
|
396
341
|
return { NullTest: result };
|
|
397
342
|
}
|
|
398
|
-
String(node
|
|
399
|
-
|
|
400
|
-
} {
|
|
401
|
-
const result: any = { ...node };
|
|
343
|
+
String(node, context) {
|
|
344
|
+
const result = { ...node };
|
|
402
345
|
if (result.str !== undefined) {
|
|
403
346
|
result.sval = result.str;
|
|
404
347
|
delete result.str;
|
|
405
348
|
}
|
|
406
349
|
return { String: result };
|
|
407
350
|
}
|
|
408
|
-
Integer(node
|
|
409
|
-
Integer: any;
|
|
410
|
-
} | {
|
|
411
|
-
Boolean: any;
|
|
412
|
-
} {
|
|
351
|
+
Integer(node, context) {
|
|
413
352
|
const isInDefElemContext = context.parentNodeTypes?.includes('DefElem');
|
|
414
353
|
if (isInDefElemContext && node.ival !== undefined) {
|
|
415
|
-
const defElemName =
|
|
354
|
+
const defElemName = context.defElemName;
|
|
416
355
|
// CreateRoleStmt: specific role attributes should become Boolean
|
|
417
356
|
if (defElemName && ['createrole', 'superuser', 'canlogin', 'createdb', 'inherit', 'bypassrls', 'isreplication'].includes(defElemName) &&
|
|
418
357
|
(node.ival === 0 || node.ival === 1)) {
|
|
@@ -456,7 +395,7 @@ export class V14ToV15Transformer {
|
|
|
456
395
|
}
|
|
457
396
|
// DefineStmt context: specific cases where ival should become empty Integer
|
|
458
397
|
if (context.parentNodeTypes?.includes('DefineStmt')) {
|
|
459
|
-
const defElemName =
|
|
398
|
+
const defElemName = context.defElemName;
|
|
460
399
|
if (defElemName === 'initcond' && (node.ival === 0)) {
|
|
461
400
|
return { Integer: {} };
|
|
462
401
|
}
|
|
@@ -470,7 +409,7 @@ export class V14ToV15Transformer {
|
|
|
470
409
|
}
|
|
471
410
|
// CreateSeqStmt context: specific cases where ival should become empty Integer
|
|
472
411
|
if (context.parentNodeTypes?.includes('CreateSeqStmt')) {
|
|
473
|
-
const defElemName =
|
|
412
|
+
const defElemName = context.defElemName;
|
|
474
413
|
if (defElemName === 'start' && node.ival === 0) {
|
|
475
414
|
return { Integer: {} };
|
|
476
415
|
}
|
|
@@ -481,23 +420,19 @@ export class V14ToV15Transformer {
|
|
|
481
420
|
return { Integer: {} };
|
|
482
421
|
}
|
|
483
422
|
}
|
|
484
|
-
const result
|
|
423
|
+
const result = { ...node };
|
|
485
424
|
return { Integer: result };
|
|
486
425
|
}
|
|
487
|
-
Float(node
|
|
488
|
-
|
|
489
|
-
} {
|
|
490
|
-
const result: any = { ...node };
|
|
426
|
+
Float(node, context) {
|
|
427
|
+
const result = { ...node };
|
|
491
428
|
if (result.str !== undefined) {
|
|
492
429
|
result.fval = result.str;
|
|
493
430
|
delete result.str;
|
|
494
431
|
}
|
|
495
432
|
return { Float: result };
|
|
496
433
|
}
|
|
497
|
-
BitString(node
|
|
498
|
-
|
|
499
|
-
} {
|
|
500
|
-
const result: any = { ...node };
|
|
434
|
+
BitString(node, context) {
|
|
435
|
+
const result = { ...node };
|
|
501
436
|
if (result.str !== undefined) {
|
|
502
437
|
result.bsval = result.str;
|
|
503
438
|
delete result.str;
|
|
@@ -505,279 +440,193 @@ export class V14ToV15Transformer {
|
|
|
505
440
|
return { BitString: result };
|
|
506
441
|
}
|
|
507
442
|
// NOTE: there is no Null type in PG15
|
|
508
|
-
Null(node
|
|
443
|
+
Null(node, context) {
|
|
509
444
|
const result = this.transformGenericNode(node, context);
|
|
510
445
|
return { Null: result };
|
|
511
446
|
}
|
|
512
|
-
List(node
|
|
513
|
-
List: any;
|
|
514
|
-
} {
|
|
447
|
+
List(node, context) {
|
|
515
448
|
const result = this.transformGenericNode(node, context);
|
|
516
449
|
return { List: result };
|
|
517
450
|
}
|
|
518
|
-
CreateStmt(node
|
|
519
|
-
CreateStmt: any;
|
|
520
|
-
} {
|
|
451
|
+
CreateStmt(node, context) {
|
|
521
452
|
const result = this.transformGenericNode(node, context);
|
|
522
453
|
return { CreateStmt: result };
|
|
523
454
|
}
|
|
524
|
-
ColumnDef(node
|
|
525
|
-
ColumnDef: any;
|
|
526
|
-
} {
|
|
455
|
+
ColumnDef(node, context) {
|
|
527
456
|
const result = this.transformGenericNode(node, context);
|
|
528
457
|
return { ColumnDef: result };
|
|
529
458
|
}
|
|
530
|
-
Constraint(node
|
|
531
|
-
Constraint: any;
|
|
532
|
-
} {
|
|
459
|
+
Constraint(node, context) {
|
|
533
460
|
const result = this.transformGenericNode(node, context);
|
|
534
461
|
return { Constraint: result };
|
|
535
462
|
}
|
|
536
|
-
SubLink(node
|
|
537
|
-
SubLink: any;
|
|
538
|
-
} {
|
|
463
|
+
SubLink(node, context) {
|
|
539
464
|
const result = this.transformGenericNode(node, context);
|
|
540
465
|
return { SubLink: result };
|
|
541
466
|
}
|
|
542
|
-
CaseWhen(node
|
|
543
|
-
CaseWhen: any;
|
|
544
|
-
} {
|
|
467
|
+
CaseWhen(node, context) {
|
|
545
468
|
const result = this.transformGenericNode(node, context);
|
|
546
469
|
return { CaseWhen: result };
|
|
547
470
|
}
|
|
548
|
-
WindowDef(node
|
|
549
|
-
WindowDef: any;
|
|
550
|
-
} {
|
|
471
|
+
WindowDef(node, context) {
|
|
551
472
|
const result = this.transformGenericNode(node, context);
|
|
552
473
|
return { WindowDef: result };
|
|
553
474
|
}
|
|
554
|
-
SortBy(node
|
|
555
|
-
SortBy: any;
|
|
556
|
-
} {
|
|
475
|
+
SortBy(node, context) {
|
|
557
476
|
const result = this.transformGenericNode(node, context);
|
|
558
477
|
return { SortBy: result };
|
|
559
478
|
}
|
|
560
|
-
GroupingSet(node
|
|
561
|
-
GroupingSet: any;
|
|
562
|
-
} {
|
|
479
|
+
GroupingSet(node, context) {
|
|
563
480
|
const result = this.transformGenericNode(node, context);
|
|
564
481
|
return { GroupingSet: result };
|
|
565
482
|
}
|
|
566
|
-
CommonTableExpr(node
|
|
567
|
-
CommonTableExpr: any;
|
|
568
|
-
} {
|
|
483
|
+
CommonTableExpr(node, context) {
|
|
569
484
|
const result = this.transformGenericNode(node, context);
|
|
570
485
|
return { CommonTableExpr: result };
|
|
571
486
|
}
|
|
572
|
-
ParamRef(node
|
|
573
|
-
ParamRef: any;
|
|
574
|
-
} {
|
|
487
|
+
ParamRef(node, context) {
|
|
575
488
|
const result = this.transformGenericNode(node, context);
|
|
576
489
|
return { ParamRef: result };
|
|
577
490
|
}
|
|
578
|
-
LockingClause(node
|
|
579
|
-
LockingClause: any;
|
|
580
|
-
} {
|
|
491
|
+
LockingClause(node, context) {
|
|
581
492
|
const result = this.transformGenericNode(node, context);
|
|
582
493
|
return { LockingClause: result };
|
|
583
494
|
}
|
|
584
|
-
MinMaxExpr(node
|
|
585
|
-
MinMaxExpr: any;
|
|
586
|
-
} {
|
|
495
|
+
MinMaxExpr(node, context) {
|
|
587
496
|
const result = this.transformGenericNode(node, context);
|
|
588
497
|
return { MinMaxExpr: result };
|
|
589
498
|
}
|
|
590
|
-
RowExpr(node
|
|
591
|
-
RowExpr: any;
|
|
592
|
-
} {
|
|
499
|
+
RowExpr(node, context) {
|
|
593
500
|
const result = this.transformGenericNode(node, context);
|
|
594
501
|
return { RowExpr: result };
|
|
595
502
|
}
|
|
596
|
-
OpExpr(node
|
|
597
|
-
OpExpr: any;
|
|
598
|
-
} {
|
|
503
|
+
OpExpr(node, context) {
|
|
599
504
|
const result = this.transformGenericNode(node, context);
|
|
600
505
|
return { OpExpr: result };
|
|
601
506
|
}
|
|
602
|
-
DistinctExpr(node
|
|
603
|
-
DistinctExpr: any;
|
|
604
|
-
} {
|
|
507
|
+
DistinctExpr(node, context) {
|
|
605
508
|
const result = this.transformGenericNode(node, context);
|
|
606
509
|
return { DistinctExpr: result };
|
|
607
510
|
}
|
|
608
|
-
NullIfExpr(node
|
|
609
|
-
NullIfExpr: any;
|
|
610
|
-
} {
|
|
511
|
+
NullIfExpr(node, context) {
|
|
611
512
|
const result = this.transformGenericNode(node, context);
|
|
612
513
|
return { NullIfExpr: result };
|
|
613
514
|
}
|
|
614
|
-
ScalarArrayOpExpr(node
|
|
615
|
-
ScalarArrayOpExpr: any;
|
|
616
|
-
} {
|
|
515
|
+
ScalarArrayOpExpr(node, context) {
|
|
617
516
|
const result = this.transformGenericNode(node, context);
|
|
618
517
|
return { ScalarArrayOpExpr: result };
|
|
619
518
|
}
|
|
620
|
-
Aggref(node
|
|
621
|
-
Aggref: any;
|
|
622
|
-
} {
|
|
519
|
+
Aggref(node, context) {
|
|
623
520
|
const result = this.transformGenericNode(node, context);
|
|
624
521
|
return { Aggref: result };
|
|
625
522
|
}
|
|
626
|
-
WindowFunc(node
|
|
627
|
-
WindowFunc: any;
|
|
628
|
-
} {
|
|
523
|
+
WindowFunc(node, context) {
|
|
629
524
|
const result = this.transformGenericNode(node, context);
|
|
630
525
|
return { WindowFunc: result };
|
|
631
526
|
}
|
|
632
|
-
FieldSelect(node
|
|
633
|
-
FieldSelect: any;
|
|
634
|
-
} {
|
|
527
|
+
FieldSelect(node, context) {
|
|
635
528
|
const result = this.transformGenericNode(node, context);
|
|
636
529
|
return { FieldSelect: result };
|
|
637
530
|
}
|
|
638
|
-
RelabelType(node
|
|
639
|
-
RelabelType: any;
|
|
640
|
-
} {
|
|
531
|
+
RelabelType(node, context) {
|
|
641
532
|
const result = this.transformGenericNode(node, context);
|
|
642
533
|
return { RelabelType: result };
|
|
643
534
|
}
|
|
644
|
-
CoerceViaIO(node
|
|
645
|
-
CoerceViaIO: any;
|
|
646
|
-
} {
|
|
535
|
+
CoerceViaIO(node, context) {
|
|
647
536
|
const result = this.transformGenericNode(node, context);
|
|
648
537
|
return { CoerceViaIO: result };
|
|
649
538
|
}
|
|
650
|
-
ArrayCoerceExpr(node
|
|
651
|
-
ArrayCoerceExpr: any;
|
|
652
|
-
} {
|
|
539
|
+
ArrayCoerceExpr(node, context) {
|
|
653
540
|
const result = this.transformGenericNode(node, context);
|
|
654
541
|
return { ArrayCoerceExpr: result };
|
|
655
542
|
}
|
|
656
|
-
ConvertRowtypeExpr(node
|
|
657
|
-
ConvertRowtypeExpr: any;
|
|
658
|
-
} {
|
|
543
|
+
ConvertRowtypeExpr(node, context) {
|
|
659
544
|
const result = this.transformGenericNode(node, context);
|
|
660
545
|
return { ConvertRowtypeExpr: result };
|
|
661
546
|
}
|
|
662
|
-
NamedArgExpr(node
|
|
663
|
-
NamedArgExpr: any;
|
|
664
|
-
} {
|
|
547
|
+
NamedArgExpr(node, context) {
|
|
665
548
|
const result = this.transformGenericNode(node, context);
|
|
666
549
|
return { NamedArgExpr: result };
|
|
667
550
|
}
|
|
668
|
-
ViewStmt(node
|
|
669
|
-
ViewStmt: any;
|
|
670
|
-
} {
|
|
551
|
+
ViewStmt(node, context) {
|
|
671
552
|
const result = this.transformGenericNode(node, context);
|
|
672
553
|
return { ViewStmt: result };
|
|
673
554
|
}
|
|
674
|
-
IndexStmt(node
|
|
675
|
-
IndexStmt: any;
|
|
676
|
-
} {
|
|
555
|
+
IndexStmt(node, context) {
|
|
677
556
|
const result = this.transformGenericNode(node, context);
|
|
678
557
|
return { IndexStmt: result };
|
|
679
558
|
}
|
|
680
|
-
IndexElem(node
|
|
681
|
-
IndexElem: any;
|
|
682
|
-
} {
|
|
559
|
+
IndexElem(node, context) {
|
|
683
560
|
const result = this.transformGenericNode(node, context);
|
|
684
561
|
return { IndexElem: result };
|
|
685
562
|
}
|
|
686
|
-
PartitionElem(node
|
|
687
|
-
PartitionElem: any;
|
|
688
|
-
} {
|
|
563
|
+
PartitionElem(node, context) {
|
|
689
564
|
const result = this.transformGenericNode(node, context);
|
|
690
565
|
return { PartitionElem: result };
|
|
691
566
|
}
|
|
692
|
-
PartitionCmd(node
|
|
693
|
-
PartitionCmd: any;
|
|
694
|
-
} {
|
|
567
|
+
PartitionCmd(node, context) {
|
|
695
568
|
const result = this.transformGenericNode(node, context);
|
|
696
569
|
return { PartitionCmd: result };
|
|
697
570
|
}
|
|
698
|
-
JoinExpr(node
|
|
699
|
-
JoinExpr: any;
|
|
700
|
-
} {
|
|
571
|
+
JoinExpr(node, context) {
|
|
701
572
|
const result = this.transformGenericNode(node, context);
|
|
702
573
|
return { JoinExpr: result };
|
|
703
574
|
}
|
|
704
|
-
FromExpr(node
|
|
705
|
-
FromExpr: any;
|
|
706
|
-
} {
|
|
575
|
+
FromExpr(node, context) {
|
|
707
576
|
const result = this.transformGenericNode(node, context);
|
|
708
577
|
return { FromExpr: result };
|
|
709
578
|
}
|
|
710
|
-
TransactionStmt(node
|
|
711
|
-
TransactionStmt: any;
|
|
712
|
-
} {
|
|
579
|
+
TransactionStmt(node, context) {
|
|
713
580
|
const result = this.transformGenericNode(node, context);
|
|
714
581
|
return { TransactionStmt: result };
|
|
715
582
|
}
|
|
716
|
-
VariableSetStmt(node
|
|
717
|
-
VariableSetStmt: any;
|
|
718
|
-
} {
|
|
583
|
+
VariableSetStmt(node, context) {
|
|
719
584
|
const result = this.transformGenericNode(node, context);
|
|
720
585
|
return { VariableSetStmt: result };
|
|
721
586
|
}
|
|
722
|
-
VariableShowStmt(node
|
|
723
|
-
VariableShowStmt: any;
|
|
724
|
-
} {
|
|
587
|
+
VariableShowStmt(node, context) {
|
|
725
588
|
const result = this.transformGenericNode(node, context);
|
|
726
589
|
return { VariableShowStmt: result };
|
|
727
590
|
}
|
|
728
|
-
CreateSchemaStmt(node
|
|
729
|
-
CreateSchemaStmt: any;
|
|
730
|
-
} {
|
|
591
|
+
CreateSchemaStmt(node, context) {
|
|
731
592
|
const result = this.transformGenericNode(node, context);
|
|
732
593
|
return { CreateSchemaStmt: result };
|
|
733
594
|
}
|
|
734
|
-
RoleSpec(node
|
|
735
|
-
RoleSpec: any;
|
|
736
|
-
} {
|
|
595
|
+
RoleSpec(node, context) {
|
|
737
596
|
const result = this.transformGenericNode(node, context);
|
|
738
597
|
return { RoleSpec: result };
|
|
739
598
|
}
|
|
740
|
-
DropStmt(node
|
|
741
|
-
DropStmt: any;
|
|
742
|
-
} {
|
|
599
|
+
DropStmt(node, context) {
|
|
743
600
|
const result = this.transformGenericNode(node, context);
|
|
744
601
|
return { DropStmt: result };
|
|
745
602
|
}
|
|
746
|
-
TruncateStmt(node
|
|
747
|
-
TruncateStmt: any;
|
|
748
|
-
} {
|
|
603
|
+
TruncateStmt(node, context) {
|
|
749
604
|
const result = this.transformGenericNode(node, context);
|
|
750
605
|
return { TruncateStmt: result };
|
|
751
606
|
}
|
|
752
|
-
ReturnStmt(node
|
|
753
|
-
|
|
754
|
-
} {
|
|
755
|
-
const result: any = {};
|
|
607
|
+
ReturnStmt(node, context) {
|
|
608
|
+
const result = {};
|
|
756
609
|
if (node.returnval !== undefined) {
|
|
757
|
-
result.returnval = this.transform(node.returnval
|
|
610
|
+
result.returnval = this.transform(node.returnval, context);
|
|
758
611
|
}
|
|
759
612
|
return { ReturnStmt: result };
|
|
760
613
|
}
|
|
761
|
-
PLAssignStmt(node
|
|
762
|
-
PLAssignStmt: any;
|
|
763
|
-
} {
|
|
614
|
+
PLAssignStmt(node, context) {
|
|
764
615
|
const result = this.transformGenericNode(node, context);
|
|
765
616
|
return { PLAssignStmt: result };
|
|
766
617
|
}
|
|
767
|
-
CopyStmt(node
|
|
768
|
-
|
|
769
|
-
} {
|
|
770
|
-
const result: any = {};
|
|
618
|
+
CopyStmt(node, context) {
|
|
619
|
+
const result = {};
|
|
771
620
|
if (node.relation !== undefined) {
|
|
772
|
-
result.relation = this.transform(node.relation
|
|
621
|
+
result.relation = this.transform(node.relation, context);
|
|
773
622
|
}
|
|
774
623
|
if (node.query !== undefined) {
|
|
775
|
-
result.query = this.transform(node.query
|
|
624
|
+
result.query = this.transform(node.query, context);
|
|
776
625
|
}
|
|
777
626
|
if (node.attlist !== undefined) {
|
|
778
627
|
result.attlist = Array.isArray(node.attlist)
|
|
779
|
-
? node.attlist.map(item => this.transform(item
|
|
780
|
-
: this.transform(node.attlist
|
|
628
|
+
? node.attlist.map(item => this.transform(item, context))
|
|
629
|
+
: this.transform(node.attlist, context);
|
|
781
630
|
}
|
|
782
631
|
if (node.is_from !== undefined) {
|
|
783
632
|
result.is_from = node.is_from;
|
|
@@ -790,24 +639,20 @@ export class V14ToV15Transformer {
|
|
|
790
639
|
}
|
|
791
640
|
if (node.options !== undefined) {
|
|
792
641
|
result.options = Array.isArray(node.options)
|
|
793
|
-
? node.options.map(item => this.transform(item
|
|
794
|
-
: this.transform(node.options
|
|
642
|
+
? node.options.map(item => this.transform(item, context))
|
|
643
|
+
: this.transform(node.options, context);
|
|
795
644
|
}
|
|
796
645
|
if (node.whereClause !== undefined) {
|
|
797
|
-
result.whereClause = this.transform(node.whereClause
|
|
646
|
+
result.whereClause = this.transform(node.whereClause, context);
|
|
798
647
|
}
|
|
799
648
|
return { CopyStmt: result };
|
|
800
649
|
}
|
|
801
|
-
AlterTableStmt(node
|
|
802
|
-
AlterTableStmt: any;
|
|
803
|
-
} {
|
|
650
|
+
AlterTableStmt(node, context) {
|
|
804
651
|
const result = this.transformGenericNode(node, context);
|
|
805
652
|
return { AlterTableStmt: result };
|
|
806
653
|
}
|
|
807
|
-
AlterTableCmd(node
|
|
808
|
-
|
|
809
|
-
} {
|
|
810
|
-
const result: any = {};
|
|
654
|
+
AlterTableCmd(node, context) {
|
|
655
|
+
const result = {};
|
|
811
656
|
if (node.subtype !== undefined) {
|
|
812
657
|
result.subtype = node.subtype;
|
|
813
658
|
}
|
|
@@ -818,10 +663,10 @@ export class V14ToV15Transformer {
|
|
|
818
663
|
result.num = node.num;
|
|
819
664
|
}
|
|
820
665
|
if (node.newowner !== undefined) {
|
|
821
|
-
result.newowner = this.transform(node.newowner
|
|
666
|
+
result.newowner = this.transform(node.newowner, context);
|
|
822
667
|
}
|
|
823
668
|
if (node.def !== undefined) {
|
|
824
|
-
result.def = this.transform(node.def
|
|
669
|
+
result.def = this.transform(node.def, context);
|
|
825
670
|
}
|
|
826
671
|
if (node.behavior !== undefined) {
|
|
827
672
|
result.behavior = node.behavior;
|
|
@@ -831,46 +676,32 @@ export class V14ToV15Transformer {
|
|
|
831
676
|
}
|
|
832
677
|
return { AlterTableCmd: result };
|
|
833
678
|
}
|
|
834
|
-
CreateFunctionStmt(node
|
|
835
|
-
CreateFunctionStmt: any;
|
|
836
|
-
} {
|
|
679
|
+
CreateFunctionStmt(node, context) {
|
|
837
680
|
const result = this.transformGenericNode(node, context);
|
|
838
681
|
return { CreateFunctionStmt: result };
|
|
839
682
|
}
|
|
840
|
-
FunctionParameter(node
|
|
841
|
-
FunctionParameter: any;
|
|
842
|
-
} {
|
|
683
|
+
FunctionParameter(node, context) {
|
|
843
684
|
const result = this.transformGenericNode(node, context);
|
|
844
685
|
return { FunctionParameter: result };
|
|
845
686
|
}
|
|
846
|
-
CompositeTypeStmt(node
|
|
847
|
-
CompositeTypeStmt: any;
|
|
848
|
-
} {
|
|
687
|
+
CompositeTypeStmt(node, context) {
|
|
849
688
|
const result = this.transformGenericNode(node, context);
|
|
850
689
|
return { CompositeTypeStmt: result };
|
|
851
690
|
}
|
|
852
|
-
CreateEnumStmt(node
|
|
853
|
-
CreateEnumStmt: any;
|
|
854
|
-
} {
|
|
691
|
+
CreateEnumStmt(node, context) {
|
|
855
692
|
const result = this.transformGenericNode(node, context);
|
|
856
693
|
return { CreateEnumStmt: result };
|
|
857
694
|
}
|
|
858
|
-
CreateDomainStmt(node
|
|
859
|
-
CreateDomainStmt: any;
|
|
860
|
-
} {
|
|
695
|
+
CreateDomainStmt(node, context) {
|
|
861
696
|
const result = this.transformGenericNode(node, context);
|
|
862
697
|
return { CreateDomainStmt: result };
|
|
863
698
|
}
|
|
864
|
-
CreateRoleStmt(node
|
|
865
|
-
CreateRoleStmt: any;
|
|
866
|
-
} {
|
|
699
|
+
CreateRoleStmt(node, context) {
|
|
867
700
|
const result = this.transformGenericNode(node, context);
|
|
868
701
|
return { CreateRoleStmt: result };
|
|
869
702
|
}
|
|
870
|
-
DefElem(node
|
|
871
|
-
|
|
872
|
-
} {
|
|
873
|
-
const result: any = {};
|
|
703
|
+
DefElem(node, context) {
|
|
704
|
+
const result = {};
|
|
874
705
|
if (node.defnamespace !== undefined) {
|
|
875
706
|
result.defnamespace = node.defnamespace;
|
|
876
707
|
}
|
|
@@ -883,7 +714,7 @@ export class V14ToV15Transformer {
|
|
|
883
714
|
defElemName: node.defname,
|
|
884
715
|
parentNodeTypes: [...(context.parentNodeTypes || []), 'DefElem']
|
|
885
716
|
};
|
|
886
|
-
result.arg = this.transform(node.arg
|
|
717
|
+
result.arg = this.transform(node.arg, argContext);
|
|
887
718
|
}
|
|
888
719
|
if (node.defaction !== undefined) {
|
|
889
720
|
result.defaction = node.defaction;
|
|
@@ -893,532 +724,356 @@ export class V14ToV15Transformer {
|
|
|
893
724
|
}
|
|
894
725
|
return { DefElem: result };
|
|
895
726
|
}
|
|
896
|
-
CreateTableSpaceStmt(node
|
|
897
|
-
CreateTableSpaceStmt: any;
|
|
898
|
-
} {
|
|
727
|
+
CreateTableSpaceStmt(node, context) {
|
|
899
728
|
const result = this.transformGenericNode(node, context);
|
|
900
729
|
return { CreateTableSpaceStmt: result };
|
|
901
730
|
}
|
|
902
|
-
DropTableSpaceStmt(node
|
|
903
|
-
DropTableSpaceStmt: any;
|
|
904
|
-
} {
|
|
731
|
+
DropTableSpaceStmt(node, context) {
|
|
905
732
|
const result = this.transformGenericNode(node, context);
|
|
906
733
|
return { DropTableSpaceStmt: result };
|
|
907
734
|
}
|
|
908
|
-
AlterTableSpaceOptionsStmt(node
|
|
909
|
-
AlterTableSpaceOptionsStmt: any;
|
|
910
|
-
} {
|
|
735
|
+
AlterTableSpaceOptionsStmt(node, context) {
|
|
911
736
|
const result = this.transformGenericNode(node, context);
|
|
912
737
|
return { AlterTableSpaceOptionsStmt: result };
|
|
913
738
|
}
|
|
914
|
-
CreateExtensionStmt(node
|
|
915
|
-
CreateExtensionStmt: any;
|
|
916
|
-
} {
|
|
739
|
+
CreateExtensionStmt(node, context) {
|
|
917
740
|
const result = this.transformGenericNode(node, context);
|
|
918
741
|
return { CreateExtensionStmt: result };
|
|
919
742
|
}
|
|
920
|
-
AlterExtensionStmt(node
|
|
921
|
-
AlterExtensionStmt: any;
|
|
922
|
-
} {
|
|
743
|
+
AlterExtensionStmt(node, context) {
|
|
923
744
|
const result = this.transformGenericNode(node, context);
|
|
924
745
|
return { AlterExtensionStmt: result };
|
|
925
746
|
}
|
|
926
|
-
CreateFdwStmt(node
|
|
927
|
-
CreateFdwStmt: any;
|
|
928
|
-
} {
|
|
747
|
+
CreateFdwStmt(node, context) {
|
|
929
748
|
const result = this.transformGenericNode(node, context);
|
|
930
749
|
return { CreateFdwStmt: result };
|
|
931
750
|
}
|
|
932
|
-
SetOperationStmt(node
|
|
933
|
-
SetOperationStmt: any;
|
|
934
|
-
} {
|
|
751
|
+
SetOperationStmt(node, context) {
|
|
935
752
|
const result = this.transformGenericNode(node, context);
|
|
936
753
|
return { SetOperationStmt: result };
|
|
937
754
|
}
|
|
938
|
-
ReplicaIdentityStmt(node
|
|
939
|
-
ReplicaIdentityStmt: any;
|
|
940
|
-
} {
|
|
755
|
+
ReplicaIdentityStmt(node, context) {
|
|
941
756
|
const result = this.transformGenericNode(node, context);
|
|
942
757
|
return { ReplicaIdentityStmt: result };
|
|
943
758
|
}
|
|
944
|
-
AlterCollationStmt(node
|
|
945
|
-
AlterCollationStmt: any;
|
|
946
|
-
} {
|
|
759
|
+
AlterCollationStmt(node, context) {
|
|
947
760
|
const result = this.transformGenericNode(node, context);
|
|
948
761
|
return { AlterCollationStmt: result };
|
|
949
762
|
}
|
|
950
|
-
AlterDomainStmt(node
|
|
951
|
-
AlterDomainStmt: any;
|
|
952
|
-
} {
|
|
763
|
+
AlterDomainStmt(node, context) {
|
|
953
764
|
const result = this.transformGenericNode(node, context);
|
|
954
765
|
return { AlterDomainStmt: result };
|
|
955
766
|
}
|
|
956
|
-
PrepareStmt(node
|
|
957
|
-
PrepareStmt: any;
|
|
958
|
-
} {
|
|
767
|
+
PrepareStmt(node, context) {
|
|
959
768
|
const result = this.transformGenericNode(node, context);
|
|
960
769
|
return { PrepareStmt: result };
|
|
961
770
|
}
|
|
962
|
-
ExecuteStmt(node
|
|
963
|
-
ExecuteStmt: any;
|
|
964
|
-
} {
|
|
771
|
+
ExecuteStmt(node, context) {
|
|
965
772
|
const result = this.transformGenericNode(node, context);
|
|
966
773
|
return { ExecuteStmt: result };
|
|
967
774
|
}
|
|
968
|
-
DeallocateStmt(node
|
|
969
|
-
DeallocateStmt: any;
|
|
970
|
-
} {
|
|
775
|
+
DeallocateStmt(node, context) {
|
|
971
776
|
const result = this.transformGenericNode(node, context);
|
|
972
777
|
return { DeallocateStmt: result };
|
|
973
778
|
}
|
|
974
|
-
NotifyStmt(node
|
|
975
|
-
NotifyStmt: any;
|
|
976
|
-
} {
|
|
779
|
+
NotifyStmt(node, context) {
|
|
977
780
|
const result = this.transformGenericNode(node, context);
|
|
978
781
|
return { NotifyStmt: result };
|
|
979
782
|
}
|
|
980
|
-
ListenStmt(node
|
|
981
|
-
ListenStmt: any;
|
|
982
|
-
} {
|
|
783
|
+
ListenStmt(node, context) {
|
|
983
784
|
const result = this.transformGenericNode(node, context);
|
|
984
785
|
return { ListenStmt: result };
|
|
985
786
|
}
|
|
986
|
-
UnlistenStmt(node
|
|
987
|
-
UnlistenStmt: any;
|
|
988
|
-
} {
|
|
787
|
+
UnlistenStmt(node, context) {
|
|
989
788
|
const result = this.transformGenericNode(node, context);
|
|
990
789
|
return { UnlistenStmt: result };
|
|
991
790
|
}
|
|
992
|
-
CheckPointStmt(node
|
|
993
|
-
CheckPointStmt: any;
|
|
994
|
-
} {
|
|
791
|
+
CheckPointStmt(node, context) {
|
|
995
792
|
const result = this.transformGenericNode(node, context);
|
|
996
793
|
return { CheckPointStmt: result };
|
|
997
794
|
}
|
|
998
|
-
LoadStmt(node
|
|
999
|
-
LoadStmt: any;
|
|
1000
|
-
} {
|
|
795
|
+
LoadStmt(node, context) {
|
|
1001
796
|
const result = this.transformGenericNode(node, context);
|
|
1002
797
|
return { LoadStmt: result };
|
|
1003
798
|
}
|
|
1004
|
-
DiscardStmt(node
|
|
1005
|
-
DiscardStmt: any;
|
|
1006
|
-
} {
|
|
799
|
+
DiscardStmt(node, context) {
|
|
1007
800
|
const result = this.transformGenericNode(node, context);
|
|
1008
801
|
return { DiscardStmt: result };
|
|
1009
802
|
}
|
|
1010
|
-
CommentStmt(node
|
|
1011
|
-
CommentStmt: any;
|
|
1012
|
-
} {
|
|
803
|
+
CommentStmt(node, context) {
|
|
1013
804
|
const result = this.transformGenericNode(node, context);
|
|
1014
805
|
return { CommentStmt: result };
|
|
1015
806
|
}
|
|
1016
|
-
LockStmt(node
|
|
1017
|
-
LockStmt: any;
|
|
1018
|
-
} {
|
|
807
|
+
LockStmt(node, context) {
|
|
1019
808
|
const result = this.transformGenericNode(node, context);
|
|
1020
809
|
return { LockStmt: result };
|
|
1021
810
|
}
|
|
1022
|
-
CreatePolicyStmt(node
|
|
1023
|
-
CreatePolicyStmt: any;
|
|
1024
|
-
} {
|
|
811
|
+
CreatePolicyStmt(node, context) {
|
|
1025
812
|
const result = this.transformGenericNode(node, context);
|
|
1026
813
|
return { CreatePolicyStmt: result };
|
|
1027
814
|
}
|
|
1028
|
-
AlterPolicyStmt(node
|
|
1029
|
-
AlterPolicyStmt: any;
|
|
1030
|
-
} {
|
|
815
|
+
AlterPolicyStmt(node, context) {
|
|
1031
816
|
const result = this.transformGenericNode(node, context);
|
|
1032
817
|
return { AlterPolicyStmt: result };
|
|
1033
818
|
}
|
|
1034
|
-
CreateUserMappingStmt(node
|
|
1035
|
-
CreateUserMappingStmt: any;
|
|
1036
|
-
} {
|
|
819
|
+
CreateUserMappingStmt(node, context) {
|
|
1037
820
|
const result = this.transformGenericNode(node, context);
|
|
1038
821
|
return { CreateUserMappingStmt: result };
|
|
1039
822
|
}
|
|
1040
|
-
CreateStatsStmt(node
|
|
1041
|
-
CreateStatsStmt: any;
|
|
1042
|
-
} {
|
|
823
|
+
CreateStatsStmt(node, context) {
|
|
1043
824
|
const result = this.transformGenericNode(node, context);
|
|
1044
825
|
return { CreateStatsStmt: result };
|
|
1045
826
|
}
|
|
1046
|
-
StatsElem(node
|
|
1047
|
-
StatsElem: any;
|
|
1048
|
-
} {
|
|
827
|
+
StatsElem(node, context) {
|
|
1049
828
|
const result = this.transformGenericNode(node, context);
|
|
1050
829
|
return { StatsElem: result };
|
|
1051
830
|
}
|
|
1052
|
-
CreatePublicationStmt(node
|
|
1053
|
-
CreatePublicationStmt: any;
|
|
1054
|
-
} {
|
|
831
|
+
CreatePublicationStmt(node, context) {
|
|
1055
832
|
const result = this.transformGenericNode(node, context);
|
|
1056
833
|
return { CreatePublicationStmt: result };
|
|
1057
834
|
}
|
|
1058
|
-
CreateSubscriptionStmt(node
|
|
1059
|
-
CreateSubscriptionStmt: any;
|
|
1060
|
-
} {
|
|
835
|
+
CreateSubscriptionStmt(node, context) {
|
|
1061
836
|
const result = this.transformGenericNode(node, context);
|
|
1062
837
|
return { CreateSubscriptionStmt: result };
|
|
1063
838
|
}
|
|
1064
|
-
AlterPublicationStmt(node
|
|
1065
|
-
AlterPublicationStmt: any;
|
|
1066
|
-
} {
|
|
839
|
+
AlterPublicationStmt(node, context) {
|
|
1067
840
|
const result = this.transformGenericNode(node, context);
|
|
1068
841
|
return { AlterPublicationStmt: result };
|
|
1069
842
|
}
|
|
1070
|
-
AlterSubscriptionStmt(node
|
|
1071
|
-
AlterSubscriptionStmt: any;
|
|
1072
|
-
} {
|
|
843
|
+
AlterSubscriptionStmt(node, context) {
|
|
1073
844
|
const result = this.transformGenericNode(node, context);
|
|
1074
845
|
return { AlterSubscriptionStmt: result };
|
|
1075
846
|
}
|
|
1076
|
-
DropSubscriptionStmt(node
|
|
1077
|
-
DropSubscriptionStmt: any;
|
|
1078
|
-
} {
|
|
847
|
+
DropSubscriptionStmt(node, context) {
|
|
1079
848
|
const result = this.transformGenericNode(node, context);
|
|
1080
849
|
return { DropSubscriptionStmt: result };
|
|
1081
850
|
}
|
|
1082
|
-
DoStmt(node
|
|
1083
|
-
DoStmt: any;
|
|
1084
|
-
} {
|
|
851
|
+
DoStmt(node, context) {
|
|
1085
852
|
const result = this.transformGenericNode(node, context);
|
|
1086
853
|
return { DoStmt: result };
|
|
1087
854
|
}
|
|
1088
|
-
InlineCodeBlock(node
|
|
1089
|
-
InlineCodeBlock: any;
|
|
1090
|
-
} {
|
|
855
|
+
InlineCodeBlock(node, context) {
|
|
1091
856
|
const result = this.transformGenericNode(node, context);
|
|
1092
857
|
return { InlineCodeBlock: result };
|
|
1093
858
|
}
|
|
1094
|
-
CallContext(node
|
|
1095
|
-
CallContext: any;
|
|
1096
|
-
} {
|
|
859
|
+
CallContext(node, context) {
|
|
1097
860
|
const result = this.transformGenericNode(node, context);
|
|
1098
861
|
return { CallContext: result };
|
|
1099
862
|
}
|
|
1100
|
-
ConstraintsSetStmt(node
|
|
1101
|
-
ConstraintsSetStmt: any;
|
|
1102
|
-
} {
|
|
863
|
+
ConstraintsSetStmt(node, context) {
|
|
1103
864
|
const result = this.transformGenericNode(node, context);
|
|
1104
865
|
return { ConstraintsSetStmt: result };
|
|
1105
866
|
}
|
|
1106
|
-
AlterSystemStmt(node
|
|
1107
|
-
AlterSystemStmt: any;
|
|
1108
|
-
} {
|
|
867
|
+
AlterSystemStmt(node, context) {
|
|
1109
868
|
const result = this.transformGenericNode(node, context);
|
|
1110
869
|
return { AlterSystemStmt: result };
|
|
1111
870
|
}
|
|
1112
|
-
VacuumRelation(node
|
|
1113
|
-
VacuumRelation: any;
|
|
1114
|
-
} {
|
|
871
|
+
VacuumRelation(node, context) {
|
|
1115
872
|
const result = this.transformGenericNode(node, context);
|
|
1116
873
|
return { VacuumRelation: result };
|
|
1117
874
|
}
|
|
1118
|
-
DropOwnedStmt(node
|
|
1119
|
-
DropOwnedStmt: any;
|
|
1120
|
-
} {
|
|
875
|
+
DropOwnedStmt(node, context) {
|
|
1121
876
|
const result = this.transformGenericNode(node, context);
|
|
1122
877
|
return { DropOwnedStmt: result };
|
|
1123
878
|
}
|
|
1124
|
-
ReassignOwnedStmt(node
|
|
1125
|
-
ReassignOwnedStmt: any;
|
|
1126
|
-
} {
|
|
879
|
+
ReassignOwnedStmt(node, context) {
|
|
1127
880
|
const result = this.transformGenericNode(node, context);
|
|
1128
881
|
return { ReassignOwnedStmt: result };
|
|
1129
882
|
}
|
|
1130
|
-
AlterTSDictionaryStmt(node
|
|
1131
|
-
AlterTSDictionaryStmt: any;
|
|
1132
|
-
} {
|
|
883
|
+
AlterTSDictionaryStmt(node, context) {
|
|
1133
884
|
const result = this.transformGenericNode(node, context);
|
|
1134
885
|
return { AlterTSDictionaryStmt: result };
|
|
1135
886
|
}
|
|
1136
|
-
AlterTSConfigurationStmt(node
|
|
1137
|
-
AlterTSConfigurationStmt: any;
|
|
1138
|
-
} {
|
|
887
|
+
AlterTSConfigurationStmt(node, context) {
|
|
1139
888
|
const result = this.transformGenericNode(node, context);
|
|
1140
889
|
return { AlterTSConfigurationStmt: result };
|
|
1141
890
|
}
|
|
1142
|
-
ClosePortalStmt(node
|
|
1143
|
-
ClosePortalStmt: any;
|
|
1144
|
-
} {
|
|
891
|
+
ClosePortalStmt(node, context) {
|
|
1145
892
|
const result = this.transformGenericNode(node, context);
|
|
1146
893
|
return { ClosePortalStmt: result };
|
|
1147
894
|
}
|
|
1148
|
-
FetchStmt(node
|
|
1149
|
-
FetchStmt: any;
|
|
1150
|
-
} {
|
|
895
|
+
FetchStmt(node, context) {
|
|
1151
896
|
const result = this.transformGenericNode(node, context);
|
|
1152
897
|
return { FetchStmt: result };
|
|
1153
898
|
}
|
|
1154
|
-
AlterStatsStmt(node
|
|
1155
|
-
AlterStatsStmt: any;
|
|
1156
|
-
} {
|
|
899
|
+
AlterStatsStmt(node, context) {
|
|
1157
900
|
const result = this.transformGenericNode(node, context);
|
|
1158
901
|
return { AlterStatsStmt: result };
|
|
1159
902
|
}
|
|
1160
|
-
ObjectWithArgs(node
|
|
1161
|
-
ObjectWithArgs: any;
|
|
1162
|
-
} {
|
|
903
|
+
ObjectWithArgs(node, context) {
|
|
1163
904
|
const result = this.transformGenericNode(node, context);
|
|
1164
905
|
return { ObjectWithArgs: result };
|
|
1165
906
|
}
|
|
1166
|
-
AlterOperatorStmt(node
|
|
1167
|
-
AlterOperatorStmt: any;
|
|
1168
|
-
} {
|
|
907
|
+
AlterOperatorStmt(node, context) {
|
|
1169
908
|
const result = this.transformGenericNode(node, context);
|
|
1170
909
|
return { AlterOperatorStmt: result };
|
|
1171
910
|
}
|
|
1172
|
-
AlterFdwStmt(node
|
|
1173
|
-
AlterFdwStmt: any;
|
|
1174
|
-
} {
|
|
911
|
+
AlterFdwStmt(node, context) {
|
|
1175
912
|
const result = this.transformGenericNode(node, context);
|
|
1176
913
|
return { AlterFdwStmt: result };
|
|
1177
914
|
}
|
|
1178
|
-
CreateForeignServerStmt(node
|
|
1179
|
-
CreateForeignServerStmt: any;
|
|
1180
|
-
} {
|
|
915
|
+
CreateForeignServerStmt(node, context) {
|
|
1181
916
|
const result = this.transformGenericNode(node, context);
|
|
1182
917
|
return { CreateForeignServerStmt: result };
|
|
1183
918
|
}
|
|
1184
|
-
AlterForeignServerStmt(node
|
|
1185
|
-
AlterForeignServerStmt: any;
|
|
1186
|
-
} {
|
|
919
|
+
AlterForeignServerStmt(node, context) {
|
|
1187
920
|
const result = this.transformGenericNode(node, context);
|
|
1188
921
|
return { AlterForeignServerStmt: result };
|
|
1189
922
|
}
|
|
1190
|
-
AlterUserMappingStmt(node
|
|
1191
|
-
AlterUserMappingStmt: any;
|
|
1192
|
-
} {
|
|
923
|
+
AlterUserMappingStmt(node, context) {
|
|
1193
924
|
const result = this.transformGenericNode(node, context);
|
|
1194
925
|
return { AlterUserMappingStmt: result };
|
|
1195
926
|
}
|
|
1196
|
-
DropUserMappingStmt(node
|
|
1197
|
-
DropUserMappingStmt: any;
|
|
1198
|
-
} {
|
|
927
|
+
DropUserMappingStmt(node, context) {
|
|
1199
928
|
const result = this.transformGenericNode(node, context);
|
|
1200
929
|
return { DropUserMappingStmt: result };
|
|
1201
930
|
}
|
|
1202
|
-
ImportForeignSchemaStmt(node
|
|
1203
|
-
ImportForeignSchemaStmt: any;
|
|
1204
|
-
} {
|
|
931
|
+
ImportForeignSchemaStmt(node, context) {
|
|
1205
932
|
const result = this.transformGenericNode(node, context);
|
|
1206
933
|
return { ImportForeignSchemaStmt: result };
|
|
1207
934
|
}
|
|
1208
|
-
ClusterStmt(node
|
|
1209
|
-
ClusterStmt: any;
|
|
1210
|
-
} {
|
|
935
|
+
ClusterStmt(node, context) {
|
|
1211
936
|
const result = this.transformGenericNode(node, context);
|
|
1212
937
|
return { ClusterStmt: result };
|
|
1213
938
|
}
|
|
1214
|
-
VacuumStmt(node
|
|
1215
|
-
VacuumStmt: any;
|
|
1216
|
-
} {
|
|
939
|
+
VacuumStmt(node, context) {
|
|
1217
940
|
const result = this.transformGenericNode(node, context);
|
|
1218
941
|
return { VacuumStmt: result };
|
|
1219
942
|
}
|
|
1220
|
-
ExplainStmt(node
|
|
1221
|
-
ExplainStmt: any;
|
|
1222
|
-
} {
|
|
943
|
+
ExplainStmt(node, context) {
|
|
1223
944
|
const result = this.transformGenericNode(node, context);
|
|
1224
945
|
return { ExplainStmt: result };
|
|
1225
946
|
}
|
|
1226
|
-
ReindexStmt(node
|
|
1227
|
-
ReindexStmt: any;
|
|
1228
|
-
} {
|
|
947
|
+
ReindexStmt(node, context) {
|
|
1229
948
|
const result = this.transformGenericNode(node, context);
|
|
1230
949
|
return { ReindexStmt: result };
|
|
1231
950
|
}
|
|
1232
|
-
CallStmt(node
|
|
1233
|
-
CallStmt: any;
|
|
1234
|
-
} {
|
|
951
|
+
CallStmt(node, context) {
|
|
1235
952
|
const result = this.transformGenericNode(node, context);
|
|
1236
953
|
return { CallStmt: result };
|
|
1237
954
|
}
|
|
1238
|
-
CreatedbStmt(node
|
|
1239
|
-
CreatedbStmt: any;
|
|
1240
|
-
} {
|
|
955
|
+
CreatedbStmt(node, context) {
|
|
1241
956
|
const result = this.transformGenericNode(node, context);
|
|
1242
957
|
return { CreatedbStmt: result };
|
|
1243
958
|
}
|
|
1244
|
-
DropdbStmt(node
|
|
1245
|
-
DropdbStmt: any;
|
|
1246
|
-
} {
|
|
959
|
+
DropdbStmt(node, context) {
|
|
1247
960
|
const result = this.transformGenericNode(node, context);
|
|
1248
961
|
return { DropdbStmt: result };
|
|
1249
962
|
}
|
|
1250
|
-
RenameStmt(node
|
|
1251
|
-
RenameStmt: any;
|
|
1252
|
-
} {
|
|
963
|
+
RenameStmt(node, context) {
|
|
1253
964
|
const result = this.transformGenericNode(node, context);
|
|
1254
965
|
return { RenameStmt: result };
|
|
1255
966
|
}
|
|
1256
|
-
AlterOwnerStmt(node
|
|
1257
|
-
AlterOwnerStmt: any;
|
|
1258
|
-
} {
|
|
967
|
+
AlterOwnerStmt(node, context) {
|
|
1259
968
|
const result = this.transformGenericNode(node, context);
|
|
1260
969
|
return { AlterOwnerStmt: result };
|
|
1261
970
|
}
|
|
1262
|
-
GrantStmt(node
|
|
1263
|
-
GrantStmt: any;
|
|
1264
|
-
} {
|
|
971
|
+
GrantStmt(node, context) {
|
|
1265
972
|
const result = this.transformGenericNode(node, context);
|
|
1266
973
|
return { GrantStmt: result };
|
|
1267
974
|
}
|
|
1268
|
-
GrantRoleStmt(node
|
|
1269
|
-
GrantRoleStmt: any;
|
|
1270
|
-
} {
|
|
975
|
+
GrantRoleStmt(node, context) {
|
|
1271
976
|
const result = this.transformGenericNode(node, context);
|
|
1272
977
|
return { GrantRoleStmt: result };
|
|
1273
978
|
}
|
|
1274
|
-
SecLabelStmt(node
|
|
1275
|
-
SecLabelStmt: any;
|
|
1276
|
-
} {
|
|
979
|
+
SecLabelStmt(node, context) {
|
|
1277
980
|
const result = this.transformGenericNode(node, context);
|
|
1278
981
|
return { SecLabelStmt: result };
|
|
1279
982
|
}
|
|
1280
|
-
AlterDefaultPrivilegesStmt(node
|
|
1281
|
-
AlterDefaultPrivilegesStmt: any;
|
|
1282
|
-
} {
|
|
983
|
+
AlterDefaultPrivilegesStmt(node, context) {
|
|
1283
984
|
const result = this.transformGenericNode(node, context);
|
|
1284
985
|
return { AlterDefaultPrivilegesStmt: result };
|
|
1285
986
|
}
|
|
1286
|
-
CreateConversionStmt(node
|
|
1287
|
-
CreateConversionStmt: any;
|
|
1288
|
-
} {
|
|
987
|
+
CreateConversionStmt(node, context) {
|
|
1289
988
|
const result = this.transformGenericNode(node, context);
|
|
1290
989
|
return { CreateConversionStmt: result };
|
|
1291
990
|
}
|
|
1292
|
-
CreateCastStmt(node
|
|
1293
|
-
CreateCastStmt: any;
|
|
1294
|
-
} {
|
|
991
|
+
CreateCastStmt(node, context) {
|
|
1295
992
|
const result = this.transformGenericNode(node, context);
|
|
1296
993
|
return { CreateCastStmt: result };
|
|
1297
994
|
}
|
|
1298
|
-
CreatePLangStmt(node
|
|
1299
|
-
CreatePLangStmt: any;
|
|
1300
|
-
} {
|
|
995
|
+
CreatePLangStmt(node, context) {
|
|
1301
996
|
const result = this.transformGenericNode(node, context);
|
|
1302
997
|
return { CreatePLangStmt: result };
|
|
1303
998
|
}
|
|
1304
|
-
CreateTransformStmt(node
|
|
1305
|
-
CreateTransformStmt: any;
|
|
1306
|
-
} {
|
|
999
|
+
CreateTransformStmt(node, context) {
|
|
1307
1000
|
const result = this.transformGenericNode(node, context);
|
|
1308
1001
|
return { CreateTransformStmt: result };
|
|
1309
1002
|
}
|
|
1310
|
-
CreateTrigStmt(node
|
|
1311
|
-
CreateTrigStmt: any;
|
|
1312
|
-
} {
|
|
1003
|
+
CreateTrigStmt(node, context) {
|
|
1313
1004
|
const result = this.transformGenericNode(node, context);
|
|
1314
1005
|
return { CreateTrigStmt: result };
|
|
1315
1006
|
}
|
|
1316
|
-
TriggerTransition(node
|
|
1317
|
-
TriggerTransition: any;
|
|
1318
|
-
} {
|
|
1007
|
+
TriggerTransition(node, context) {
|
|
1319
1008
|
const result = this.transformGenericNode(node, context);
|
|
1320
1009
|
return { TriggerTransition: result };
|
|
1321
1010
|
}
|
|
1322
|
-
CreateEventTrigStmt(node
|
|
1323
|
-
CreateEventTrigStmt: any;
|
|
1324
|
-
} {
|
|
1011
|
+
CreateEventTrigStmt(node, context) {
|
|
1325
1012
|
const result = this.transformGenericNode(node, context);
|
|
1326
1013
|
return { CreateEventTrigStmt: result };
|
|
1327
1014
|
}
|
|
1328
|
-
AlterEventTrigStmt(node
|
|
1329
|
-
AlterEventTrigStmt: any;
|
|
1330
|
-
} {
|
|
1015
|
+
AlterEventTrigStmt(node, context) {
|
|
1331
1016
|
const result = this.transformGenericNode(node, context);
|
|
1332
1017
|
return { AlterEventTrigStmt: result };
|
|
1333
1018
|
}
|
|
1334
|
-
CreateOpClassStmt(node
|
|
1335
|
-
CreateOpClassStmt: any;
|
|
1336
|
-
} {
|
|
1019
|
+
CreateOpClassStmt(node, context) {
|
|
1337
1020
|
const result = this.transformGenericNode(node, context);
|
|
1338
1021
|
return { CreateOpClassStmt: result };
|
|
1339
1022
|
}
|
|
1340
|
-
CreateOpFamilyStmt(node
|
|
1341
|
-
CreateOpFamilyStmt: any;
|
|
1342
|
-
} {
|
|
1023
|
+
CreateOpFamilyStmt(node, context) {
|
|
1343
1024
|
const result = this.transformGenericNode(node, context);
|
|
1344
1025
|
return { CreateOpFamilyStmt: result };
|
|
1345
1026
|
}
|
|
1346
|
-
AlterOpFamilyStmt(node
|
|
1347
|
-
AlterOpFamilyStmt: any;
|
|
1348
|
-
} {
|
|
1027
|
+
AlterOpFamilyStmt(node, context) {
|
|
1349
1028
|
const result = this.transformGenericNode(node, context);
|
|
1350
1029
|
return { AlterOpFamilyStmt: result };
|
|
1351
1030
|
}
|
|
1352
|
-
AlterTableMoveAllStmt(node
|
|
1353
|
-
AlterTableMoveAllStmt: any;
|
|
1354
|
-
} {
|
|
1031
|
+
AlterTableMoveAllStmt(node, context) {
|
|
1355
1032
|
const result = this.transformGenericNode(node, context);
|
|
1356
1033
|
return { AlterTableMoveAllStmt: result };
|
|
1357
1034
|
}
|
|
1358
|
-
CreateSeqStmt(node
|
|
1359
|
-
CreateSeqStmt: any;
|
|
1360
|
-
} {
|
|
1035
|
+
CreateSeqStmt(node, context) {
|
|
1361
1036
|
const result = this.transformGenericNode(node, context);
|
|
1362
1037
|
return { CreateSeqStmt: result };
|
|
1363
1038
|
}
|
|
1364
|
-
AlterSeqStmt(node
|
|
1365
|
-
AlterSeqStmt: any;
|
|
1366
|
-
} {
|
|
1039
|
+
AlterSeqStmt(node, context) {
|
|
1367
1040
|
const result = this.transformGenericNode(node, context);
|
|
1368
1041
|
return { AlterSeqStmt: result };
|
|
1369
1042
|
}
|
|
1370
|
-
CreateRangeStmt(node
|
|
1371
|
-
CreateRangeStmt: any;
|
|
1372
|
-
} {
|
|
1043
|
+
CreateRangeStmt(node, context) {
|
|
1373
1044
|
const result = this.transformGenericNode(node, context);
|
|
1374
1045
|
return { CreateRangeStmt: result };
|
|
1375
1046
|
}
|
|
1376
|
-
AlterEnumStmt(node
|
|
1377
|
-
AlterEnumStmt: any;
|
|
1378
|
-
} {
|
|
1047
|
+
AlterEnumStmt(node, context) {
|
|
1379
1048
|
const result = this.transformGenericNode(node, context);
|
|
1380
1049
|
return { AlterEnumStmt: result };
|
|
1381
1050
|
}
|
|
1382
|
-
AlterTypeStmt(node
|
|
1383
|
-
AlterTypeStmt: any;
|
|
1384
|
-
} {
|
|
1051
|
+
AlterTypeStmt(node, context) {
|
|
1385
1052
|
const result = this.transformGenericNode(node, context);
|
|
1386
1053
|
return { AlterTypeStmt: result };
|
|
1387
1054
|
}
|
|
1388
|
-
AlterRoleStmt(node
|
|
1389
|
-
AlterRoleStmt: any;
|
|
1390
|
-
} {
|
|
1055
|
+
AlterRoleStmt(node, context) {
|
|
1391
1056
|
const result = this.transformGenericNode(node, context);
|
|
1392
1057
|
return { AlterRoleStmt: result };
|
|
1393
1058
|
}
|
|
1394
|
-
DropRoleStmt(node
|
|
1395
|
-
DropRoleStmt: any;
|
|
1396
|
-
} {
|
|
1059
|
+
DropRoleStmt(node, context) {
|
|
1397
1060
|
const result = this.transformGenericNode(node, context);
|
|
1398
1061
|
return { DropRoleStmt: result };
|
|
1399
1062
|
}
|
|
1400
|
-
CreateTableAsStmt(node
|
|
1401
|
-
CreateTableAsStmt: any;
|
|
1402
|
-
} {
|
|
1063
|
+
CreateTableAsStmt(node, context) {
|
|
1403
1064
|
const result = this.transformGenericNode(node, context);
|
|
1404
1065
|
return { CreateTableAsStmt: result };
|
|
1405
1066
|
}
|
|
1406
|
-
RefreshMatViewStmt(node
|
|
1407
|
-
RefreshMatViewStmt: any;
|
|
1408
|
-
} {
|
|
1067
|
+
RefreshMatViewStmt(node, context) {
|
|
1409
1068
|
const result = this.transformGenericNode(node, context);
|
|
1410
1069
|
return { RefreshMatViewStmt: result };
|
|
1411
1070
|
}
|
|
1412
|
-
AccessPriv(node
|
|
1413
|
-
AccessPriv: any;
|
|
1414
|
-
} {
|
|
1071
|
+
AccessPriv(node, context) {
|
|
1415
1072
|
const result = this.transformGenericNode(node, context);
|
|
1416
1073
|
return { AccessPriv: result };
|
|
1417
1074
|
}
|
|
1418
|
-
DefineStmt(node
|
|
1419
|
-
|
|
1420
|
-
} {
|
|
1421
|
-
const result: any = {};
|
|
1075
|
+
DefineStmt(node, context) {
|
|
1076
|
+
const result = {};
|
|
1422
1077
|
if (node.kind !== undefined) {
|
|
1423
1078
|
result.kind = node.kind;
|
|
1424
1079
|
}
|
|
@@ -1427,18 +1082,18 @@ export class V14ToV15Transformer {
|
|
|
1427
1082
|
}
|
|
1428
1083
|
if (node.defnames !== undefined) {
|
|
1429
1084
|
result.defnames = Array.isArray(node.defnames)
|
|
1430
|
-
? node.defnames.map(item => this.transform(item
|
|
1431
|
-
: this.transform(node.defnames
|
|
1085
|
+
? node.defnames.map(item => this.transform(item, context))
|
|
1086
|
+
: this.transform(node.defnames, context);
|
|
1432
1087
|
}
|
|
1433
1088
|
if (node.args !== undefined) {
|
|
1434
1089
|
result.args = Array.isArray(node.args)
|
|
1435
|
-
? node.args.map(item => this.transform(item
|
|
1436
|
-
: this.transform(node.args
|
|
1090
|
+
? node.args.map(item => this.transform(item, context))
|
|
1091
|
+
: this.transform(node.args, context);
|
|
1437
1092
|
}
|
|
1438
1093
|
if (node.definition !== undefined) {
|
|
1439
1094
|
result.definition = Array.isArray(node.definition)
|
|
1440
|
-
? node.definition.map(item => this.transform(item
|
|
1441
|
-
: this.transform(node.definition
|
|
1095
|
+
? node.definition.map(item => this.transform(item, context))
|
|
1096
|
+
: this.transform(node.definition, context);
|
|
1442
1097
|
}
|
|
1443
1098
|
if (node.if_not_exists !== undefined) {
|
|
1444
1099
|
result.if_not_exists = node.if_not_exists;
|
|
@@ -1448,176 +1103,120 @@ export class V14ToV15Transformer {
|
|
|
1448
1103
|
}
|
|
1449
1104
|
return { DefineStmt: result };
|
|
1450
1105
|
}
|
|
1451
|
-
AlterDatabaseStmt(node
|
|
1452
|
-
AlterDatabaseStmt: any;
|
|
1453
|
-
} {
|
|
1106
|
+
AlterDatabaseStmt(node, context) {
|
|
1454
1107
|
const result = this.transformGenericNode(node, context);
|
|
1455
1108
|
return { AlterDatabaseStmt: result };
|
|
1456
1109
|
}
|
|
1457
|
-
AlterDatabaseSetStmt(node
|
|
1458
|
-
AlterDatabaseSetStmt: any;
|
|
1459
|
-
} {
|
|
1110
|
+
AlterDatabaseSetStmt(node, context) {
|
|
1460
1111
|
const result = this.transformGenericNode(node, context);
|
|
1461
1112
|
return { AlterDatabaseSetStmt: result };
|
|
1462
1113
|
}
|
|
1463
|
-
DeclareCursorStmt(node
|
|
1464
|
-
DeclareCursorStmt: any;
|
|
1465
|
-
} {
|
|
1114
|
+
DeclareCursorStmt(node, context) {
|
|
1466
1115
|
const result = this.transformGenericNode(node, context);
|
|
1467
1116
|
return { DeclareCursorStmt: result };
|
|
1468
1117
|
}
|
|
1469
|
-
CreateAmStmt(node
|
|
1470
|
-
CreateAmStmt: any;
|
|
1471
|
-
} {
|
|
1118
|
+
CreateAmStmt(node, context) {
|
|
1472
1119
|
const result = this.transformGenericNode(node, context);
|
|
1473
1120
|
return { CreateAmStmt: result };
|
|
1474
1121
|
}
|
|
1475
|
-
IntoClause(node
|
|
1476
|
-
IntoClause: any;
|
|
1477
|
-
} {
|
|
1122
|
+
IntoClause(node, context) {
|
|
1478
1123
|
const result = this.transformGenericNode(node, context);
|
|
1479
1124
|
return { IntoClause: result };
|
|
1480
1125
|
}
|
|
1481
|
-
OnConflictExpr(node
|
|
1482
|
-
OnConflictExpr: any;
|
|
1483
|
-
} {
|
|
1126
|
+
OnConflictExpr(node, context) {
|
|
1484
1127
|
const result = this.transformGenericNode(node, context);
|
|
1485
1128
|
return { OnConflictExpr: result };
|
|
1486
1129
|
}
|
|
1487
|
-
ScanToken(node
|
|
1488
|
-
ScanToken: any;
|
|
1489
|
-
} {
|
|
1130
|
+
ScanToken(node, context) {
|
|
1490
1131
|
const result = this.transformGenericNode(node, context);
|
|
1491
1132
|
return { ScanToken: result };
|
|
1492
1133
|
}
|
|
1493
|
-
CreateOpClassItem(node
|
|
1494
|
-
CreateOpClassItem: any;
|
|
1495
|
-
} {
|
|
1134
|
+
CreateOpClassItem(node, context) {
|
|
1496
1135
|
const result = this.transformGenericNode(node, context);
|
|
1497
1136
|
return { CreateOpClassItem: result };
|
|
1498
1137
|
}
|
|
1499
|
-
Var(node
|
|
1500
|
-
Var: any;
|
|
1501
|
-
} {
|
|
1138
|
+
Var(node, context) {
|
|
1502
1139
|
const result = this.transformGenericNode(node, context);
|
|
1503
1140
|
return { Var: result };
|
|
1504
1141
|
}
|
|
1505
|
-
TableFunc(node
|
|
1506
|
-
TableFunc: any;
|
|
1507
|
-
} {
|
|
1142
|
+
TableFunc(node, context) {
|
|
1508
1143
|
const result = this.transformGenericNode(node, context);
|
|
1509
1144
|
return { TableFunc: result };
|
|
1510
1145
|
}
|
|
1511
|
-
RangeTableFunc(node
|
|
1512
|
-
RangeTableFunc: any;
|
|
1513
|
-
} {
|
|
1146
|
+
RangeTableFunc(node, context) {
|
|
1514
1147
|
const result = this.transformGenericNode(node, context);
|
|
1515
1148
|
return { RangeTableFunc: result };
|
|
1516
1149
|
}
|
|
1517
|
-
RangeTableFuncCol(node
|
|
1518
|
-
RangeTableFuncCol: any;
|
|
1519
|
-
} {
|
|
1150
|
+
RangeTableFuncCol(node, context) {
|
|
1520
1151
|
const result = this.transformGenericNode(node, context);
|
|
1521
1152
|
return { RangeTableFuncCol: result };
|
|
1522
1153
|
}
|
|
1523
|
-
RangeFunction(node
|
|
1524
|
-
RangeFunction: any;
|
|
1525
|
-
} {
|
|
1154
|
+
RangeFunction(node, context) {
|
|
1526
1155
|
const result = this.transformGenericNode(node, context);
|
|
1527
1156
|
return { RangeFunction: result };
|
|
1528
1157
|
}
|
|
1529
|
-
XmlExpr(node
|
|
1530
|
-
XmlExpr: any;
|
|
1531
|
-
} {
|
|
1158
|
+
XmlExpr(node, context) {
|
|
1532
1159
|
const result = this.transformGenericNode(node, context);
|
|
1533
1160
|
return { XmlExpr: result };
|
|
1534
1161
|
}
|
|
1535
|
-
RangeTableSample(node
|
|
1536
|
-
RangeTableSample: any;
|
|
1537
|
-
} {
|
|
1162
|
+
RangeTableSample(node, context) {
|
|
1538
1163
|
const result = this.transformGenericNode(node, context);
|
|
1539
1164
|
return { RangeTableSample: result };
|
|
1540
1165
|
}
|
|
1541
|
-
XmlSerialize(node
|
|
1542
|
-
XmlSerialize: any;
|
|
1543
|
-
} {
|
|
1166
|
+
XmlSerialize(node, context) {
|
|
1544
1167
|
const result = this.transformGenericNode(node, context);
|
|
1545
1168
|
return { XmlSerialize: result };
|
|
1546
1169
|
}
|
|
1547
|
-
RuleStmt(node
|
|
1548
|
-
RuleStmt: any;
|
|
1549
|
-
} {
|
|
1170
|
+
RuleStmt(node, context) {
|
|
1550
1171
|
const result = this.transformGenericNode(node, context);
|
|
1551
1172
|
return { RuleStmt: result };
|
|
1552
1173
|
}
|
|
1553
|
-
RangeSubselect(node
|
|
1554
|
-
RangeSubselect: any;
|
|
1555
|
-
} {
|
|
1174
|
+
RangeSubselect(node, context) {
|
|
1556
1175
|
const result = this.transformGenericNode(node, context);
|
|
1557
1176
|
return { RangeSubselect: result };
|
|
1558
1177
|
}
|
|
1559
|
-
SQLValueFunction(node
|
|
1560
|
-
SQLValueFunction: any;
|
|
1561
|
-
} {
|
|
1178
|
+
SQLValueFunction(node, context) {
|
|
1562
1179
|
const result = this.transformGenericNode(node, context);
|
|
1563
1180
|
return { SQLValueFunction: result };
|
|
1564
1181
|
}
|
|
1565
|
-
GroupingFunc(node
|
|
1566
|
-
GroupingFunc: any;
|
|
1567
|
-
} {
|
|
1182
|
+
GroupingFunc(node, context) {
|
|
1568
1183
|
const result = this.transformGenericNode(node, context);
|
|
1569
1184
|
return { GroupingFunc: result };
|
|
1570
1185
|
}
|
|
1571
|
-
MultiAssignRef(node
|
|
1572
|
-
MultiAssignRef: any;
|
|
1573
|
-
} {
|
|
1186
|
+
MultiAssignRef(node, context) {
|
|
1574
1187
|
const result = this.transformGenericNode(node, context);
|
|
1575
1188
|
return { MultiAssignRef: result };
|
|
1576
1189
|
}
|
|
1577
|
-
SetToDefault(node
|
|
1578
|
-
SetToDefault: any;
|
|
1579
|
-
} {
|
|
1190
|
+
SetToDefault(node, context) {
|
|
1580
1191
|
const result = this.transformGenericNode(node, context);
|
|
1581
1192
|
return { SetToDefault: result };
|
|
1582
1193
|
}
|
|
1583
|
-
CurrentOfExpr(node
|
|
1584
|
-
CurrentOfExpr: any;
|
|
1585
|
-
} {
|
|
1194
|
+
CurrentOfExpr(node, context) {
|
|
1586
1195
|
const result = this.transformGenericNode(node, context);
|
|
1587
1196
|
return { CurrentOfExpr: result };
|
|
1588
1197
|
}
|
|
1589
|
-
TableLikeClause(node
|
|
1590
|
-
TableLikeClause: any;
|
|
1591
|
-
} {
|
|
1198
|
+
TableLikeClause(node, context) {
|
|
1592
1199
|
const result = this.transformGenericNode(node, context);
|
|
1593
1200
|
return { TableLikeClause: result };
|
|
1594
1201
|
}
|
|
1595
|
-
AlterFunctionStmt(node
|
|
1596
|
-
AlterFunctionStmt: any;
|
|
1597
|
-
} {
|
|
1202
|
+
AlterFunctionStmt(node, context) {
|
|
1598
1203
|
const result = this.transformGenericNode(node, context);
|
|
1599
1204
|
return { AlterFunctionStmt: result };
|
|
1600
1205
|
}
|
|
1601
|
-
AlterObjectSchemaStmt(node
|
|
1602
|
-
AlterObjectSchemaStmt: any;
|
|
1603
|
-
} {
|
|
1206
|
+
AlterObjectSchemaStmt(node, context) {
|
|
1604
1207
|
const result = this.transformGenericNode(node, context);
|
|
1605
1208
|
return { AlterObjectSchemaStmt: result };
|
|
1606
1209
|
}
|
|
1607
|
-
AlterRoleSetStmt(node
|
|
1608
|
-
AlterRoleSetStmt: any;
|
|
1609
|
-
} {
|
|
1210
|
+
AlterRoleSetStmt(node, context) {
|
|
1610
1211
|
const result = this.transformGenericNode(node, context);
|
|
1611
1212
|
return { AlterRoleSetStmt: result };
|
|
1612
1213
|
}
|
|
1613
|
-
CreateForeignTableStmt(node
|
|
1614
|
-
CreateForeignTableStmt: any;
|
|
1615
|
-
} {
|
|
1214
|
+
CreateForeignTableStmt(node, context) {
|
|
1616
1215
|
const result = this.transformGenericNode(node, context);
|
|
1617
1216
|
return { CreateForeignTableStmt: result };
|
|
1618
1217
|
}
|
|
1619
1218
|
// NOTE: this doesn't exist in v14?
|
|
1620
|
-
CreateAccessMethodStmt(node
|
|
1219
|
+
CreateAccessMethodStmt(node, context) {
|
|
1621
1220
|
const result = this.transformGenericNode(node, context);
|
|
1622
1221
|
return { CreateAccessMethodStmt: result };
|
|
1623
1222
|
}
|