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,61 +0,0 @@
1
- "use strict";
2
- /**
3
- * Auto-generated file with types stripped for better tree-shaking
4
- * DO NOT EDIT - Generated by strip-direct-transformer-types.ts
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.PG15ToPG17Transformer = void 0;
8
- const v15_to_v16_1 = require("./v15-to-v16");
9
- const v16_to_v17_1 = require("./v16-to-v17");
10
- /**
11
- * Direct transformer from PG15 to PG17
12
- * This transformer chains v15->v16->v17 transformations
13
- */
14
- class PG15ToPG17Transformer {
15
- v15to16 = new v15_to_v16_1.V15ToV16Transformer();
16
- v16to17 = new v16_to_v17_1.V16ToV17Transformer();
17
- transform(node) {
18
- // If it's a ParseResult, handle it specially
19
- if (this.isParseResult(node)) {
20
- // First transform statements from v15 to v16
21
- const v16Stmts = node.stmts.map((stmtWrapper) => {
22
- if (stmtWrapper.stmt) {
23
- const v16Stmt = this.v15to16.transform(stmtWrapper.stmt, { parentNodeTypes: [] });
24
- return { ...stmtWrapper, stmt: v16Stmt };
25
- }
26
- return stmtWrapper;
27
- });
28
- // Then transform from v16 to v17
29
- const v17Stmts = v16Stmts.map((stmtWrapper) => {
30
- if (stmtWrapper.stmt) {
31
- const v17Stmt = this.v16to17.transform(stmtWrapper.stmt, { parentNodeTypes: [] });
32
- return { ...stmtWrapper, stmt: v17Stmt };
33
- }
34
- return stmtWrapper;
35
- });
36
- return {
37
- ...node,
38
- version: 170004, // PG17 version
39
- stmts: v17Stmts
40
- };
41
- }
42
- // Otherwise, transform as a regular node through the chain
43
- const v16Node = this.v15to16.transform(node, { parentNodeTypes: [] });
44
- return this.v16to17.transform(v16Node, { parentNodeTypes: [] });
45
- }
46
- /**
47
- * Transform a single statement from PG15 to PG17
48
- * @deprecated Use transform() instead, which handles all node types
49
- */
50
- transformStatement(stmt) {
51
- const v16Stmt = this.v15to16.transform(stmt, { parentNodeTypes: [] });
52
- return this.v16to17.transform(v16Stmt, { parentNodeTypes: [] });
53
- }
54
- /**
55
- * Type guard to check if a node is a ParseResult
56
- */
57
- isParseResult(node) {
58
- return node && typeof node === 'object' && 'version' in node && 'stmts' in node;
59
- }
60
- }
61
- exports.PG15ToPG17Transformer = PG15ToPG17Transformer;