pgsql-deparser 13.3.13 → 13.3.15

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [13.3.15](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.14...pgsql-deparser@13.3.15) (2022-12-22)
7
+
8
+ **Note:** Version bump only for package pgsql-deparser
9
+
10
+
11
+
12
+
13
+
14
+ ## [13.3.14](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.13...pgsql-deparser@13.3.14) (2022-09-14)
15
+
16
+ **Note:** Version bump only for package pgsql-deparser
17
+
18
+
19
+
20
+
21
+
6
22
  ## [13.3.13](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.12...pgsql-deparser@13.3.13) (2022-08-31)
7
23
 
8
24
  **Note:** Version bump only for package pgsql-deparser
package/main/deparser.js CHANGED
@@ -1051,7 +1051,15 @@ var Deparser = /*#__PURE__*/function () {
1051
1051
  output.push("(".concat(colnames.join(', '), ")"));
1052
1052
  }
1053
1053
 
1054
- output.push((0, _util.format)('AS (%s)', this.deparse(node.ctequery)));
1054
+ output.push('AS');
1055
+
1056
+ if (node.ctematerialized === 'CTEMaterializeAlways') {
1057
+ output.push('MATERIALIZED');
1058
+ } else if (node.ctematerialized === 'CTEMaterializeNever') {
1059
+ output.push('NOT MATERIALIZED');
1060
+ }
1061
+
1062
+ output.push((0, _util.format)('(%s)', this.deparse(node.ctequery)));
1055
1063
  return output.join(' ');
1056
1064
  }
1057
1065
  }, {
@@ -932,7 +932,15 @@ export default class Deparser {
932
932
  output.push(`(${colnames.join(', ')})`);
933
933
  }
934
934
 
935
- output.push(format('AS (%s)', this.deparse(node.ctequery)));
935
+ output.push('AS');
936
+
937
+ if (node.ctematerialized === 'CTEMaterializeAlways') {
938
+ output.push('MATERIALIZED');
939
+ } else if (node.ctematerialized === 'CTEMaterializeNever') {
940
+ output.push('NOT MATERIALIZED');
941
+ }
942
+
943
+ output.push(format('(%s)', this.deparse(node.ctequery)));
936
944
  return output.join(' ');
937
945
  }
938
946
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgsql-deparser",
3
- "version": "13.3.13",
3
+ "version": "13.3.15",
4
4
  "description": "PostgreSQL AST Deparser",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/pyramation/pgsql-parser",
@@ -65,7 +65,7 @@
65
65
  "eslint-plugin-prettier": "^3.1.2",
66
66
  "glob": "7.1.6",
67
67
  "jest": "^25.1.0",
68
- "pgsql-parser": "^13.3.13",
68
+ "pgsql-parser": "^13.4.1",
69
69
  "prettier": "^2.1.2",
70
70
  "regenerator-runtime": "^0.13.2"
71
71
  },
@@ -75,5 +75,5 @@
75
75
  "lodash": "^4.17.20",
76
76
  "pgsql-enums": "^13.1.3"
77
77
  },
78
- "gitHead": "6161588d5b59842d0b5281e8819ddf363a3e3aea"
78
+ "gitHead": "f2353fb8a98b0ac1d637c57d2c8be79f5495b446"
79
79
  }