pgsql-deparser 13.3.3 → 13.3.4

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,14 @@
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.4](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.3...pgsql-deparser@13.3.4) (2022-04-19)
7
+
8
+ **Note:** Version bump only for package pgsql-deparser
9
+
10
+
11
+
12
+
13
+
6
14
  ## [13.3.3](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.2...pgsql-deparser@13.3.3) (2022-04-19)
7
15
 
8
16
  **Note:** Version bump only for package pgsql-deparser
package/main/deparser.js CHANGED
@@ -3907,6 +3907,23 @@ var Deparser = /*#__PURE__*/function () {
3907
3907
  return output.join(' ');
3908
3908
  }
3909
3909
  }, {
3910
+ key: 'CallStmt',
3911
+ value: function CallStmt(node) {
3912
+ var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3913
+ var output = ['CALL'];
3914
+ output.push(this.deparse(node.funccall.funcname[0]));
3915
+
3916
+ if (node.funccall.args && node.funccall.args.length) {
3917
+ // we have arguments
3918
+ output.push('(' + this.list(node.funccall.args, ', ', '', context) + ')');
3919
+ } else {
3920
+ // just close parens
3921
+ output.push('()');
3922
+ }
3923
+
3924
+ return output.join(' ');
3925
+ }
3926
+ }, {
3910
3927
  key: "deparseFrameOptions",
3911
3928
  value: function deparseFrameOptions(options, refName, startOffset, endOffset) {
3912
3929
  // https://github.com/pganalyze/libpg_query/blob/442b1748d06364ecd3779bc558899176c02efaf0/src/postgres/include/nodes/parsenodes.h#L505-L522
@@ -3582,6 +3582,21 @@ export default class Deparser {
3582
3582
  return output.join(' ');
3583
3583
  }
3584
3584
 
3585
+ ['CallStmt'](node, context = {}) {
3586
+ const output = ['CALL'];
3587
+ output.push(this.deparse(node.funccall.funcname[0]));
3588
+
3589
+ if (node.funccall.args && node.funccall.args.length) {
3590
+ // we have arguments
3591
+ output.push('(' + this.list(node.funccall.args, ', ', '', context) + ')');
3592
+ } else {
3593
+ // just close parens
3594
+ output.push('()');
3595
+ }
3596
+
3597
+ return output.join(' ');
3598
+ }
3599
+
3585
3600
  deparseFrameOptions(options, refName, startOffset, endOffset) {
3586
3601
  // https://github.com/pganalyze/libpg_query/blob/442b1748d06364ecd3779bc558899176c02efaf0/src/postgres/include/nodes/parsenodes.h#L505-L522
3587
3602
  const FRAMEOPTION_NONDEFAULT = 0x00001;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgsql-deparser",
3
- "version": "13.3.3",
3
+ "version": "13.3.4",
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.3",
68
+ "pgsql-parser": "^13.3.4",
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.2"
77
77
  },
78
- "gitHead": "33e5e0562136c7b84b476594298fbadc8cae957b"
78
+ "gitHead": "39108ed988f69a32d7465d8471d3ce9fd2a3b521"
79
79
  }