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