pgsql-deparser 13.16.0 → 14.0.1
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/README.md +88 -45
- package/deparser/deparser.d.ts +301 -0
- package/deparser/deparser.js +10005 -0
- package/deparser/index.d.ts +9 -0
- package/deparser/index.js +17 -0
- package/deparser/utils/list-utils.d.ts +8 -0
- package/deparser/utils/list-utils.js +30 -0
- package/deparser/utils/quote-utils.d.ts +24 -0
- package/deparser/utils/quote-utils.js +89 -0
- package/deparser/utils/sql-formatter.d.ts +16 -0
- package/deparser/utils/sql-formatter.js +40 -0
- package/deparser/visitors/base.d.ts +21 -0
- package/deparser/visitors/base.js +34 -0
- package/esm/deparser/deparser.js +10001 -0
- package/esm/deparser/index.js +13 -0
- package/esm/deparser/utils/list-utils.js +26 -0
- package/esm/deparser/utils/quote-utils.js +85 -0
- package/esm/deparser/utils/sql-formatter.js +36 -0
- package/esm/deparser/visitors/base.js +30 -0
- package/esm/index.js +15 -0
- package/esm/v14-to-v15.js +1220 -0
- package/esm/v14-to-v17-direct.js +67 -0
- package/esm/v15-to-v16.js +2881 -0
- package/esm/v16-to-v17.js +1488 -0
- package/index.d.ts +9 -0
- package/index.js +19 -0
- package/package.json +26 -75
- package/v14-to-v15.d.ts +616 -0
- package/v14-to-v15.js +1224 -0
- package/v14-to-v17-direct.d.ts +23 -0
- package/v14-to-v17-direct.js +71 -0
- package/v15-to-v16.d.ts +627 -0
- package/v15-to-v16.js +2885 -0
- package/v16-to-v17.d.ts +638 -0
- package/v16-to-v17.js +1492 -0
- package/main/deparser.js +0 -3495
- package/main/index.js +0 -10
- package/main/utils/index.js +0 -97
- package/module/deparser.js +0 -3492
- package/module/index.js +0 -3
- package/module/utils/index.js +0 -90
- package/src/deparser.ts +0 -4234
- package/src/index.ts +0 -3
- package/src/utils/index.ts +0 -92
- package/types/deparser.d.ts +0 -119
- package/types/index.d.ts +0 -3
- package/types/utils/index.d.ts +0 -4
package/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deparser for PostgreSQL version 14
|
|
3
|
+
* Auto-generated by generate-version-deparsers.ts
|
|
4
|
+
*/
|
|
5
|
+
import { Node, ParseResult } from '@pgsql/types';
|
|
6
|
+
import { DeparserOptions } from './deparser';
|
|
7
|
+
export declare function deparse(query: Node | Node[] | ParseResult, opts?: DeparserOptions): Promise<string>;
|
|
8
|
+
export declare function deparseSync(query: Node | Node[] | ParseResult, opts?: DeparserOptions): string;
|
|
9
|
+
export { DeparserOptions } from './deparser';
|
package/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Deparser for PostgreSQL version 14
|
|
4
|
+
* Auto-generated by generate-version-deparsers.ts
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.deparse = deparse;
|
|
8
|
+
exports.deparseSync = deparseSync;
|
|
9
|
+
const deparser_1 = require("./deparser");
|
|
10
|
+
const v14_to_v17_direct_1 = require("./v14-to-v17-direct");
|
|
11
|
+
const tx = new v14_to_v17_direct_1.PG14ToPG17Transformer();
|
|
12
|
+
async function deparse(query, opts) {
|
|
13
|
+
const ast17 = tx.transform(query);
|
|
14
|
+
return await (0, deparser_1.deparse)(ast17, opts);
|
|
15
|
+
}
|
|
16
|
+
function deparseSync(query, opts) {
|
|
17
|
+
const ast17 = tx.transform(query);
|
|
18
|
+
return (0, deparser_1.deparseSync)(ast17, opts);
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "pgsql-deparser",
|
|
3
|
-
"version": "13.16.0",
|
|
4
|
-
"description": "PostgreSQL AST Deparser",
|
|
5
2
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
3
|
"homepage": "https://github.com/launchql/pgsql-parser",
|
|
7
|
-
"license": "
|
|
8
|
-
"main": "
|
|
9
|
-
"module": "
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"module": "esm/index.js",
|
|
7
|
+
"types": "index.d.ts",
|
|
8
|
+
"description": "PostgreSQL AST Deparser",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"copy": "copyfiles -f ../../../../LICENSE README.md package.json dist",
|
|
11
|
+
"clean": "rimraf dist",
|
|
12
|
+
"build": "npm run clean && tsc && tsc -p tsconfig.esm.json && npm run copy",
|
|
13
|
+
"publish:pkg": "npm publish --tag pg14"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"directory": "dist"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/launchql/pgsql-parser"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/launchql/pgsql-parser/issues"
|
|
14
25
|
},
|
|
15
|
-
"files": [
|
|
16
|
-
"types",
|
|
17
|
-
"module",
|
|
18
|
-
"src",
|
|
19
|
-
"main"
|
|
20
|
-
],
|
|
21
26
|
"keywords": [
|
|
22
27
|
"sql",
|
|
23
28
|
"postgres",
|
|
@@ -28,63 +33,9 @@
|
|
|
28
33
|
"deparser",
|
|
29
34
|
"database"
|
|
30
35
|
],
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
"repository": {
|
|
35
|
-
"type": "git",
|
|
36
|
-
"url": "https://github.com/launchql/pgsql-parser"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build:main": "yarn tsc -p tsconfig.json --outDir main --module commonjs",
|
|
40
|
-
"build:module": "yarn tsc -p tsconfig.json --outDir module --module es2022",
|
|
41
|
-
"build": "npm run build:module && npm run build:main",
|
|
42
|
-
"buidl": "npm run build",
|
|
43
|
-
"buidl:clean": "npm run clean && npm run buidl",
|
|
44
|
-
"prepare": "npm run build",
|
|
45
|
-
"lint": "eslint .",
|
|
46
|
-
"format": "eslint . --fix",
|
|
47
|
-
"test": "jest",
|
|
48
|
-
"test:watch": "jest --watch",
|
|
49
|
-
"test:debug": "node --inspect node_modules/.bin/jest --runInBand"
|
|
50
|
-
},
|
|
51
|
-
"bugs": {
|
|
52
|
-
"url": "https://github.com/launchql/pgsql-parser/issues"
|
|
53
|
-
},
|
|
54
|
-
"jest": {
|
|
55
|
-
"preset": "ts-jest",
|
|
56
|
-
"testEnvironment": "node",
|
|
57
|
-
"transform": {
|
|
58
|
-
"^.+\\.ts?$": "ts-jest"
|
|
59
|
-
},
|
|
60
|
-
"transformIgnorePatterns": [
|
|
61
|
-
"<rootDir>/node_modules/"
|
|
62
|
-
],
|
|
63
|
-
"testPathIgnorePatterns": [
|
|
64
|
-
"main/",
|
|
65
|
-
"module/",
|
|
66
|
-
"types/"
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
"devDependencies": {
|
|
70
|
-
"@types/jest": "^29.5.0",
|
|
71
|
-
"eslint": "8.38.0",
|
|
72
|
-
"eslint-config-prettier": "^8.8.0",
|
|
73
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
74
|
-
"esprima": "4.0.1",
|
|
75
|
-
"glob": "8.0.3",
|
|
76
|
-
"jest": "^29.7.0",
|
|
77
|
-
"pgsql-parser": "^13.17.0",
|
|
78
|
-
"prettier": "^2.8.7",
|
|
79
|
-
"rimraf": "5.0.5",
|
|
80
|
-
"ts-jest": "^29.1.0",
|
|
81
|
-
"ts-node": "10.9.2",
|
|
82
|
-
"typescript": "^5.0.4"
|
|
83
|
-
},
|
|
36
|
+
"name": "pgsql-deparser",
|
|
37
|
+
"version": "14.0.1",
|
|
84
38
|
"dependencies": {
|
|
85
|
-
"@pgsql/types": "^
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
},
|
|
89
|
-
"gitHead": "85346892e652a57e570562fdac7a768545113619"
|
|
90
|
-
}
|
|
39
|
+
"@pgsql/types": "^14.1.1"
|
|
40
|
+
}
|
|
41
|
+
}
|