pgsql-deparser 15.1.0 → 16.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.
@@ -1,57 +0,0 @@
1
- /**
2
- * Auto-generated file with types stripped for better tree-shaking
3
- * DO NOT EDIT - Generated by strip-direct-transformer-types.ts
4
- */
5
- import { V15ToV16Transformer } from "./v15-to-v16";
6
- import { V16ToV17Transformer } from "./v16-to-v17";
7
- /**
8
- * Direct transformer from PG15 to PG17
9
- * This transformer chains v15->v16->v17 transformations
10
- */
11
- export class PG15ToPG17Transformer {
12
- v15to16 = new V15ToV16Transformer();
13
- v16to17 = new V16ToV17Transformer();
14
- transform(node) {
15
- // If it's a ParseResult, handle it specially
16
- if (this.isParseResult(node)) {
17
- // First transform statements from v15 to v16
18
- const v16Stmts = node.stmts.map((stmtWrapper) => {
19
- if (stmtWrapper.stmt) {
20
- const v16Stmt = this.v15to16.transform(stmtWrapper.stmt, { parentNodeTypes: [] });
21
- return { ...stmtWrapper, stmt: v16Stmt };
22
- }
23
- return stmtWrapper;
24
- });
25
- // Then transform from v16 to v17
26
- const v17Stmts = v16Stmts.map((stmtWrapper) => {
27
- if (stmtWrapper.stmt) {
28
- const v17Stmt = this.v16to17.transform(stmtWrapper.stmt, { parentNodeTypes: [] });
29
- return { ...stmtWrapper, stmt: v17Stmt };
30
- }
31
- return stmtWrapper;
32
- });
33
- return {
34
- ...node,
35
- version: 170004, // PG17 version
36
- stmts: v17Stmts
37
- };
38
- }
39
- // Otherwise, transform as a regular node through the chain
40
- const v16Node = this.v15to16.transform(node, { parentNodeTypes: [] });
41
- return this.v16to17.transform(v16Node, { parentNodeTypes: [] });
42
- }
43
- /**
44
- * Transform a single statement from PG15 to PG17
45
- * @deprecated Use transform() instead, which handles all node types
46
- */
47
- transformStatement(stmt) {
48
- const v16Stmt = this.v15to16.transform(stmt, { parentNodeTypes: [] });
49
- return this.v16to17.transform(v16Stmt, { parentNodeTypes: [] });
50
- }
51
- /**
52
- * Type guard to check if a node is a ParseResult
53
- */
54
- isParseResult(node) {
55
- return node && typeof node === 'object' && 'version' in node && 'stmts' in node;
56
- }
57
- }
package/v15-to-v16.d.ts DELETED
@@ -1,633 +0,0 @@
1
- /**
2
- * Auto-generated file with types stripped for better tree-shaking
3
- * DO NOT EDIT - Generated by strip-transformer-types.ts
4
- */
5
- /**
6
- * V15 to V16 AST Transformer
7
- * Transforms PostgreSQL v15 AST nodes to v16 format
8
- */
9
- export declare class V15ToV16Transformer {
10
- transform(node: any, context?: any): any;
11
- visit(node: any, context?: any): any;
12
- getNodeType(node: any): any;
13
- getNodeData(node: any): any;
14
- ParseResult(node: any, context: any): any;
15
- RawStmt(node: any, context: any): {
16
- RawStmt: any;
17
- };
18
- SelectStmt(node: any, context: any): {
19
- SelectStmt: any;
20
- };
21
- A_Expr(node: any, context: any): {
22
- A_Expr: any;
23
- };
24
- InsertStmt(node: any, context: any): {
25
- InsertStmt: any;
26
- };
27
- UpdateStmt(node: any, context: any): {
28
- UpdateStmt: any;
29
- };
30
- DeleteStmt(node: any, context: any): {
31
- DeleteStmt: any;
32
- };
33
- WithClause(node: any, context: any): {
34
- WithClause: any;
35
- };
36
- ResTarget(node: any, context: any): {
37
- ResTarget: any;
38
- };
39
- BoolExpr(node: any, context: any): {
40
- BoolExpr: any;
41
- };
42
- FuncCall(node: any, context: any): {
43
- FuncCall: any;
44
- } | {
45
- ColumnRef: any;
46
- };
47
- FuncExpr(node: any, context: any): {
48
- FuncExpr: any;
49
- };
50
- A_Const(node: any, context: any): {
51
- A_Const: any;
52
- };
53
- ColumnRef(node: any, context: any): {
54
- ColumnRef: any;
55
- } | {
56
- FuncCall: any;
57
- };
58
- TypeName(node: any, context: any): {
59
- TypeName: any;
60
- };
61
- Alias(node: any, context: any): {
62
- Alias: any;
63
- };
64
- RangeVar(node: any, context: any): {
65
- RangeVar: any;
66
- } | {
67
- RangeFunction: any;
68
- };
69
- A_ArrayExpr(node: any, context: any): {
70
- A_ArrayExpr: any;
71
- };
72
- A_Indices(node: any, context: any): {
73
- A_Indices: any;
74
- };
75
- A_Indirection(node: any, context: any): {
76
- A_Indirection: any;
77
- };
78
- A_Star(node: any, context: any): {
79
- A_Star: any;
80
- };
81
- CaseExpr(node: any, context: any): {
82
- CaseExpr: any;
83
- };
84
- CoalesceExpr(node: any, context: any): {
85
- CoalesceExpr: any;
86
- };
87
- TypeCast(node: any, context: any): {
88
- TypeCast: any;
89
- };
90
- CollateClause(node: any, context: any): {
91
- CollateClause: any;
92
- };
93
- BooleanTest(node: any, context: any): {
94
- BooleanTest: any;
95
- };
96
- NullTest(node: any, context: any): {
97
- NullTest: any;
98
- };
99
- String(node: any, context: any): {
100
- String: any;
101
- };
102
- Integer(node: any, context: any): {
103
- Integer: any;
104
- };
105
- Float(node: any, context: any): {
106
- Float: any;
107
- };
108
- Boolean(node: any, context: any): {
109
- Boolean: any;
110
- };
111
- BitString(node: any, context: any): {
112
- BitString: any;
113
- };
114
- Null(node: any, context: any): {
115
- Null: {};
116
- };
117
- List(node: any, context: any): {
118
- List: any;
119
- };
120
- CreateStmt(node: any, context: any): {
121
- CreateStmt: any;
122
- };
123
- ColumnDef(node: any, context: any): {
124
- ColumnDef: any;
125
- };
126
- Constraint(node: any, context: any): {
127
- Constraint: any;
128
- };
129
- SubLink(node: any, context: any): {
130
- SubLink: any;
131
- };
132
- CaseWhen(node: any, context: any): {
133
- CaseWhen: any;
134
- };
135
- WindowDef(node: any, context: any): {
136
- WindowDef: any;
137
- };
138
- SortBy(node: any, context: any): {
139
- SortBy: any;
140
- };
141
- GroupingSet(node: any, context: any): {
142
- GroupingSet: any;
143
- };
144
- CommonTableExpr(node: any, context: any): {
145
- CommonTableExpr: any;
146
- };
147
- ParamRef(node: any, context: any): {
148
- ParamRef: any;
149
- };
150
- LockingClause(node: any, context: any): {
151
- LockingClause: any;
152
- };
153
- MinMaxExpr(node: any, context: any): {
154
- MinMaxExpr: any;
155
- };
156
- RowExpr(node: any, context: any): {
157
- RowExpr: any;
158
- };
159
- OpExpr(node: any, context: any): {
160
- OpExpr: any;
161
- };
162
- DistinctExpr(node: any, context: any): {
163
- DistinctExpr: any;
164
- };
165
- NullIfExpr(node: any, context: any): {
166
- NullIfExpr: any;
167
- };
168
- ScalarArrayOpExpr(node: any, context: any): {
169
- ScalarArrayOpExpr: any;
170
- };
171
- Aggref(node: any, context: any): {
172
- Aggref: any;
173
- };
174
- WindowFunc(node: any, context: any): {
175
- WindowFunc: any;
176
- };
177
- FieldSelect(node: any, context: any): {
178
- FieldSelect: any;
179
- };
180
- RelabelType(node: any, context: any): {
181
- RelabelType: any;
182
- };
183
- CoerceViaIO(node: any, context: any): {
184
- CoerceViaIO: any;
185
- };
186
- ArrayCoerceExpr(node: any, context: any): {
187
- ArrayCoerceExpr: any;
188
- };
189
- ConvertRowtypeExpr(node: any, context: any): {
190
- ConvertRowtypeExpr: any;
191
- };
192
- NamedArgExpr(node: any, context: any): {
193
- NamedArgExpr: any;
194
- };
195
- ViewStmt(node: any, context: any): {
196
- ViewStmt: any;
197
- };
198
- IndexStmt(node: any, context: any): {
199
- IndexStmt: any;
200
- };
201
- IndexElem(node: any, context: any): {
202
- IndexElem: any;
203
- };
204
- PartitionElem(node: any, context: any): {
205
- PartitionElem: any;
206
- };
207
- PartitionCmd(node: any, context: any): {
208
- PartitionCmd: any;
209
- };
210
- JoinExpr(node: any, context: any): {
211
- JoinExpr: any;
212
- };
213
- FromExpr(node: any, context: any): {
214
- FromExpr: any;
215
- };
216
- TransactionStmt(node: any, context: any): {
217
- TransactionStmt: any;
218
- };
219
- VariableSetStmt(node: any, context: any): {
220
- VariableSetStmt: any;
221
- };
222
- VariableShowStmt(node: any, context: any): {
223
- VariableShowStmt: any;
224
- };
225
- CreateSchemaStmt(node: any, context: any): {
226
- CreateSchemaStmt: any;
227
- };
228
- RoleSpec(node: any, context: any): {
229
- RoleSpec: any;
230
- };
231
- DropStmt(node: any, context: any): {
232
- DropStmt: any;
233
- };
234
- TruncateStmt(node: any, context: any): {
235
- TruncateStmt: any;
236
- };
237
- ReturnStmt(node: any, context: any): {
238
- ReturnStmt: any;
239
- };
240
- PLAssignStmt(node: any, context: any): {
241
- PLAssignStmt: any;
242
- };
243
- CopyStmt(node: any, context: any): {
244
- CopyStmt: any;
245
- };
246
- AlterTableStmt(node: any, context: any): {
247
- AlterTableStmt: any;
248
- };
249
- AlterTableCmd(node: any, context: any): {
250
- AlterTableCmd: any;
251
- };
252
- CreateFunctionStmt(node: any, context: any): {
253
- CreateFunctionStmt: any;
254
- };
255
- FunctionParameter(node: any, context: any): {
256
- FunctionParameter: any;
257
- };
258
- CompositeTypeStmt(node: any, context: any): {
259
- CompositeTypeStmt: any;
260
- };
261
- DoStmt(node: any, context: any): {
262
- DoStmt: any;
263
- };
264
- DefineStmt(node: any, context: any): {
265
- DefineStmt: any;
266
- };
267
- RangeSubselect(node: any, context: any): {
268
- RangeSubselect: any;
269
- };
270
- CreateEnumStmt(node: any, context: any): {
271
- CreateEnumStmt: any;
272
- };
273
- CreateDomainStmt(node: any, context: any): {
274
- CreateDomainStmt: any;
275
- };
276
- CreateRoleStmt(node: any, context: any): {
277
- CreateRoleStmt: any;
278
- };
279
- DefElem(node: any, context: any): {
280
- DefElem: any;
281
- };
282
- CreateTableSpaceStmt(node: any, context: any): {
283
- CreateTableSpaceStmt: any;
284
- };
285
- DropTableSpaceStmt(node: any, context: any): {
286
- DropTableSpaceStmt: any;
287
- };
288
- AlterTableSpaceOptionsStmt(node: any, context: any): {
289
- AlterTableSpaceOptionsStmt: any;
290
- };
291
- CreateExtensionStmt(node: any, context: any): {
292
- CreateExtensionStmt: any;
293
- };
294
- AlterExtensionStmt(node: any, context: any): {
295
- AlterExtensionStmt: any;
296
- };
297
- CreateFdwStmt(node: any, context: any): {
298
- CreateFdwStmt: any;
299
- };
300
- SetOperationStmt(node: any, context: any): {
301
- SetOperationStmt: any;
302
- };
303
- ReplicaIdentityStmt(node: any, context: any): {
304
- ReplicaIdentityStmt: any;
305
- };
306
- AlterCollationStmt(node: any, context: any): {
307
- AlterCollationStmt: any;
308
- };
309
- AlterDomainStmt(node: any, context: any): {
310
- AlterDomainStmt: any;
311
- };
312
- PrepareStmt(node: any, context: any): {
313
- PrepareStmt: any;
314
- };
315
- ExecuteStmt(node: any, context: any): {
316
- ExecuteStmt: any;
317
- };
318
- DeallocateStmt(node: any, context: any): {
319
- DeallocateStmt: any;
320
- };
321
- NotifyStmt(node: any, context: any): {
322
- NotifyStmt: any;
323
- };
324
- ListenStmt(node: any, context: any): {
325
- ListenStmt: any;
326
- };
327
- UnlistenStmt(node: any, context: any): {
328
- UnlistenStmt: any;
329
- };
330
- CheckPointStmt(node: any, context: any): {
331
- CheckPointStmt: any;
332
- };
333
- LoadStmt(node: any, context: any): {
334
- LoadStmt: any;
335
- };
336
- DiscardStmt(node: any, context: any): {
337
- DiscardStmt: any;
338
- };
339
- CommentStmt(node: any, context: any): {
340
- CommentStmt: any;
341
- };
342
- LockStmt(node: any, context: any): {
343
- LockStmt: any;
344
- };
345
- CreatePolicyStmt(node: any, context: any): {
346
- CreatePolicyStmt: any;
347
- };
348
- AlterPolicyStmt(node: any, context: any): {
349
- AlterPolicyStmt: any;
350
- };
351
- CreateUserMappingStmt(node: any, context: any): {
352
- CreateUserMappingStmt: any;
353
- };
354
- CreateStatsStmt(node: any, context: any): {
355
- CreateStatsStmt: any;
356
- };
357
- StatsElem(node: any, context: any): {
358
- StatsElem: any;
359
- };
360
- CreatePublicationStmt(node: any, context: any): {
361
- CreatePublicationStmt: any;
362
- };
363
- CreateSubscriptionStmt(node: any, context: any): {
364
- CreateSubscriptionStmt: any;
365
- };
366
- AlterPublicationStmt(node: any, context: any): {
367
- AlterPublicationStmt: any;
368
- };
369
- AlterSubscriptionStmt(node: any, context: any): {
370
- AlterSubscriptionStmt: any;
371
- };
372
- DropSubscriptionStmt(node: any, context: any): {
373
- DropSubscriptionStmt: any;
374
- };
375
- InlineCodeBlock(node: any, context: any): {
376
- InlineCodeBlock: any;
377
- };
378
- CallContext(node: any, context: any): {
379
- CallContext: any;
380
- };
381
- ConstraintsSetStmt(node: any, context: any): {
382
- ConstraintsSetStmt: any;
383
- };
384
- AlterSystemStmt(node: any, context: any): {
385
- AlterSystemStmt: any;
386
- };
387
- VacuumRelation(node: any, context: any): {
388
- VacuumRelation: any;
389
- };
390
- DropOwnedStmt(node: any, context: any): {
391
- DropOwnedStmt: any;
392
- };
393
- ReassignOwnedStmt(node: any, context: any): {
394
- ReassignOwnedStmt: any;
395
- };
396
- AlterTSDictionaryStmt(node: any, context: any): {
397
- AlterTSDictionaryStmt: any;
398
- };
399
- AlterTSConfigurationStmt(node: any, context: any): {
400
- AlterTSConfigurationStmt: any;
401
- };
402
- ClosePortalStmt(node: any, context: any): {
403
- ClosePortalStmt: any;
404
- };
405
- FetchStmt(node: any, context: any): {
406
- FetchStmt: any;
407
- };
408
- AlterStatsStmt(node: any, context: any): {
409
- AlterStatsStmt: any;
410
- };
411
- ObjectWithArgs(node: any, context: any): {
412
- ObjectWithArgs: any;
413
- };
414
- AlterOperatorStmt(node: any, context: any): {
415
- AlterOperatorStmt: any;
416
- };
417
- AlterFdwStmt(node: any, context: any): {
418
- AlterFdwStmt: any;
419
- };
420
- CreateForeignServerStmt(node: any, context: any): {
421
- CreateForeignServerStmt: any;
422
- };
423
- AlterForeignServerStmt(node: any, context: any): {
424
- AlterForeignServerStmt: any;
425
- };
426
- AlterUserMappingStmt(node: any, context: any): {
427
- AlterUserMappingStmt: any;
428
- };
429
- DropUserMappingStmt(node: any, context: any): {
430
- DropUserMappingStmt: any;
431
- };
432
- ImportForeignSchemaStmt(node: any, context: any): {
433
- ImportForeignSchemaStmt: any;
434
- };
435
- ClusterStmt(node: any, context: any): {
436
- ClusterStmt: any;
437
- };
438
- VacuumStmt(node: any, context: any): {
439
- VacuumStmt: any;
440
- };
441
- ExplainStmt(node: any, context: any): {
442
- ExplainStmt: any;
443
- };
444
- ReindexStmt(node: any, context: any): {
445
- ReindexStmt: any;
446
- };
447
- CallStmt(node: any, context: any): {
448
- CallStmt: any;
449
- };
450
- CreatedbStmt(node: any, context: any): {
451
- CreatedbStmt: any;
452
- };
453
- DropdbStmt(node: any, context: any): {
454
- DropdbStmt: any;
455
- };
456
- RenameStmt(node: any, context: any): {
457
- RenameStmt: any;
458
- };
459
- AlterOwnerStmt(node: any, context: any): {
460
- AlterOwnerStmt: any;
461
- };
462
- GrantRoleStmt(node: any, context: any): {
463
- GrantRoleStmt: any;
464
- };
465
- SecLabelStmt(node: any, context: any): {
466
- SecLabelStmt: any;
467
- };
468
- AlterDefaultPrivilegesStmt(node: any, context: any): {
469
- AlterDefaultPrivilegesStmt: any;
470
- };
471
- CreateConversionStmt(node: any, context: any): {
472
- CreateConversionStmt: any;
473
- };
474
- CreateCastStmt(node: any, context: any): {
475
- CreateCastStmt: any;
476
- };
477
- CreatePLangStmt(node: any, context: any): {
478
- CreatePLangStmt: any;
479
- };
480
- CreateTransformStmt(node: any, context: any): {
481
- CreateTransformStmt: any;
482
- };
483
- CreateTrigStmt(node: any, context: any): {
484
- CreateTrigStmt: any;
485
- };
486
- TriggerTransition(node: any, context: any): {
487
- TriggerTransition: any;
488
- };
489
- CreateEventTrigStmt(node: any, context: any): {
490
- CreateEventTrigStmt: any;
491
- };
492
- AlterEventTrigStmt(node: any, context: any): {
493
- AlterEventTrigStmt: any;
494
- };
495
- CreateOpClassStmt(node: any, context: any): {
496
- CreateOpClassStmt: any;
497
- };
498
- CreateOpFamilyStmt(node: any, context: any): {
499
- CreateOpFamilyStmt: any;
500
- };
501
- AlterOpFamilyStmt(node: any, context: any): {
502
- AlterOpFamilyStmt: any;
503
- };
504
- MergeStmt(node: any, context: any): {
505
- MergeStmt: any;
506
- };
507
- AlterTableMoveAllStmt(node: any, context: any): {
508
- AlterTableMoveAllStmt: any;
509
- };
510
- CreateSeqStmt(node: any, context: any): {
511
- CreateSeqStmt: any;
512
- };
513
- AlterSeqStmt(node: any, context: any): {
514
- AlterSeqStmt: any;
515
- };
516
- CreateRangeStmt(node: any, context: any): {
517
- CreateRangeStmt: any;
518
- };
519
- AlterEnumStmt(node: any, context: any): {
520
- AlterEnumStmt: any;
521
- };
522
- AlterTypeStmt(node: any, context: any): {
523
- AlterTypeStmt: any;
524
- };
525
- AlterRoleStmt(node: any, context: any): {
526
- AlterRoleStmt: any;
527
- };
528
- CreateTableAsStmt(node: any, context: any): {
529
- CreateTableAsStmt: any;
530
- };
531
- RefreshMatViewStmt(node: any, context: any): {
532
- RefreshMatViewStmt: any;
533
- };
534
- AccessPriv(node: any, context: any): {
535
- AccessPriv: any;
536
- };
537
- AlterDatabaseStmt(node: any, context: any): {
538
- AlterDatabaseStmt: any;
539
- };
540
- AlterDatabaseRefreshCollStmt(node: any, context: any): {
541
- AlterDatabaseRefreshCollStmt: any;
542
- };
543
- AlterDatabaseSetStmt(node: any, context: any): {
544
- AlterDatabaseSetStmt: any;
545
- };
546
- DeclareCursorStmt(node: any, context: any): {
547
- DeclareCursorStmt: any;
548
- };
549
- PublicationObjSpec(node: any, context: any): {
550
- PublicationObjSpec: any;
551
- };
552
- PublicationTable(node: any, context: any): {
553
- PublicationTable: any;
554
- };
555
- CreateAmStmt(node: any, context: any): {
556
- CreateAmStmt: any;
557
- };
558
- IntoClause(node: any, context: any): {
559
- IntoClause: any;
560
- };
561
- OnConflictExpr(node: any, context: any): {
562
- OnConflictExpr: any;
563
- };
564
- ScanToken(node: any, context: any): {
565
- ScanToken: any;
566
- };
567
- CreateOpClassItem(node: any, context: any): {
568
- CreateOpClassItem: any;
569
- };
570
- Var(node: any, context: any): {
571
- Var: any;
572
- };
573
- TableFunc(node: any, context: any): {
574
- TableFunc: any;
575
- };
576
- RangeTableFunc(node: any, context: any): {
577
- RangeTableFunc: any;
578
- };
579
- RangeTableFuncCol(node: any, context: any): {
580
- RangeTableFuncCol: any;
581
- };
582
- RangeFunction(node: any, context: any): {
583
- RangeFunction: any;
584
- };
585
- RangeTableSample(node: any, context: any): {
586
- RangeTableSample: any;
587
- };
588
- XmlSerialize(node: any, context: any): {
589
- XmlSerialize: any;
590
- };
591
- RuleStmt(node: any, context: any): {
592
- RuleStmt: any;
593
- };
594
- SQLValueFunction(node: any, context: any): {
595
- SQLValueFunction: any;
596
- };
597
- GroupingFunc(node: any, context: any): {
598
- GroupingFunc: any;
599
- };
600
- MultiAssignRef(node: any, context: any): {
601
- MultiAssignRef: any;
602
- };
603
- SetToDefault(node: any, context: any): {
604
- SetToDefault: any;
605
- };
606
- CurrentOfExpr(node: any, context: any): {
607
- CurrentOfExpr: any;
608
- };
609
- TableLikeClause(node: any, context: any): {
610
- TableLikeClause: any;
611
- };
612
- AlterFunctionStmt(node: any, context: any): {
613
- AlterFunctionStmt: any;
614
- };
615
- AlterObjectSchemaStmt(node: any, context: any): {
616
- AlterObjectSchemaStmt: any;
617
- };
618
- CreateForeignTableStmt(node: any, context: any): {
619
- CreateForeignTableStmt: any;
620
- };
621
- DropRoleStmt(node: any, context: any): {
622
- DropRoleStmt: any;
623
- };
624
- XmlExpr(node: any, context: any): {
625
- XmlExpr: any;
626
- };
627
- AlterRoleSetStmt(node: any, context: any): {
628
- AlterRoleSetStmt: any;
629
- };
630
- GrantStmt(node: any, context: any): {
631
- GrantStmt: any;
632
- };
633
- }