@pgsql/transform 17.6.3 → 17.7.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/13/enum-to-int.d.ts +7 -0
- package/13/enum-to-int.js +2165 -0
- package/13/enum-to-str.d.ts +7 -0
- package/13/enum-to-str.js +2165 -0
- package/13/enums.d.ts +14 -21
- package/13/runtime-schema.d.ts +17 -0
- package/13/runtime-schema.js +8419 -0
- package/13/types.d.ts +1078 -1303
- package/14/enum-to-int.d.ts +7 -0
- package/14/enum-to-int.js +2205 -0
- package/14/enum-to-str.d.ts +7 -0
- package/14/enum-to-str.js +2205 -0
- package/14/enums.d.ts +62 -0
- package/14/enums.js +2 -0
- package/14/runtime-schema.d.ts +17 -0
- package/14/runtime-schema.js +8695 -0
- package/14/types.d.ts +2164 -0
- package/14/types.js +2 -0
- package/15/enum-to-int.d.ts +7 -0
- package/15/enum-to-int.js +2255 -0
- package/15/enum-to-str.d.ts +7 -0
- package/15/enum-to-str.js +2255 -0
- package/15/enums.d.ts +64 -0
- package/15/enums.js +2 -0
- package/15/runtime-schema.d.ts +17 -0
- package/15/runtime-schema.js +8955 -0
- package/15/types.d.ts +2222 -0
- package/15/types.js +2 -0
- package/16/enum-to-int.d.ts +7 -0
- package/16/enum-to-int.js +2344 -0
- package/16/enum-to-str.d.ts +7 -0
- package/16/enum-to-str.js +2344 -0
- package/16/enums.d.ts +69 -0
- package/16/enums.js +2 -0
- package/16/runtime-schema.d.ts +17 -0
- package/16/runtime-schema.js +9339 -0
- package/16/types.d.ts +2328 -0
- package/16/types.js +2 -0
- package/17/enum-to-int.d.ts +7 -0
- package/17/enum-to-int.js +2501 -0
- package/17/enum-to-str.d.ts +7 -0
- package/17/enum-to-str.js +2501 -0
- package/17/runtime-schema.d.ts +17 -0
- package/17/runtime-schema.js +10010 -0
- package/esm/13/enum-to-int.js +2161 -0
- package/esm/13/enum-to-str.js +2161 -0
- package/esm/13/runtime-schema.js +8416 -0
- package/esm/14/enum-to-int.js +2201 -0
- package/esm/14/enum-to-str.js +2201 -0
- package/esm/14/enums.js +1 -0
- package/esm/14/runtime-schema.js +8692 -0
- package/esm/14/types.js +1 -0
- package/esm/15/enum-to-int.js +2251 -0
- package/esm/15/enum-to-str.js +2251 -0
- package/esm/15/enums.js +1 -0
- package/esm/15/runtime-schema.js +8952 -0
- package/esm/15/types.js +1 -0
- package/esm/16/enum-to-int.js +2340 -0
- package/esm/16/enum-to-str.js +2340 -0
- package/esm/16/enums.js +1 -0
- package/esm/16/runtime-schema.js +9336 -0
- package/esm/16/types.js +1 -0
- package/esm/17/enum-to-int.js +2497 -0
- package/esm/17/enum-to-str.js +2497 -0
- package/esm/17/runtime-schema.js +10007 -0
- package/esm/index.js +15 -1309
- package/esm/multi-version-transformer.js +60 -0
- package/esm/transformers/context.js +1 -0
- package/esm/transformers/v13-to-v14.js +2745 -0
- package/esm/transformers/v14-to-v15.js +1215 -0
- package/esm/transformers/v15-to-v16.js +2876 -0
- package/esm/transformers/v16-to-v17.js +1483 -0
- package/esm/transformers-direct/index.js +8 -0
- package/esm/transformers-direct/v13-to-v17/index.js +74 -0
- package/esm/transformers-direct/v14-to-v17/index.js +63 -0
- package/esm/transformers-direct/v15-to-v17/index.js +53 -0
- package/esm/transformers-direct/v16-to-v17/index.js +40 -0
- package/index.d.ts +18 -5
- package/index.js +29 -1311
- package/multi-version-transformer.d.ts +9 -0
- package/multi-version-transformer.js +64 -0
- package/package.json +8 -4
- package/transformers/context.d.ts +4 -0
- package/transformers/context.js +2 -0
- package/transformers/v13-to-v14.d.ts +252 -0
- package/transformers/v13-to-v14.js +2749 -0
- package/transformers/v14-to-v15.d.ts +615 -0
- package/transformers/v14-to-v15.js +1219 -0
- package/transformers/v15-to-v16.d.ts +626 -0
- package/transformers/v15-to-v16.js +2880 -0
- package/transformers/v16-to-v17.d.ts +637 -0
- package/transformers/v16-to-v17.js +1487 -0
- package/transformers-direct/index.d.ts +8 -0
- package/transformers-direct/index.js +15 -0
- package/transformers-direct/v13-to-v17/index.d.ts +27 -0
- package/transformers-direct/v13-to-v17/index.js +78 -0
- package/transformers-direct/v14-to-v17/index.d.ts +26 -0
- package/transformers-direct/v14-to-v17/index.js +67 -0
- package/transformers-direct/v15-to-v17/index.d.ts +25 -0
- package/transformers-direct/v15-to-v17/index.js +57 -0
- package/transformers-direct/v16-to-v17/index.d.ts +24 -0
- package/transformers-direct/v16-to-v17/index.js +44 -0
package/index.js
CHANGED
|
@@ -33,1314 +33,32 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.PG17Types = exports.PG13Types = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
if ('IntList' in node) {
|
|
67
|
-
return { IntList: transformIntList(node.IntList) };
|
|
68
|
-
}
|
|
69
|
-
if ('A_Const' in node) {
|
|
70
|
-
return { A_Const: transformA_Const(node.A_Const) };
|
|
71
|
-
}
|
|
72
|
-
if ('Alias' in node) {
|
|
73
|
-
return { Alias: transformAlias(node.Alias) };
|
|
74
|
-
}
|
|
75
|
-
if ('RangeVar' in node) {
|
|
76
|
-
return { RangeVar: transformRangeVar(node.RangeVar) };
|
|
77
|
-
}
|
|
78
|
-
if ('TableFunc' in node) {
|
|
79
|
-
return { TableFunc: transformTableFunc(node.TableFunc) };
|
|
80
|
-
}
|
|
81
|
-
if ('IntoClause' in node) {
|
|
82
|
-
return { IntoClause: transformIntoClause(node.IntoClause) };
|
|
83
|
-
}
|
|
84
|
-
if ('Var' in node) {
|
|
85
|
-
return { Var: transformVar(node.Var) };
|
|
86
|
-
}
|
|
87
|
-
if ('Param' in node) {
|
|
88
|
-
return { Param: transformParam(node.Param) };
|
|
89
|
-
}
|
|
90
|
-
if ('Aggref' in node) {
|
|
91
|
-
return { Aggref: transformAggref(node.Aggref) };
|
|
92
|
-
}
|
|
93
|
-
if ('GroupingFunc' in node) {
|
|
94
|
-
return { GroupingFunc: transformGroupingFunc(node.GroupingFunc) };
|
|
95
|
-
}
|
|
96
|
-
if ('WindowFunc' in node) {
|
|
97
|
-
return { WindowFunc: transformWindowFunc(node.WindowFunc) };
|
|
98
|
-
}
|
|
99
|
-
if ('SubscriptingRef' in node) {
|
|
100
|
-
return { SubscriptingRef: transformSubscriptingRef(node.SubscriptingRef) };
|
|
101
|
-
}
|
|
102
|
-
if ('FuncExpr' in node) {
|
|
103
|
-
return { FuncExpr: transformFuncExpr(node.FuncExpr) };
|
|
104
|
-
}
|
|
105
|
-
if ('NamedArgExpr' in node) {
|
|
106
|
-
return { NamedArgExpr: transformNamedArgExpr(node.NamedArgExpr) };
|
|
107
|
-
}
|
|
108
|
-
if ('OpExpr' in node) {
|
|
109
|
-
return { OpExpr: transformOpExpr(node.OpExpr) };
|
|
110
|
-
}
|
|
111
|
-
if ('DistinctExpr' in node) {
|
|
112
|
-
return { DistinctExpr: transformDistinctExpr(node.DistinctExpr) };
|
|
113
|
-
}
|
|
114
|
-
if ('NullIfExpr' in node) {
|
|
115
|
-
return { NullIfExpr: transformNullIfExpr(node.NullIfExpr) };
|
|
116
|
-
}
|
|
117
|
-
if ('ScalarArrayOpExpr' in node) {
|
|
118
|
-
return { ScalarArrayOpExpr: transformScalarArrayOpExpr(node.ScalarArrayOpExpr) };
|
|
119
|
-
}
|
|
120
|
-
if ('BoolExpr' in node) {
|
|
121
|
-
return { BoolExpr: transformBoolExpr(node.BoolExpr) };
|
|
122
|
-
}
|
|
123
|
-
if ('SubLink' in node) {
|
|
124
|
-
return { SubLink: transformSubLink(node.SubLink) };
|
|
125
|
-
}
|
|
126
|
-
if ('SubPlan' in node) {
|
|
127
|
-
return { SubPlan: transformSubPlan(node.SubPlan) };
|
|
128
|
-
}
|
|
129
|
-
if ('AlternativeSubPlan' in node) {
|
|
130
|
-
return { AlternativeSubPlan: transformAlternativeSubPlan(node.AlternativeSubPlan) };
|
|
131
|
-
}
|
|
132
|
-
if ('FieldSelect' in node) {
|
|
133
|
-
return { FieldSelect: transformFieldSelect(node.FieldSelect) };
|
|
134
|
-
}
|
|
135
|
-
if ('FieldStore' in node) {
|
|
136
|
-
return { FieldStore: transformFieldStore(node.FieldStore) };
|
|
137
|
-
}
|
|
138
|
-
if ('RelabelType' in node) {
|
|
139
|
-
return { RelabelType: transformRelabelType(node.RelabelType) };
|
|
140
|
-
}
|
|
141
|
-
if ('CoerceViaIO' in node) {
|
|
142
|
-
return { CoerceViaIO: transformCoerceViaIO(node.CoerceViaIO) };
|
|
143
|
-
}
|
|
144
|
-
if ('ArrayCoerceExpr' in node) {
|
|
145
|
-
return { ArrayCoerceExpr: transformArrayCoerceExpr(node.ArrayCoerceExpr) };
|
|
146
|
-
}
|
|
147
|
-
if ('ConvertRowtypeExpr' in node) {
|
|
148
|
-
return { ConvertRowtypeExpr: transformConvertRowtypeExpr(node.ConvertRowtypeExpr) };
|
|
149
|
-
}
|
|
150
|
-
if ('CollateExpr' in node) {
|
|
151
|
-
return { CollateExpr: transformCollateExpr(node.CollateExpr) };
|
|
152
|
-
}
|
|
153
|
-
if ('CaseExpr' in node) {
|
|
154
|
-
return { CaseExpr: transformCaseExpr(node.CaseExpr) };
|
|
155
|
-
}
|
|
156
|
-
if ('CaseWhen' in node) {
|
|
157
|
-
return { CaseWhen: transformCaseWhen(node.CaseWhen) };
|
|
158
|
-
}
|
|
159
|
-
if ('CaseTestExpr' in node) {
|
|
160
|
-
return { CaseTestExpr: transformCaseTestExpr(node.CaseTestExpr) };
|
|
161
|
-
}
|
|
162
|
-
if ('ArrayExpr' in node) {
|
|
163
|
-
return { ArrayExpr: transformArrayExpr(node.ArrayExpr) };
|
|
164
|
-
}
|
|
165
|
-
if ('RowExpr' in node) {
|
|
166
|
-
return { RowExpr: transformRowExpr(node.RowExpr) };
|
|
167
|
-
}
|
|
168
|
-
if ('RowCompareExpr' in node) {
|
|
169
|
-
return { RowCompareExpr: transformRowCompareExpr(node.RowCompareExpr) };
|
|
170
|
-
}
|
|
171
|
-
if ('CoalesceExpr' in node) {
|
|
172
|
-
return { CoalesceExpr: transformCoalesceExpr(node.CoalesceExpr) };
|
|
173
|
-
}
|
|
174
|
-
if ('MinMaxExpr' in node) {
|
|
175
|
-
return { MinMaxExpr: transformMinMaxExpr(node.MinMaxExpr) };
|
|
176
|
-
}
|
|
177
|
-
if ('SQLValueFunction' in node) {
|
|
178
|
-
return { SQLValueFunction: transformSQLValueFunction(node.SQLValueFunction) };
|
|
179
|
-
}
|
|
180
|
-
if ('XmlExpr' in node) {
|
|
181
|
-
return { XmlExpr: transformXmlExpr(node.XmlExpr) };
|
|
182
|
-
}
|
|
183
|
-
if ('JsonFormat' in node) {
|
|
184
|
-
return { JsonFormat: transformJsonFormat(node.JsonFormat) };
|
|
185
|
-
}
|
|
186
|
-
if ('JsonReturning' in node) {
|
|
187
|
-
return { JsonReturning: transformJsonReturning(node.JsonReturning) };
|
|
188
|
-
}
|
|
189
|
-
if ('JsonValueExpr' in node) {
|
|
190
|
-
return { JsonValueExpr: transformJsonValueExpr(node.JsonValueExpr) };
|
|
191
|
-
}
|
|
192
|
-
if ('JsonConstructorExpr' in node) {
|
|
193
|
-
return { JsonConstructorExpr: transformJsonConstructorExpr(node.JsonConstructorExpr) };
|
|
194
|
-
}
|
|
195
|
-
if ('JsonIsPredicate' in node) {
|
|
196
|
-
return { JsonIsPredicate: transformJsonIsPredicate(node.JsonIsPredicate) };
|
|
197
|
-
}
|
|
198
|
-
if ('NullTest' in node) {
|
|
199
|
-
return { NullTest: transformNullTest(node.NullTest) };
|
|
200
|
-
}
|
|
201
|
-
if ('BooleanTest' in node) {
|
|
202
|
-
return { BooleanTest: transformBooleanTest(node.BooleanTest) };
|
|
203
|
-
}
|
|
204
|
-
if ('CoerceToDomain' in node) {
|
|
205
|
-
return { CoerceToDomain: transformCoerceToDomain(node.CoerceToDomain) };
|
|
206
|
-
}
|
|
207
|
-
if ('CoerceToDomainValue' in node) {
|
|
208
|
-
return { CoerceToDomainValue: transformCoerceToDomainValue(node.CoerceToDomainValue) };
|
|
209
|
-
}
|
|
210
|
-
if ('SetToDefault' in node) {
|
|
211
|
-
return { SetToDefault: transformSetToDefault(node.SetToDefault) };
|
|
212
|
-
}
|
|
213
|
-
if ('CurrentOfExpr' in node) {
|
|
214
|
-
return { CurrentOfExpr: transformCurrentOfExpr(node.CurrentOfExpr) };
|
|
215
|
-
}
|
|
216
|
-
if ('NextValueExpr' in node) {
|
|
217
|
-
return { NextValueExpr: transformNextValueExpr(node.NextValueExpr) };
|
|
218
|
-
}
|
|
219
|
-
if ('InferenceElem' in node) {
|
|
220
|
-
return { InferenceElem: transformInferenceElem(node.InferenceElem) };
|
|
221
|
-
}
|
|
222
|
-
if ('TargetEntry' in node) {
|
|
223
|
-
return { TargetEntry: transformTargetEntry(node.TargetEntry) };
|
|
224
|
-
}
|
|
225
|
-
if ('RangeTblRef' in node) {
|
|
226
|
-
return { RangeTblRef: transformRangeTblRef(node.RangeTblRef) };
|
|
227
|
-
}
|
|
228
|
-
if ('JoinExpr' in node) {
|
|
229
|
-
return { JoinExpr: transformJoinExpr(node.JoinExpr) };
|
|
230
|
-
}
|
|
231
|
-
if ('FromExpr' in node) {
|
|
232
|
-
return { FromExpr: transformFromExpr(node.FromExpr) };
|
|
233
|
-
}
|
|
234
|
-
if ('OnConflictExpr' in node) {
|
|
235
|
-
return { OnConflictExpr: transformOnConflictExpr(node.OnConflictExpr) };
|
|
236
|
-
}
|
|
237
|
-
if ('Query' in node) {
|
|
238
|
-
return { Query: transformQuery(node.Query) };
|
|
239
|
-
}
|
|
240
|
-
if ('TypeName' in node) {
|
|
241
|
-
return { TypeName: transformTypeName(node.TypeName) };
|
|
242
|
-
}
|
|
243
|
-
if ('ColumnRef' in node) {
|
|
244
|
-
return { ColumnRef: transformColumnRef(node.ColumnRef) };
|
|
245
|
-
}
|
|
246
|
-
if ('ParamRef' in node) {
|
|
247
|
-
return { ParamRef: transformParamRef(node.ParamRef) };
|
|
248
|
-
}
|
|
249
|
-
if ('A_Expr' in node) {
|
|
250
|
-
return { A_Expr: transformA_Expr(node.A_Expr) };
|
|
251
|
-
}
|
|
252
|
-
if ('TypeCast' in node) {
|
|
253
|
-
return { TypeCast: transformTypeCast(node.TypeCast) };
|
|
254
|
-
}
|
|
255
|
-
if ('CollateClause' in node) {
|
|
256
|
-
return { CollateClause: transformCollateClause(node.CollateClause) };
|
|
257
|
-
}
|
|
258
|
-
if ('RoleSpec' in node) {
|
|
259
|
-
return { RoleSpec: transformRoleSpec(node.RoleSpec) };
|
|
260
|
-
}
|
|
261
|
-
if ('FuncCall' in node) {
|
|
262
|
-
return { FuncCall: transformFuncCall(node.FuncCall) };
|
|
263
|
-
}
|
|
264
|
-
if ('A_Star' in node) {
|
|
265
|
-
return { A_Star: node.A_Star };
|
|
266
|
-
}
|
|
267
|
-
if ('A_Indices' in node) {
|
|
268
|
-
return { A_Indices: transformA_Indices(node.A_Indices) };
|
|
269
|
-
}
|
|
270
|
-
if ('A_Indirection' in node) {
|
|
271
|
-
return { A_Indirection: transformA_Indirection(node.A_Indirection) };
|
|
272
|
-
}
|
|
273
|
-
if ('A_ArrayExpr' in node) {
|
|
274
|
-
return { A_ArrayExpr: transformA_ArrayExpr(node.A_ArrayExpr) };
|
|
275
|
-
}
|
|
276
|
-
if ('ResTarget' in node) {
|
|
277
|
-
return { ResTarget: transformResTarget(node.ResTarget) };
|
|
278
|
-
}
|
|
279
|
-
if ('MultiAssignRef' in node) {
|
|
280
|
-
return { MultiAssignRef: transformMultiAssignRef(node.MultiAssignRef) };
|
|
281
|
-
}
|
|
282
|
-
if ('SortBy' in node) {
|
|
283
|
-
return { SortBy: transformSortBy(node.SortBy) };
|
|
284
|
-
}
|
|
285
|
-
if ('WindowDef' in node) {
|
|
286
|
-
return { WindowDef: transformWindowDef(node.WindowDef) };
|
|
287
|
-
}
|
|
288
|
-
if ('RangeSubselect' in node) {
|
|
289
|
-
return { RangeSubselect: transformRangeSubselect(node.RangeSubselect) };
|
|
290
|
-
}
|
|
291
|
-
if ('RangeFunction' in node) {
|
|
292
|
-
return { RangeFunction: transformRangeFunction(node.RangeFunction) };
|
|
293
|
-
}
|
|
294
|
-
if ('RangeTableFunc' in node) {
|
|
295
|
-
return { RangeTableFunc: transformRangeTableFunc(node.RangeTableFunc) };
|
|
296
|
-
}
|
|
297
|
-
if ('RangeTableFuncCol' in node) {
|
|
298
|
-
return { RangeTableFuncCol: transformRangeTableFuncCol(node.RangeTableFuncCol) };
|
|
299
|
-
}
|
|
300
|
-
if ('RangeTableSample' in node) {
|
|
301
|
-
return { RangeTableSample: transformRangeTableSample(node.RangeTableSample) };
|
|
302
|
-
}
|
|
303
|
-
if ('ColumnDef' in node) {
|
|
304
|
-
return { ColumnDef: transformColumnDef(node.ColumnDef) };
|
|
305
|
-
}
|
|
306
|
-
if ('TableLikeClause' in node) {
|
|
307
|
-
return { TableLikeClause: transformTableLikeClause(node.TableLikeClause) };
|
|
308
|
-
}
|
|
309
|
-
if ('IndexElem' in node) {
|
|
310
|
-
return { IndexElem: transformIndexElem(node.IndexElem) };
|
|
311
|
-
}
|
|
312
|
-
if ('DefElem' in node) {
|
|
313
|
-
return { DefElem: transformDefElem(node.DefElem) };
|
|
314
|
-
}
|
|
315
|
-
if ('LockingClause' in node) {
|
|
316
|
-
return { LockingClause: transformLockingClause(node.LockingClause) };
|
|
317
|
-
}
|
|
318
|
-
if ('XmlSerialize' in node) {
|
|
319
|
-
return { XmlSerialize: transformXmlSerialize(node.XmlSerialize) };
|
|
320
|
-
}
|
|
321
|
-
if ('PartitionElem' in node) {
|
|
322
|
-
return { PartitionElem: transformPartitionElem(node.PartitionElem) };
|
|
323
|
-
}
|
|
324
|
-
if ('PartitionSpec' in node) {
|
|
325
|
-
return { PartitionSpec: transformPartitionSpec(node.PartitionSpec) };
|
|
326
|
-
}
|
|
327
|
-
if ('PartitionBoundSpec' in node) {
|
|
328
|
-
return { PartitionBoundSpec: transformPartitionBoundSpec(node.PartitionBoundSpec) };
|
|
329
|
-
}
|
|
330
|
-
if ('PartitionRangeDatum' in node) {
|
|
331
|
-
return { PartitionRangeDatum: transformPartitionRangeDatum(node.PartitionRangeDatum) };
|
|
332
|
-
}
|
|
333
|
-
if ('PartitionCmd' in node) {
|
|
334
|
-
return { PartitionCmd: transformPartitionCmd(node.PartitionCmd) };
|
|
335
|
-
}
|
|
336
|
-
if ('RangeTblEntry' in node) {
|
|
337
|
-
return { RangeTblEntry: transformRangeTblEntry(node.RangeTblEntry) };
|
|
338
|
-
}
|
|
339
|
-
if ('WindowFuncRunCondition' in node) {
|
|
340
|
-
return node;
|
|
341
|
-
}
|
|
342
|
-
if ('MergeSupportFunc' in node) {
|
|
343
|
-
return node;
|
|
344
|
-
}
|
|
345
|
-
if ('JsonBehavior' in node) {
|
|
346
|
-
return node;
|
|
347
|
-
}
|
|
348
|
-
if ('JsonExpr' in node) {
|
|
349
|
-
return node;
|
|
350
|
-
}
|
|
351
|
-
if ('JsonTablePath' in node) {
|
|
352
|
-
return node;
|
|
353
|
-
}
|
|
354
|
-
if ('JsonTablePathScan' in node) {
|
|
355
|
-
return node;
|
|
356
|
-
}
|
|
357
|
-
if ('JsonTableSiblingJoin' in node) {
|
|
358
|
-
return node;
|
|
359
|
-
}
|
|
360
|
-
if ('MergeAction' in node) {
|
|
361
|
-
return { MergeAction: transformMergeAction(node.MergeAction) };
|
|
362
|
-
}
|
|
363
|
-
throw new Error(`Unknown node type: ${JSON.stringify(node)}`);
|
|
364
|
-
}
|
|
365
|
-
function transformNodeArray(nodes) {
|
|
366
|
-
return nodes?.map(node => transformPG13ToPG17(node));
|
|
367
|
-
}
|
|
368
|
-
function transformOptionalNode(node) {
|
|
369
|
-
return node ? transformPG13ToPG17(node) : undefined;
|
|
370
|
-
}
|
|
371
|
-
function transformParseResult(result) {
|
|
372
|
-
return {
|
|
373
|
-
version: result.version,
|
|
374
|
-
stmts: result.stmts?.map(stmt => transformRawStmt(stmt))
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
function transformScanResult(result) {
|
|
378
|
-
return {
|
|
379
|
-
version: result.version,
|
|
380
|
-
tokens: result.tokens
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
function transformList(list) {
|
|
384
|
-
return {
|
|
385
|
-
items: transformNodeArray(list.items)
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
function transformA_Const(aConst) {
|
|
389
|
-
return {
|
|
390
|
-
ival: aConst.ival,
|
|
391
|
-
fval: aConst.fval,
|
|
392
|
-
boolval: aConst.boolval,
|
|
393
|
-
sval: aConst.sval,
|
|
394
|
-
bsval: aConst.bsval,
|
|
395
|
-
isnull: aConst.isnull,
|
|
396
|
-
location: aConst.location
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
function transformAlias(alias) {
|
|
400
|
-
return {
|
|
401
|
-
aliasname: alias.aliasname,
|
|
402
|
-
colnames: transformNodeArray(alias.colnames)
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
function transformRangeVar(rangeVar) {
|
|
406
|
-
return {
|
|
407
|
-
catalogname: rangeVar.catalogname,
|
|
408
|
-
schemaname: rangeVar.schemaname,
|
|
409
|
-
relname: rangeVar.relname,
|
|
410
|
-
inh: rangeVar.inh,
|
|
411
|
-
relpersistence: rangeVar.relpersistence,
|
|
412
|
-
alias: rangeVar.alias ? transformAlias(rangeVar.alias) : undefined,
|
|
413
|
-
location: rangeVar.location
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
function transformTableFunc(tableFunc) {
|
|
417
|
-
return {
|
|
418
|
-
functype: undefined,
|
|
419
|
-
ns_uris: transformNodeArray(tableFunc.ns_uris),
|
|
420
|
-
ns_names: transformNodeArray(tableFunc.ns_names),
|
|
421
|
-
docexpr: transformOptionalNode(tableFunc.docexpr),
|
|
422
|
-
rowexpr: transformOptionalNode(tableFunc.rowexpr),
|
|
423
|
-
colnames: transformNodeArray(tableFunc.colnames),
|
|
424
|
-
coltypes: transformNodeArray(tableFunc.coltypes),
|
|
425
|
-
coltypmods: transformNodeArray(tableFunc.coltypmods),
|
|
426
|
-
colcollations: transformNodeArray(tableFunc.colcollations),
|
|
427
|
-
colexprs: transformNodeArray(tableFunc.colexprs),
|
|
428
|
-
coldefexprs: transformNodeArray(tableFunc.coldefexprs),
|
|
429
|
-
colvalexprs: undefined,
|
|
430
|
-
passingvalexprs: undefined,
|
|
431
|
-
notnulls: tableFunc.notnulls,
|
|
432
|
-
plan: undefined,
|
|
433
|
-
ordinalitycol: tableFunc.ordinalitycol,
|
|
434
|
-
location: tableFunc.location
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
function transformIntoClause(intoClause) {
|
|
438
|
-
return {
|
|
439
|
-
rel: intoClause.rel ? transformRangeVar(intoClause.rel) : undefined,
|
|
440
|
-
colNames: transformNodeArray(intoClause.colNames),
|
|
441
|
-
accessMethod: intoClause.accessMethod,
|
|
442
|
-
options: transformNodeArray(intoClause.options),
|
|
443
|
-
onCommit: intoClause.onCommit,
|
|
444
|
-
tableSpaceName: intoClause.tableSpaceName,
|
|
445
|
-
viewQuery: transformOptionalNode(intoClause.viewQuery),
|
|
446
|
-
skipData: intoClause.skipData
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
function transformVar(varNode) {
|
|
450
|
-
return {
|
|
451
|
-
xpr: transformOptionalNode(varNode.xpr),
|
|
452
|
-
varno: varNode.varno,
|
|
453
|
-
varattno: varNode.varattno,
|
|
454
|
-
vartype: varNode.vartype,
|
|
455
|
-
vartypmod: varNode.vartypmod,
|
|
456
|
-
varcollid: varNode.varcollid,
|
|
457
|
-
varlevelsup: varNode.varlevelsup,
|
|
458
|
-
location: varNode.location
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
function transformParam(param) {
|
|
462
|
-
return {
|
|
463
|
-
xpr: transformOptionalNode(param.xpr),
|
|
464
|
-
paramkind: param.paramkind,
|
|
465
|
-
paramid: param.paramid,
|
|
466
|
-
paramtype: param.paramtype,
|
|
467
|
-
paramtypmod: param.paramtypmod,
|
|
468
|
-
paramcollid: param.paramcollid,
|
|
469
|
-
location: param.location
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
function transformAggref(aggref) {
|
|
473
|
-
return {
|
|
474
|
-
xpr: transformOptionalNode(aggref.xpr),
|
|
475
|
-
aggfnoid: aggref.aggfnoid,
|
|
476
|
-
aggtype: aggref.aggtype,
|
|
477
|
-
aggcollid: aggref.aggcollid,
|
|
478
|
-
inputcollid: aggref.inputcollid,
|
|
479
|
-
aggdirectargs: transformNodeArray(aggref.aggdirectargs),
|
|
480
|
-
args: transformNodeArray(aggref.args),
|
|
481
|
-
aggorder: transformNodeArray(aggref.aggorder),
|
|
482
|
-
aggdistinct: transformNodeArray(aggref.aggdistinct),
|
|
483
|
-
aggfilter: transformOptionalNode(aggref.aggfilter),
|
|
484
|
-
aggstar: aggref.aggstar,
|
|
485
|
-
aggvariadic: aggref.aggvariadic,
|
|
486
|
-
aggkind: aggref.aggkind,
|
|
487
|
-
agglevelsup: aggref.agglevelsup,
|
|
488
|
-
aggsplit: aggref.aggsplit,
|
|
489
|
-
aggno: aggref.aggno,
|
|
490
|
-
aggtransno: aggref.aggtransno,
|
|
491
|
-
location: aggref.location
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
function transformGroupingFunc(groupingFunc) {
|
|
495
|
-
return {
|
|
496
|
-
xpr: transformOptionalNode(groupingFunc.xpr),
|
|
497
|
-
args: transformNodeArray(groupingFunc.args),
|
|
498
|
-
refs: transformNodeArray(groupingFunc.refs),
|
|
499
|
-
agglevelsup: groupingFunc.agglevelsup,
|
|
500
|
-
location: groupingFunc.location
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
function transformWindowFunc(windowFunc) {
|
|
504
|
-
return {
|
|
505
|
-
xpr: transformOptionalNode(windowFunc.xpr),
|
|
506
|
-
winfnoid: windowFunc.winfnoid,
|
|
507
|
-
wintype: windowFunc.wintype,
|
|
508
|
-
wincollid: windowFunc.wincollid,
|
|
509
|
-
inputcollid: windowFunc.inputcollid,
|
|
510
|
-
args: transformNodeArray(windowFunc.args),
|
|
511
|
-
aggfilter: transformOptionalNode(windowFunc.aggfilter),
|
|
512
|
-
winref: windowFunc.winref,
|
|
513
|
-
winstar: windowFunc.winstar,
|
|
514
|
-
winagg: windowFunc.winagg,
|
|
515
|
-
location: windowFunc.location
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
function transformSubscriptingRef(subscriptingRef) {
|
|
519
|
-
return {
|
|
520
|
-
xpr: transformOptionalNode(subscriptingRef.xpr),
|
|
521
|
-
refcontainertype: subscriptingRef.refcontainertype,
|
|
522
|
-
refelemtype: subscriptingRef.refelemtype,
|
|
523
|
-
refrestype: subscriptingRef.refrestype,
|
|
524
|
-
reftypmod: subscriptingRef.reftypmod,
|
|
525
|
-
refcollid: subscriptingRef.refcollid,
|
|
526
|
-
refupperindexpr: transformNodeArray(subscriptingRef.refupperindexpr),
|
|
527
|
-
reflowerindexpr: transformNodeArray(subscriptingRef.reflowerindexpr),
|
|
528
|
-
refexpr: transformOptionalNode(subscriptingRef.refexpr),
|
|
529
|
-
refassgnexpr: transformOptionalNode(subscriptingRef.refassgnexpr)
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
function transformFuncExpr(funcExpr) {
|
|
533
|
-
return {
|
|
534
|
-
xpr: transformOptionalNode(funcExpr.xpr),
|
|
535
|
-
funcid: funcExpr.funcid,
|
|
536
|
-
funcresulttype: funcExpr.funcresulttype,
|
|
537
|
-
funcretset: funcExpr.funcretset,
|
|
538
|
-
funcvariadic: funcExpr.funcvariadic,
|
|
539
|
-
funcformat: funcExpr.funcformat,
|
|
540
|
-
funccollid: funcExpr.funccollid,
|
|
541
|
-
inputcollid: funcExpr.inputcollid,
|
|
542
|
-
args: transformNodeArray(funcExpr.args),
|
|
543
|
-
location: funcExpr.location
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
function transformNamedArgExpr(namedArgExpr) {
|
|
547
|
-
return {
|
|
548
|
-
xpr: transformOptionalNode(namedArgExpr.xpr),
|
|
549
|
-
arg: transformOptionalNode(namedArgExpr.arg),
|
|
550
|
-
name: namedArgExpr.name,
|
|
551
|
-
argnumber: namedArgExpr.argnumber,
|
|
552
|
-
location: namedArgExpr.location
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
function transformOpExpr(opExpr) {
|
|
556
|
-
return {
|
|
557
|
-
xpr: transformOptionalNode(opExpr.xpr),
|
|
558
|
-
opno: opExpr.opno,
|
|
559
|
-
opresulttype: opExpr.opresulttype,
|
|
560
|
-
opretset: opExpr.opretset,
|
|
561
|
-
opcollid: opExpr.opcollid,
|
|
562
|
-
inputcollid: opExpr.inputcollid,
|
|
563
|
-
args: transformNodeArray(opExpr.args),
|
|
564
|
-
location: opExpr.location
|
|
565
|
-
};
|
|
566
|
-
}
|
|
567
|
-
function transformDistinctExpr(distinctExpr) {
|
|
568
|
-
return {
|
|
569
|
-
xpr: transformOptionalNode(distinctExpr.xpr),
|
|
570
|
-
opno: distinctExpr.opno,
|
|
571
|
-
opresulttype: distinctExpr.opresulttype,
|
|
572
|
-
opretset: distinctExpr.opretset,
|
|
573
|
-
opcollid: distinctExpr.opcollid,
|
|
574
|
-
inputcollid: distinctExpr.inputcollid,
|
|
575
|
-
args: transformNodeArray(distinctExpr.args),
|
|
576
|
-
location: distinctExpr.location
|
|
577
|
-
};
|
|
578
|
-
}
|
|
579
|
-
function transformNullIfExpr(nullIfExpr) {
|
|
580
|
-
return {
|
|
581
|
-
xpr: transformOptionalNode(nullIfExpr.xpr),
|
|
582
|
-
opno: nullIfExpr.opno,
|
|
583
|
-
opresulttype: nullIfExpr.opresulttype,
|
|
584
|
-
opretset: nullIfExpr.opretset,
|
|
585
|
-
opcollid: nullIfExpr.opcollid,
|
|
586
|
-
inputcollid: nullIfExpr.inputcollid,
|
|
587
|
-
args: transformNodeArray(nullIfExpr.args),
|
|
588
|
-
location: nullIfExpr.location
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
function transformScalarArrayOpExpr(scalarArrayOpExpr) {
|
|
592
|
-
return {
|
|
593
|
-
xpr: transformOptionalNode(scalarArrayOpExpr.xpr),
|
|
594
|
-
opno: scalarArrayOpExpr.opno,
|
|
595
|
-
useOr: scalarArrayOpExpr.useOr,
|
|
596
|
-
inputcollid: scalarArrayOpExpr.inputcollid,
|
|
597
|
-
args: transformNodeArray(scalarArrayOpExpr.args),
|
|
598
|
-
location: scalarArrayOpExpr.location
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
function transformBoolExpr(boolExpr) {
|
|
602
|
-
return {
|
|
603
|
-
xpr: transformOptionalNode(boolExpr.xpr),
|
|
604
|
-
boolop: boolExpr.boolop,
|
|
605
|
-
args: transformNodeArray(boolExpr.args),
|
|
606
|
-
location: boolExpr.location
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
function transformSubLink(subLink) {
|
|
610
|
-
return {
|
|
611
|
-
xpr: transformOptionalNode(subLink.xpr),
|
|
612
|
-
subLinkType: subLink.subLinkType,
|
|
613
|
-
subLinkId: subLink.subLinkId,
|
|
614
|
-
testexpr: transformOptionalNode(subLink.testexpr),
|
|
615
|
-
operName: transformNodeArray(subLink.operName),
|
|
616
|
-
subselect: transformOptionalNode(subLink.subselect),
|
|
617
|
-
location: subLink.location
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
function transformSubPlan(subPlan) {
|
|
621
|
-
return {
|
|
622
|
-
xpr: transformOptionalNode(subPlan.xpr),
|
|
623
|
-
subLinkType: subPlan.subLinkType,
|
|
624
|
-
testexpr: transformOptionalNode(subPlan.testexpr),
|
|
625
|
-
plan_id: subPlan.plan_id,
|
|
626
|
-
plan_name: subPlan.plan_name,
|
|
627
|
-
firstColType: subPlan.firstColType,
|
|
628
|
-
firstColTypmod: subPlan.firstColTypmod,
|
|
629
|
-
firstColCollation: subPlan.firstColCollation,
|
|
630
|
-
useHashTable: subPlan.useHashTable,
|
|
631
|
-
unknownEqFalse: subPlan.unknownEqFalse,
|
|
632
|
-
parallel_safe: subPlan.parallel_safe,
|
|
633
|
-
args: transformNodeArray(subPlan.args),
|
|
634
|
-
startup_cost: subPlan.startup_cost,
|
|
635
|
-
per_call_cost: subPlan.per_call_cost
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
function transformAlternativeSubPlan(altSubPlan) {
|
|
639
|
-
return {
|
|
640
|
-
xpr: transformOptionalNode(altSubPlan.xpr),
|
|
641
|
-
subplans: transformNodeArray(altSubPlan.subplans)
|
|
642
|
-
};
|
|
643
|
-
}
|
|
644
|
-
function transformFieldSelect(fieldSelect) {
|
|
645
|
-
return {
|
|
646
|
-
xpr: transformOptionalNode(fieldSelect.xpr),
|
|
647
|
-
arg: transformOptionalNode(fieldSelect.arg),
|
|
648
|
-
fieldnum: fieldSelect.fieldnum,
|
|
649
|
-
resulttype: fieldSelect.resulttype,
|
|
650
|
-
resulttypmod: fieldSelect.resulttypmod,
|
|
651
|
-
resultcollid: fieldSelect.resultcollid
|
|
652
|
-
};
|
|
653
|
-
}
|
|
654
|
-
function transformFieldStore(fieldStore) {
|
|
655
|
-
return {
|
|
656
|
-
xpr: transformOptionalNode(fieldStore.xpr),
|
|
657
|
-
arg: transformOptionalNode(fieldStore.arg),
|
|
658
|
-
newvals: transformNodeArray(fieldStore.newvals),
|
|
659
|
-
resulttype: fieldStore.resulttype
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
function transformRelabelType(relabelType) {
|
|
663
|
-
return {
|
|
664
|
-
xpr: transformOptionalNode(relabelType.xpr),
|
|
665
|
-
arg: transformOptionalNode(relabelType.arg),
|
|
666
|
-
resulttype: relabelType.resulttype,
|
|
667
|
-
resulttypmod: relabelType.resulttypmod,
|
|
668
|
-
resultcollid: relabelType.resultcollid,
|
|
669
|
-
relabelformat: relabelType.relabelformat,
|
|
670
|
-
location: relabelType.location
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
function transformCoerceViaIO(coerceViaIO) {
|
|
674
|
-
return {
|
|
675
|
-
xpr: transformOptionalNode(coerceViaIO.xpr),
|
|
676
|
-
arg: transformOptionalNode(coerceViaIO.arg),
|
|
677
|
-
resulttype: coerceViaIO.resulttype,
|
|
678
|
-
resultcollid: coerceViaIO.resultcollid,
|
|
679
|
-
coerceformat: coerceViaIO.coerceformat,
|
|
680
|
-
location: coerceViaIO.location
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
function transformArrayCoerceExpr(arrayCoerceExpr) {
|
|
684
|
-
return {
|
|
685
|
-
xpr: transformOptionalNode(arrayCoerceExpr.xpr),
|
|
686
|
-
arg: transformOptionalNode(arrayCoerceExpr.arg),
|
|
687
|
-
elemexpr: transformOptionalNode(arrayCoerceExpr.elemexpr),
|
|
688
|
-
resulttype: arrayCoerceExpr.resulttype,
|
|
689
|
-
resulttypmod: arrayCoerceExpr.resulttypmod,
|
|
690
|
-
resultcollid: arrayCoerceExpr.resultcollid,
|
|
691
|
-
coerceformat: arrayCoerceExpr.coerceformat,
|
|
692
|
-
location: arrayCoerceExpr.location
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
function transformConvertRowtypeExpr(convertRowtypeExpr) {
|
|
696
|
-
return {
|
|
697
|
-
xpr: transformOptionalNode(convertRowtypeExpr.xpr),
|
|
698
|
-
arg: transformOptionalNode(convertRowtypeExpr.arg),
|
|
699
|
-
resulttype: convertRowtypeExpr.resulttype,
|
|
700
|
-
convertformat: convertRowtypeExpr.convertformat,
|
|
701
|
-
location: convertRowtypeExpr.location
|
|
702
|
-
};
|
|
703
|
-
}
|
|
704
|
-
function transformCollateExpr(collateExpr) {
|
|
705
|
-
return {
|
|
706
|
-
xpr: transformOptionalNode(collateExpr.xpr),
|
|
707
|
-
arg: transformOptionalNode(collateExpr.arg),
|
|
708
|
-
collOid: collateExpr.collOid,
|
|
709
|
-
location: collateExpr.location
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
function transformCaseExpr(caseExpr) {
|
|
713
|
-
return {
|
|
714
|
-
xpr: transformOptionalNode(caseExpr.xpr),
|
|
715
|
-
casetype: caseExpr.casetype,
|
|
716
|
-
casecollid: caseExpr.casecollid,
|
|
717
|
-
arg: transformOptionalNode(caseExpr.arg),
|
|
718
|
-
args: transformNodeArray(caseExpr.args),
|
|
719
|
-
defresult: transformOptionalNode(caseExpr.defresult),
|
|
720
|
-
location: caseExpr.location
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
function transformCaseWhen(caseWhen) {
|
|
724
|
-
return {
|
|
725
|
-
xpr: transformOptionalNode(caseWhen.xpr),
|
|
726
|
-
expr: transformOptionalNode(caseWhen.expr),
|
|
727
|
-
result: transformOptionalNode(caseWhen.result),
|
|
728
|
-
location: caseWhen.location
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
function transformCaseTestExpr(caseTestExpr) {
|
|
732
|
-
return {
|
|
733
|
-
xpr: transformOptionalNode(caseTestExpr.xpr),
|
|
734
|
-
typeId: caseTestExpr.typeId,
|
|
735
|
-
typeMod: caseTestExpr.typeMod,
|
|
736
|
-
collation: caseTestExpr.collation
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
function transformArrayExpr(arrayExpr) {
|
|
740
|
-
return {
|
|
741
|
-
xpr: transformOptionalNode(arrayExpr.xpr),
|
|
742
|
-
array_typeid: arrayExpr.array_typeid,
|
|
743
|
-
array_collid: arrayExpr.array_collid,
|
|
744
|
-
element_typeid: arrayExpr.element_typeid,
|
|
745
|
-
elements: transformNodeArray(arrayExpr.elements),
|
|
746
|
-
multidims: arrayExpr.multidims,
|
|
747
|
-
location: arrayExpr.location
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
|
-
function transformRowExpr(rowExpr) {
|
|
751
|
-
return {
|
|
752
|
-
xpr: transformOptionalNode(rowExpr.xpr),
|
|
753
|
-
args: transformNodeArray(rowExpr.args),
|
|
754
|
-
row_typeid: rowExpr.row_typeid,
|
|
755
|
-
row_format: rowExpr.row_format,
|
|
756
|
-
colnames: transformNodeArray(rowExpr.colnames),
|
|
757
|
-
location: rowExpr.location
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
function transformRowCompareExpr(rowCompareExpr) {
|
|
761
|
-
return {
|
|
762
|
-
xpr: transformOptionalNode(rowCompareExpr.xpr),
|
|
763
|
-
rctype: rowCompareExpr.rctype,
|
|
764
|
-
largs: transformNodeArray(rowCompareExpr.largs),
|
|
765
|
-
rargs: transformNodeArray(rowCompareExpr.rargs)
|
|
766
|
-
};
|
|
767
|
-
}
|
|
768
|
-
function transformCoalesceExpr(coalesceExpr) {
|
|
769
|
-
return {
|
|
770
|
-
xpr: transformOptionalNode(coalesceExpr.xpr),
|
|
771
|
-
coalescetype: coalesceExpr.coalescetype,
|
|
772
|
-
coalescecollid: coalesceExpr.coalescecollid,
|
|
773
|
-
args: transformNodeArray(coalesceExpr.args),
|
|
774
|
-
location: coalesceExpr.location
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
function transformMinMaxExpr(minMaxExpr) {
|
|
778
|
-
return {
|
|
779
|
-
xpr: transformOptionalNode(minMaxExpr.xpr),
|
|
780
|
-
minmaxtype: minMaxExpr.minmaxtype,
|
|
781
|
-
minmaxcollid: minMaxExpr.minmaxcollid,
|
|
782
|
-
inputcollid: minMaxExpr.inputcollid,
|
|
783
|
-
op: minMaxExpr.op,
|
|
784
|
-
args: transformNodeArray(minMaxExpr.args),
|
|
785
|
-
location: minMaxExpr.location
|
|
786
|
-
};
|
|
787
|
-
}
|
|
788
|
-
function transformSQLValueFunction(sqlValueFunction) {
|
|
789
|
-
return {
|
|
790
|
-
xpr: transformOptionalNode(sqlValueFunction.xpr),
|
|
791
|
-
op: sqlValueFunction.op,
|
|
792
|
-
type: sqlValueFunction.type,
|
|
793
|
-
typmod: sqlValueFunction.typmod,
|
|
794
|
-
location: sqlValueFunction.location
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
function transformXmlExpr(xmlExpr) {
|
|
798
|
-
return {
|
|
799
|
-
xpr: transformOptionalNode(xmlExpr.xpr),
|
|
800
|
-
op: xmlExpr.op,
|
|
801
|
-
name: xmlExpr.name,
|
|
802
|
-
named_args: transformNodeArray(xmlExpr.named_args),
|
|
803
|
-
arg_names: transformNodeArray(xmlExpr.arg_names),
|
|
804
|
-
args: transformNodeArray(xmlExpr.args),
|
|
805
|
-
xmloption: xmlExpr.xmloption,
|
|
806
|
-
type: xmlExpr.type,
|
|
807
|
-
typmod: xmlExpr.typmod,
|
|
808
|
-
location: xmlExpr.location
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
function transformJsonFormat(jsonFormat) {
|
|
812
|
-
return {
|
|
813
|
-
format_type: jsonFormat.format_type,
|
|
814
|
-
encoding: jsonFormat.encoding,
|
|
815
|
-
location: jsonFormat.location
|
|
816
|
-
};
|
|
817
|
-
}
|
|
818
|
-
function transformJsonReturning(jsonReturning) {
|
|
819
|
-
return {
|
|
820
|
-
format: jsonReturning.format ? transformJsonFormat(jsonReturning.format) : undefined,
|
|
821
|
-
typid: jsonReturning.typid,
|
|
822
|
-
typmod: jsonReturning.typmod
|
|
823
|
-
};
|
|
824
|
-
}
|
|
825
|
-
function transformJsonValueExpr(jsonValueExpr) {
|
|
826
|
-
return {
|
|
827
|
-
raw_expr: transformOptionalNode(jsonValueExpr.raw_expr),
|
|
828
|
-
formatted_expr: transformOptionalNode(jsonValueExpr.formatted_expr),
|
|
829
|
-
format: jsonValueExpr.format ? transformJsonFormat(jsonValueExpr.format) : undefined
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
function transformJsonConstructorExpr(jsonConstructorExpr) {
|
|
833
|
-
return {
|
|
834
|
-
xpr: transformOptionalNode(jsonConstructorExpr.xpr),
|
|
835
|
-
type: jsonConstructorExpr.type,
|
|
836
|
-
args: transformNodeArray(jsonConstructorExpr.args),
|
|
837
|
-
func: transformOptionalNode(jsonConstructorExpr.func),
|
|
838
|
-
coercion: transformOptionalNode(jsonConstructorExpr.coercion),
|
|
839
|
-
returning: jsonConstructorExpr.returning ? transformJsonReturning(jsonConstructorExpr.returning) : undefined,
|
|
840
|
-
absent_on_null: jsonConstructorExpr.absent_on_null,
|
|
841
|
-
location: jsonConstructorExpr.location
|
|
842
|
-
};
|
|
843
|
-
}
|
|
844
|
-
function transformJsonIsPredicate(jsonIsPredicate) {
|
|
845
|
-
return {
|
|
846
|
-
expr: transformOptionalNode(jsonIsPredicate.expr),
|
|
847
|
-
format: jsonIsPredicate.format ? transformJsonFormat(jsonIsPredicate.format) : undefined,
|
|
848
|
-
item_type: jsonIsPredicate.item_type,
|
|
849
|
-
location: jsonIsPredicate.location
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
function transformNullTest(nullTest) {
|
|
853
|
-
return {
|
|
854
|
-
xpr: transformOptionalNode(nullTest.xpr),
|
|
855
|
-
arg: transformOptionalNode(nullTest.arg),
|
|
856
|
-
nulltesttype: nullTest.nulltesttype,
|
|
857
|
-
argisrow: nullTest.argisrow,
|
|
858
|
-
location: nullTest.location
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
function transformBooleanTest(booleanTest) {
|
|
862
|
-
return {
|
|
863
|
-
xpr: transformOptionalNode(booleanTest.xpr),
|
|
864
|
-
arg: transformOptionalNode(booleanTest.arg),
|
|
865
|
-
booltesttype: booleanTest.booltesttype,
|
|
866
|
-
location: booleanTest.location
|
|
867
|
-
};
|
|
868
|
-
}
|
|
869
|
-
function transformCoerceToDomain(coerceToDomain) {
|
|
870
|
-
return {
|
|
871
|
-
xpr: transformOptionalNode(coerceToDomain.xpr),
|
|
872
|
-
arg: transformOptionalNode(coerceToDomain.arg),
|
|
873
|
-
resulttype: coerceToDomain.resulttype,
|
|
874
|
-
resulttypmod: coerceToDomain.resulttypmod,
|
|
875
|
-
resultcollid: coerceToDomain.resultcollid,
|
|
876
|
-
coercionformat: coerceToDomain.coercionformat,
|
|
877
|
-
location: coerceToDomain.location
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
function transformCoerceToDomainValue(coerceToDomainValue) {
|
|
881
|
-
return {
|
|
882
|
-
xpr: transformOptionalNode(coerceToDomainValue.xpr),
|
|
883
|
-
typeId: coerceToDomainValue.typeId,
|
|
884
|
-
typeMod: coerceToDomainValue.typeMod,
|
|
885
|
-
collation: coerceToDomainValue.collation,
|
|
886
|
-
location: coerceToDomainValue.location
|
|
887
|
-
};
|
|
888
|
-
}
|
|
889
|
-
function transformSetToDefault(setToDefault) {
|
|
890
|
-
return {
|
|
891
|
-
xpr: transformOptionalNode(setToDefault.xpr),
|
|
892
|
-
typeId: setToDefault.typeId,
|
|
893
|
-
typeMod: setToDefault.typeMod,
|
|
894
|
-
collation: setToDefault.collation,
|
|
895
|
-
location: setToDefault.location
|
|
896
|
-
};
|
|
897
|
-
}
|
|
898
|
-
function transformCurrentOfExpr(currentOfExpr) {
|
|
899
|
-
return {
|
|
900
|
-
xpr: transformOptionalNode(currentOfExpr.xpr),
|
|
901
|
-
cvarno: currentOfExpr.cvarno,
|
|
902
|
-
cursor_name: currentOfExpr.cursor_name,
|
|
903
|
-
cursor_param: currentOfExpr.cursor_param
|
|
904
|
-
};
|
|
905
|
-
}
|
|
906
|
-
function transformNextValueExpr(nextValueExpr) {
|
|
907
|
-
return {
|
|
908
|
-
xpr: transformOptionalNode(nextValueExpr.xpr),
|
|
909
|
-
seqid: nextValueExpr.seqid,
|
|
910
|
-
typeId: nextValueExpr.typeId
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
function transformInferenceElem(inferenceElem) {
|
|
914
|
-
return {
|
|
915
|
-
xpr: transformOptionalNode(inferenceElem.xpr),
|
|
916
|
-
expr: transformOptionalNode(inferenceElem.expr),
|
|
917
|
-
infercollid: inferenceElem.infercollid,
|
|
918
|
-
inferopclass: inferenceElem.inferopclass
|
|
919
|
-
};
|
|
920
|
-
}
|
|
921
|
-
function transformTargetEntry(targetEntry) {
|
|
922
|
-
return {
|
|
923
|
-
xpr: transformOptionalNode(targetEntry.xpr),
|
|
924
|
-
expr: transformOptionalNode(targetEntry.expr),
|
|
925
|
-
resno: targetEntry.resno,
|
|
926
|
-
resname: targetEntry.resname,
|
|
927
|
-
ressortgroupref: targetEntry.ressortgroupref,
|
|
928
|
-
resorigtbl: targetEntry.resorigtbl,
|
|
929
|
-
resorigcol: targetEntry.resorigcol,
|
|
930
|
-
resjunk: targetEntry.resjunk
|
|
931
|
-
};
|
|
932
|
-
}
|
|
933
|
-
function transformRangeTblRef(rangeTblRef) {
|
|
934
|
-
return {
|
|
935
|
-
rtindex: rangeTblRef.rtindex
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
function transformJoinExpr(joinExpr) {
|
|
939
|
-
return {
|
|
940
|
-
jointype: joinExpr.jointype,
|
|
941
|
-
isNatural: joinExpr.isNatural,
|
|
942
|
-
larg: transformOptionalNode(joinExpr.larg),
|
|
943
|
-
rarg: transformOptionalNode(joinExpr.rarg),
|
|
944
|
-
usingClause: transformNodeArray(joinExpr.usingClause),
|
|
945
|
-
join_using_alias: joinExpr.join_using_alias ? transformAlias(joinExpr.join_using_alias) : undefined,
|
|
946
|
-
quals: transformOptionalNode(joinExpr.quals),
|
|
947
|
-
alias: joinExpr.alias ? transformAlias(joinExpr.alias) : undefined,
|
|
948
|
-
rtindex: joinExpr.rtindex
|
|
949
|
-
};
|
|
950
|
-
}
|
|
951
|
-
function transformFromExpr(fromExpr) {
|
|
952
|
-
return {
|
|
953
|
-
fromlist: transformNodeArray(fromExpr.fromlist),
|
|
954
|
-
quals: transformOptionalNode(fromExpr.quals)
|
|
955
|
-
};
|
|
956
|
-
}
|
|
957
|
-
function transformOnConflictExpr(onConflictExpr) {
|
|
958
|
-
return {
|
|
959
|
-
action: onConflictExpr.action,
|
|
960
|
-
arbiterElems: transformNodeArray(onConflictExpr.arbiterElems),
|
|
961
|
-
arbiterWhere: transformOptionalNode(onConflictExpr.arbiterWhere),
|
|
962
|
-
constraint: onConflictExpr.constraint,
|
|
963
|
-
onConflictSet: transformNodeArray(onConflictExpr.onConflictSet),
|
|
964
|
-
onConflictWhere: transformOptionalNode(onConflictExpr.onConflictWhere),
|
|
965
|
-
exclRelIndex: onConflictExpr.exclRelIndex,
|
|
966
|
-
exclRelTlist: transformNodeArray(onConflictExpr.exclRelTlist)
|
|
967
|
-
};
|
|
968
|
-
}
|
|
969
|
-
function transformQuery(query) {
|
|
970
|
-
return {
|
|
971
|
-
commandType: query.commandType,
|
|
972
|
-
querySource: query.querySource,
|
|
973
|
-
canSetTag: query.canSetTag,
|
|
974
|
-
utilityStmt: transformOptionalNode(query.utilityStmt),
|
|
975
|
-
resultRelation: query.resultRelation,
|
|
976
|
-
hasAggs: query.hasAggs,
|
|
977
|
-
hasWindowFuncs: query.hasWindowFuncs,
|
|
978
|
-
hasTargetSRFs: query.hasTargetSRFs,
|
|
979
|
-
hasSubLinks: query.hasSubLinks,
|
|
980
|
-
hasDistinctOn: query.hasDistinctOn,
|
|
981
|
-
hasRecursive: query.hasRecursive,
|
|
982
|
-
hasModifyingCTE: query.hasModifyingCTE,
|
|
983
|
-
hasForUpdate: query.hasForUpdate,
|
|
984
|
-
hasRowSecurity: query.hasRowSecurity,
|
|
985
|
-
isReturn: query.isReturn,
|
|
986
|
-
cteList: transformNodeArray(query.cteList),
|
|
987
|
-
rtable: transformNodeArray(query.rtable),
|
|
988
|
-
jointree: query.jointree ? transformFromExpr(query.jointree) : undefined,
|
|
989
|
-
mergeActionList: transformNodeArray(query.mergeActionList),
|
|
990
|
-
targetList: transformNodeArray(query.targetList),
|
|
991
|
-
override: query.override,
|
|
992
|
-
onConflict: query.onConflict ? transformOnConflictExpr(query.onConflict) : undefined,
|
|
993
|
-
returningList: transformNodeArray(query.returningList),
|
|
994
|
-
groupClause: transformNodeArray(query.groupClause),
|
|
995
|
-
groupingSets: transformNodeArray(query.groupingSets),
|
|
996
|
-
havingQual: transformOptionalNode(query.havingQual),
|
|
997
|
-
windowClause: transformNodeArray(query.windowClause),
|
|
998
|
-
distinctClause: transformNodeArray(query.distinctClause),
|
|
999
|
-
sortClause: transformNodeArray(query.sortClause),
|
|
1000
|
-
limitOffset: transformOptionalNode(query.limitOffset),
|
|
1001
|
-
limitCount: transformOptionalNode(query.limitCount),
|
|
1002
|
-
limitOption: query.limitOption,
|
|
1003
|
-
rowMarks: transformNodeArray(query.rowMarks),
|
|
1004
|
-
setOperations: transformOptionalNode(query.setOperations),
|
|
1005
|
-
withCheckOptions: transformNodeArray(query.withCheckOptions),
|
|
1006
|
-
stmt_location: query.stmt_location,
|
|
1007
|
-
stmt_len: query.stmt_len
|
|
1008
|
-
};
|
|
1009
|
-
}
|
|
1010
|
-
function transformTypeName(typeName) {
|
|
1011
|
-
return {
|
|
1012
|
-
names: transformNodeArray(typeName.names),
|
|
1013
|
-
typeOid: typeName.typeOid,
|
|
1014
|
-
setof: typeName.setof,
|
|
1015
|
-
pct_type: typeName.pct_type,
|
|
1016
|
-
typmods: transformNodeArray(typeName.typmods),
|
|
1017
|
-
typemod: typeName.typemod,
|
|
1018
|
-
arrayBounds: transformNodeArray(typeName.arrayBounds),
|
|
1019
|
-
location: typeName.location
|
|
1020
|
-
};
|
|
1021
|
-
}
|
|
1022
|
-
function transformColumnRef(columnRef) {
|
|
1023
|
-
return {
|
|
1024
|
-
fields: transformNodeArray(columnRef.fields),
|
|
1025
|
-
location: columnRef.location
|
|
1026
|
-
};
|
|
1027
|
-
}
|
|
1028
|
-
function transformParamRef(paramRef) {
|
|
1029
|
-
return {
|
|
1030
|
-
number: paramRef.number,
|
|
1031
|
-
location: paramRef.location
|
|
1032
|
-
};
|
|
1033
|
-
}
|
|
1034
|
-
function transformA_Expr(aExpr) {
|
|
1035
|
-
return {
|
|
1036
|
-
kind: aExpr.kind,
|
|
1037
|
-
name: transformNodeArray(aExpr.name),
|
|
1038
|
-
lexpr: transformOptionalNode(aExpr.lexpr),
|
|
1039
|
-
rexpr: transformOptionalNode(aExpr.rexpr),
|
|
1040
|
-
location: aExpr.location
|
|
1041
|
-
};
|
|
1042
|
-
}
|
|
1043
|
-
function transformTypeCast(typeCast) {
|
|
1044
|
-
return {
|
|
1045
|
-
arg: transformOptionalNode(typeCast.arg),
|
|
1046
|
-
typeName: typeCast.typeName ? transformTypeName(typeCast.typeName) : undefined,
|
|
1047
|
-
location: typeCast.location
|
|
1048
|
-
};
|
|
1049
|
-
}
|
|
1050
|
-
function transformCollateClause(collateClause) {
|
|
1051
|
-
return {
|
|
1052
|
-
arg: transformOptionalNode(collateClause.arg),
|
|
1053
|
-
collname: transformNodeArray(collateClause.collname),
|
|
1054
|
-
location: collateClause.location
|
|
1055
|
-
};
|
|
1056
|
-
}
|
|
1057
|
-
function transformRoleSpec(roleSpec) {
|
|
1058
|
-
return {
|
|
1059
|
-
roletype: roleSpec.roletype,
|
|
1060
|
-
rolename: roleSpec.rolename,
|
|
1061
|
-
location: roleSpec.location
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
function transformFuncCall(funcCall) {
|
|
1065
|
-
return {
|
|
1066
|
-
funcname: transformNodeArray(funcCall.funcname),
|
|
1067
|
-
args: transformNodeArray(funcCall.args),
|
|
1068
|
-
agg_order: transformNodeArray(funcCall.agg_order),
|
|
1069
|
-
agg_filter: transformOptionalNode(funcCall.agg_filter),
|
|
1070
|
-
over: funcCall.over ? transformWindowDef(funcCall.over) : undefined,
|
|
1071
|
-
agg_within_group: funcCall.agg_within_group,
|
|
1072
|
-
agg_star: funcCall.agg_star,
|
|
1073
|
-
agg_distinct: funcCall.agg_distinct,
|
|
1074
|
-
func_variadic: funcCall.func_variadic,
|
|
1075
|
-
funcformat: funcCall.funcformat,
|
|
1076
|
-
location: funcCall.location
|
|
1077
|
-
};
|
|
1078
|
-
}
|
|
1079
|
-
function transformA_Indices(aIndices) {
|
|
1080
|
-
return {
|
|
1081
|
-
is_slice: aIndices.is_slice,
|
|
1082
|
-
lidx: transformOptionalNode(aIndices.lidx),
|
|
1083
|
-
uidx: transformOptionalNode(aIndices.uidx)
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
function transformA_Indirection(aIndirection) {
|
|
1087
|
-
return {
|
|
1088
|
-
arg: transformOptionalNode(aIndirection.arg),
|
|
1089
|
-
indirection: transformNodeArray(aIndirection.indirection)
|
|
1090
|
-
};
|
|
1091
|
-
}
|
|
1092
|
-
function transformA_ArrayExpr(aArrayExpr) {
|
|
1093
|
-
return {
|
|
1094
|
-
elements: transformNodeArray(aArrayExpr.elements),
|
|
1095
|
-
location: aArrayExpr.location
|
|
1096
|
-
};
|
|
1097
|
-
}
|
|
1098
|
-
function transformResTarget(resTarget) {
|
|
1099
|
-
return {
|
|
1100
|
-
name: resTarget.name,
|
|
1101
|
-
indirection: transformNodeArray(resTarget.indirection),
|
|
1102
|
-
val: transformOptionalNode(resTarget.val),
|
|
1103
|
-
location: resTarget.location
|
|
1104
|
-
};
|
|
1105
|
-
}
|
|
1106
|
-
function transformMultiAssignRef(multiAssignRef) {
|
|
1107
|
-
return {
|
|
1108
|
-
source: transformOptionalNode(multiAssignRef.source),
|
|
1109
|
-
colno: multiAssignRef.colno,
|
|
1110
|
-
ncolumns: multiAssignRef.ncolumns
|
|
1111
|
-
};
|
|
1112
|
-
}
|
|
1113
|
-
function transformSortBy(sortBy) {
|
|
1114
|
-
return {
|
|
1115
|
-
node: transformOptionalNode(sortBy.node),
|
|
1116
|
-
sortby_dir: sortBy.sortby_dir,
|
|
1117
|
-
sortby_nulls: sortBy.sortby_nulls,
|
|
1118
|
-
useOp: transformNodeArray(sortBy.useOp),
|
|
1119
|
-
location: sortBy.location
|
|
1120
|
-
};
|
|
1121
|
-
}
|
|
1122
|
-
function transformWindowDef(windowDef) {
|
|
1123
|
-
return {
|
|
1124
|
-
name: windowDef.name,
|
|
1125
|
-
refname: windowDef.refname,
|
|
1126
|
-
partitionClause: transformNodeArray(windowDef.partitionClause),
|
|
1127
|
-
orderClause: transformNodeArray(windowDef.orderClause),
|
|
1128
|
-
frameOptions: windowDef.frameOptions,
|
|
1129
|
-
startOffset: transformOptionalNode(windowDef.startOffset),
|
|
1130
|
-
endOffset: transformOptionalNode(windowDef.endOffset),
|
|
1131
|
-
location: windowDef.location
|
|
1132
|
-
};
|
|
1133
|
-
}
|
|
1134
|
-
function transformRangeSubselect(rangeSubselect) {
|
|
1135
|
-
return {
|
|
1136
|
-
lateral: rangeSubselect.lateral,
|
|
1137
|
-
subquery: transformOptionalNode(rangeSubselect.subquery),
|
|
1138
|
-
alias: rangeSubselect.alias ? transformAlias(rangeSubselect.alias) : undefined
|
|
1139
|
-
};
|
|
1140
|
-
}
|
|
1141
|
-
function transformRangeFunction(rangeFunction) {
|
|
1142
|
-
return {
|
|
1143
|
-
lateral: rangeFunction.lateral,
|
|
1144
|
-
ordinality: rangeFunction.ordinality,
|
|
1145
|
-
is_rowsfrom: rangeFunction.is_rowsfrom,
|
|
1146
|
-
functions: transformNodeArray(rangeFunction.functions),
|
|
1147
|
-
alias: rangeFunction.alias ? transformAlias(rangeFunction.alias) : undefined,
|
|
1148
|
-
coldeflist: transformNodeArray(rangeFunction.coldeflist)
|
|
1149
|
-
};
|
|
1150
|
-
}
|
|
1151
|
-
function transformRangeTableFunc(rangeTableFunc) {
|
|
1152
|
-
return {
|
|
1153
|
-
lateral: rangeTableFunc.lateral,
|
|
1154
|
-
docexpr: transformOptionalNode(rangeTableFunc.docexpr),
|
|
1155
|
-
rowexpr: transformOptionalNode(rangeTableFunc.rowexpr),
|
|
1156
|
-
namespaces: transformNodeArray(rangeTableFunc.namespaces),
|
|
1157
|
-
columns: transformNodeArray(rangeTableFunc.columns),
|
|
1158
|
-
alias: rangeTableFunc.alias ? transformAlias(rangeTableFunc.alias) : undefined,
|
|
1159
|
-
location: rangeTableFunc.location
|
|
1160
|
-
};
|
|
1161
|
-
}
|
|
1162
|
-
function transformRangeTableFuncCol(rangeTableFuncCol) {
|
|
1163
|
-
return {
|
|
1164
|
-
colname: rangeTableFuncCol.colname,
|
|
1165
|
-
typeName: rangeTableFuncCol.typeName ? transformTypeName(rangeTableFuncCol.typeName) : undefined,
|
|
1166
|
-
for_ordinality: rangeTableFuncCol.for_ordinality,
|
|
1167
|
-
is_not_null: rangeTableFuncCol.is_not_null,
|
|
1168
|
-
colexpr: transformOptionalNode(rangeTableFuncCol.colexpr),
|
|
1169
|
-
coldefexpr: transformOptionalNode(rangeTableFuncCol.coldefexpr),
|
|
1170
|
-
location: rangeTableFuncCol.location
|
|
1171
|
-
};
|
|
1172
|
-
}
|
|
1173
|
-
function transformRangeTableSample(rangeTableSample) {
|
|
1174
|
-
return {
|
|
1175
|
-
relation: transformOptionalNode(rangeTableSample.relation),
|
|
1176
|
-
method: transformNodeArray(rangeTableSample.method),
|
|
1177
|
-
args: transformNodeArray(rangeTableSample.args),
|
|
1178
|
-
repeatable: transformOptionalNode(rangeTableSample.repeatable),
|
|
1179
|
-
location: rangeTableSample.location
|
|
1180
|
-
};
|
|
1181
|
-
}
|
|
1182
|
-
function transformColumnDef(columnDef) {
|
|
1183
|
-
return {
|
|
1184
|
-
colname: columnDef.colname,
|
|
1185
|
-
typeName: columnDef.typeName ? transformTypeName(columnDef.typeName) : undefined,
|
|
1186
|
-
compression: columnDef.compression,
|
|
1187
|
-
inhcount: columnDef.inhcount,
|
|
1188
|
-
is_local: columnDef.is_local,
|
|
1189
|
-
is_not_null: columnDef.is_not_null,
|
|
1190
|
-
is_from_type: columnDef.is_from_type,
|
|
1191
|
-
storage: columnDef.storage,
|
|
1192
|
-
raw_default: transformOptionalNode(columnDef.raw_default),
|
|
1193
|
-
cooked_default: transformOptionalNode(columnDef.cooked_default),
|
|
1194
|
-
identity: columnDef.identity,
|
|
1195
|
-
identitySequence: columnDef.identitySequence ? transformRangeVar(columnDef.identitySequence) : undefined,
|
|
1196
|
-
generated: columnDef.generated,
|
|
1197
|
-
collClause: columnDef.collClause ? transformCollateClause(columnDef.collClause) : undefined,
|
|
1198
|
-
collOid: columnDef.collOid,
|
|
1199
|
-
constraints: transformNodeArray(columnDef.constraints),
|
|
1200
|
-
fdwoptions: transformNodeArray(columnDef.fdwoptions),
|
|
1201
|
-
location: columnDef.location
|
|
1202
|
-
};
|
|
1203
|
-
}
|
|
1204
|
-
function transformTableLikeClause(tableLikeClause) {
|
|
1205
|
-
return {
|
|
1206
|
-
relation: tableLikeClause.relation ? transformRangeVar(tableLikeClause.relation) : undefined,
|
|
1207
|
-
options: tableLikeClause.options,
|
|
1208
|
-
relationOid: tableLikeClause.relationOid
|
|
1209
|
-
};
|
|
1210
|
-
}
|
|
1211
|
-
function transformIndexElem(indexElem) {
|
|
1212
|
-
return {
|
|
1213
|
-
name: indexElem.name,
|
|
1214
|
-
expr: transformOptionalNode(indexElem.expr),
|
|
1215
|
-
indexcolname: indexElem.indexcolname,
|
|
1216
|
-
collation: transformNodeArray(indexElem.collation),
|
|
1217
|
-
opclass: transformNodeArray(indexElem.opclass),
|
|
1218
|
-
opclassopts: transformNodeArray(indexElem.opclassopts),
|
|
1219
|
-
ordering: indexElem.ordering,
|
|
1220
|
-
nulls_ordering: indexElem.nulls_ordering
|
|
1221
|
-
};
|
|
1222
|
-
}
|
|
1223
|
-
function transformDefElem(defElem) {
|
|
1224
|
-
return {
|
|
1225
|
-
defnamespace: defElem.defnamespace,
|
|
1226
|
-
defname: defElem.defname,
|
|
1227
|
-
arg: transformOptionalNode(defElem.arg),
|
|
1228
|
-
defaction: defElem.defaction,
|
|
1229
|
-
location: defElem.location
|
|
1230
|
-
};
|
|
1231
|
-
}
|
|
1232
|
-
function transformLockingClause(lockingClause) {
|
|
1233
|
-
return {
|
|
1234
|
-
lockedRels: transformNodeArray(lockingClause.lockedRels),
|
|
1235
|
-
strength: lockingClause.strength,
|
|
1236
|
-
waitPolicy: lockingClause.waitPolicy
|
|
1237
|
-
};
|
|
1238
|
-
}
|
|
1239
|
-
function transformXmlSerialize(xmlSerialize) {
|
|
1240
|
-
return {
|
|
1241
|
-
xmloption: xmlSerialize.xmloption,
|
|
1242
|
-
expr: transformOptionalNode(xmlSerialize.expr),
|
|
1243
|
-
typeName: xmlSerialize.typeName ? transformTypeName(xmlSerialize.typeName) : undefined,
|
|
1244
|
-
indent: xmlSerialize.indent,
|
|
1245
|
-
location: xmlSerialize.location
|
|
1246
|
-
};
|
|
1247
|
-
}
|
|
1248
|
-
function transformPartitionElem(partitionElem) {
|
|
1249
|
-
return {
|
|
1250
|
-
name: partitionElem.name,
|
|
1251
|
-
expr: transformOptionalNode(partitionElem.expr),
|
|
1252
|
-
collation: transformNodeArray(partitionElem.collation),
|
|
1253
|
-
opclass: transformNodeArray(partitionElem.opclass),
|
|
1254
|
-
location: partitionElem.location
|
|
1255
|
-
};
|
|
1256
|
-
}
|
|
1257
|
-
function transformPartitionSpec(partitionSpec) {
|
|
1258
|
-
return {
|
|
1259
|
-
strategy: partitionSpec.strategy,
|
|
1260
|
-
partParams: transformNodeArray(partitionSpec.partParams),
|
|
1261
|
-
location: partitionSpec.location
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
function transformPartitionBoundSpec(partitionBoundSpec) {
|
|
1265
|
-
return {
|
|
1266
|
-
strategy: partitionBoundSpec.strategy,
|
|
1267
|
-
is_default: partitionBoundSpec.is_default,
|
|
1268
|
-
modulus: partitionBoundSpec.modulus,
|
|
1269
|
-
remainder: partitionBoundSpec.remainder,
|
|
1270
|
-
listdatums: transformNodeArray(partitionBoundSpec.listdatums),
|
|
1271
|
-
lowerdatums: transformNodeArray(partitionBoundSpec.lowerdatums),
|
|
1272
|
-
upperdatums: transformNodeArray(partitionBoundSpec.upperdatums),
|
|
1273
|
-
location: partitionBoundSpec.location
|
|
1274
|
-
};
|
|
1275
|
-
}
|
|
1276
|
-
function transformPartitionRangeDatum(partitionRangeDatum) {
|
|
1277
|
-
return {
|
|
1278
|
-
kind: partitionRangeDatum.kind,
|
|
1279
|
-
value: transformOptionalNode(partitionRangeDatum.value),
|
|
1280
|
-
location: partitionRangeDatum.location
|
|
1281
|
-
};
|
|
1282
|
-
}
|
|
1283
|
-
function transformPartitionCmd(partitionCmd) {
|
|
1284
|
-
return {
|
|
1285
|
-
name: partitionCmd.name ? transformRangeVar(partitionCmd.name) : undefined,
|
|
1286
|
-
bound: partitionCmd.bound ? transformPartitionBoundSpec(partitionCmd.bound) : undefined,
|
|
1287
|
-
concurrent: partitionCmd.concurrent
|
|
1288
|
-
};
|
|
1289
|
-
}
|
|
1290
|
-
function transformRangeTblEntry(rangeTblEntry) {
|
|
1291
|
-
return {
|
|
1292
|
-
alias: rangeTblEntry.alias ? transformAlias(rangeTblEntry.alias) : undefined,
|
|
1293
|
-
eref: rangeTblEntry.eref ? transformAlias(rangeTblEntry.eref) : undefined,
|
|
1294
|
-
rtekind: rangeTblEntry.rtekind,
|
|
1295
|
-
relid: rangeTblEntry.relid,
|
|
1296
|
-
inh: rangeTblEntry.inh,
|
|
1297
|
-
relkind: rangeTblEntry.relkind,
|
|
1298
|
-
rellockmode: rangeTblEntry.rellockmode,
|
|
1299
|
-
perminfoindex: rangeTblEntry.perminfoindex,
|
|
1300
|
-
tablesample: rangeTblEntry.tablesample ? transformTableSampleClause(rangeTblEntry.tablesample) : undefined,
|
|
1301
|
-
subquery: rangeTblEntry.subquery ? transformQuery(rangeTblEntry.subquery) : undefined,
|
|
1302
|
-
security_barrier: rangeTblEntry.security_barrier,
|
|
1303
|
-
jointype: rangeTblEntry.jointype,
|
|
1304
|
-
joinmergedcols: rangeTblEntry.joinmergedcols,
|
|
1305
|
-
joinaliasvars: transformNodeArray(rangeTblEntry.joinaliasvars),
|
|
1306
|
-
join_using_alias: rangeTblEntry.join_using_alias ? transformAlias(rangeTblEntry.join_using_alias) : undefined,
|
|
1307
|
-
functions: transformNodeArray(rangeTblEntry.functions),
|
|
1308
|
-
funcordinality: rangeTblEntry.funcordinality,
|
|
1309
|
-
tablefunc: rangeTblEntry.tablefunc ? transformTableFunc(rangeTblEntry.tablefunc) : undefined,
|
|
1310
|
-
values_lists: transformNodeArray(rangeTblEntry.values_lists),
|
|
1311
|
-
ctename: rangeTblEntry.ctename,
|
|
1312
|
-
ctelevelsup: rangeTblEntry.ctelevelsup,
|
|
1313
|
-
self_reference: rangeTblEntry.self_reference,
|
|
1314
|
-
enrname: rangeTblEntry.enrname,
|
|
1315
|
-
enrtuples: rangeTblEntry.enrtuples,
|
|
1316
|
-
lateral: rangeTblEntry.lateral,
|
|
1317
|
-
inFromCl: rangeTblEntry.inFromCl,
|
|
1318
|
-
securityQuals: transformNodeArray(rangeTblEntry.securityQuals)
|
|
1319
|
-
};
|
|
1320
|
-
}
|
|
1321
|
-
function transformOidList(oidList) {
|
|
1322
|
-
return oidList;
|
|
1323
|
-
}
|
|
1324
|
-
function transformIntList(intList) {
|
|
1325
|
-
return intList;
|
|
1326
|
-
}
|
|
1327
|
-
function transformRawStmt(rawStmt) {
|
|
1328
|
-
return {
|
|
1329
|
-
stmt: transformOptionalNode(rawStmt.stmt),
|
|
1330
|
-
stmt_location: rawStmt.stmt_location,
|
|
1331
|
-
stmt_len: rawStmt.stmt_len
|
|
1332
|
-
};
|
|
1333
|
-
}
|
|
1334
|
-
function transformMergeAction(mergeAction) {
|
|
1335
|
-
return {
|
|
1336
|
-
commandType: mergeAction.commandType,
|
|
1337
|
-
override: mergeAction.override,
|
|
1338
|
-
qual: transformOptionalNode(mergeAction.qual),
|
|
1339
|
-
targetList: transformNodeArray(mergeAction.targetList)
|
|
1340
|
-
};
|
|
1341
|
-
}
|
|
1342
|
-
function transformTableSampleClause(tableSampleClause) {
|
|
1343
|
-
return tableSampleClause;
|
|
1344
|
-
}
|
|
1345
|
-
exports.PG13Types = __importStar(require("./13/types"));
|
|
1346
|
-
exports.PG17Types = __importStar(require("./17/types"));
|
|
36
|
+
exports.PG17Types = exports.PG16Types = exports.PG15Types = exports.PG14Types = exports.PG13Types = exports.PG16ToPG17Transformer = exports.PG15ToPG17Transformer = exports.PG14ToPG17Transformer = exports.PG13ToPG17Transformer = exports.V16ToV17Transformer = exports.V15ToV16Transformer = exports.V14ToV15Transformer = exports.V13ToV14Transformer = exports.ASTTransformer = void 0;
|
|
37
|
+
const PG13Types = __importStar(require("./13/types"));
|
|
38
|
+
exports.PG13Types = PG13Types;
|
|
39
|
+
const PG14Types = __importStar(require("./14/types"));
|
|
40
|
+
exports.PG14Types = PG14Types;
|
|
41
|
+
const PG15Types = __importStar(require("./15/types"));
|
|
42
|
+
exports.PG15Types = PG15Types;
|
|
43
|
+
const PG16Types = __importStar(require("./16/types"));
|
|
44
|
+
exports.PG16Types = PG16Types;
|
|
45
|
+
const PG17Types = __importStar(require("./17/types"));
|
|
46
|
+
exports.PG17Types = PG17Types;
|
|
47
|
+
var multi_version_transformer_1 = require("./multi-version-transformer");
|
|
48
|
+
Object.defineProperty(exports, "ASTTransformer", { enumerable: true, get: function () { return multi_version_transformer_1.ASTTransformer; } });
|
|
49
|
+
var v13_to_v14_1 = require("./transformers/v13-to-v14");
|
|
50
|
+
Object.defineProperty(exports, "V13ToV14Transformer", { enumerable: true, get: function () { return v13_to_v14_1.V13ToV14Transformer; } });
|
|
51
|
+
var v14_to_v15_1 = require("./transformers/v14-to-v15");
|
|
52
|
+
Object.defineProperty(exports, "V14ToV15Transformer", { enumerable: true, get: function () { return v14_to_v15_1.V14ToV15Transformer; } });
|
|
53
|
+
var v15_to_v16_1 = require("./transformers/v15-to-v16");
|
|
54
|
+
Object.defineProperty(exports, "V15ToV16Transformer", { enumerable: true, get: function () { return v15_to_v16_1.V15ToV16Transformer; } });
|
|
55
|
+
var v16_to_v17_1 = require("./transformers/v16-to-v17");
|
|
56
|
+
Object.defineProperty(exports, "V16ToV17Transformer", { enumerable: true, get: function () { return v16_to_v17_1.V16ToV17Transformer; } });
|
|
57
|
+
var v13_to_v17_1 = require("./transformers-direct/v13-to-v17");
|
|
58
|
+
Object.defineProperty(exports, "PG13ToPG17Transformer", { enumerable: true, get: function () { return v13_to_v17_1.PG13ToPG17Transformer; } });
|
|
59
|
+
var v14_to_v17_1 = require("./transformers-direct/v14-to-v17");
|
|
60
|
+
Object.defineProperty(exports, "PG14ToPG17Transformer", { enumerable: true, get: function () { return v14_to_v17_1.PG14ToPG17Transformer; } });
|
|
61
|
+
var v15_to_v17_1 = require("./transformers-direct/v15-to-v17");
|
|
62
|
+
Object.defineProperty(exports, "PG15ToPG17Transformer", { enumerable: true, get: function () { return v15_to_v17_1.PG15ToPG17Transformer; } });
|
|
63
|
+
var v16_to_v17_2 = require("./transformers-direct/v16-to-v17");
|
|
64
|
+
Object.defineProperty(exports, "PG16ToPG17Transformer", { enumerable: true, get: function () { return v16_to_v17_2.PG16ToPG17Transformer; } });
|