pgsql-deparser
Advanced tools
Comparing version 13.6.3 to 13.7.0
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "Deparser", { | ||
enumerable: true, | ||
get: function get() { | ||
return _deparser["default"]; | ||
} | ||
}); | ||
exports.deparse = void 0; | ||
var _deparser = _interopRequireDefault(require("./deparser")); | ||
var deparse = _deparser["default"].deparse; | ||
exports.deparse = deparse; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Deparser = exports.deparse = void 0; | ||
const deparser_1 = __importDefault(require("./deparser")); | ||
exports.Deparser = deparser_1.default; | ||
const deparse = deparser_1.default.deparse; | ||
exports.deparse = deparse; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
/* eslint-disable no-restricted-syntax */ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cleanTreeWithStmt = exports.cleanTree = exports.transform = exports.cleanLines = void 0; | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
/* eslint-disable no-restricted-syntax */ | ||
var cleanLines = function cleanLines(sql) { | ||
return sql.split('\n').map(function (l) { | ||
return l.trim(); | ||
}).filter(function (a) { | ||
return a; | ||
}).join('\n'); | ||
const cleanLines = (sql) => { | ||
return sql | ||
.split('\n') | ||
.map((l) => l.trim()) | ||
.filter((a) => a) | ||
.join('\n'); | ||
}; | ||
exports.cleanLines = cleanLines; | ||
var transform = function transform(obj, props) { | ||
var copy = null; // Handle the 3 simple types, and null or undefined | ||
if (obj == null || (0, _typeof2["default"])(obj) !== 'object') { | ||
return obj; | ||
} // Handle Date | ||
if (obj instanceof Date) { | ||
copy = new Date(); | ||
copy.setTime(obj.getTime()); | ||
return copy; | ||
} // Handle Array | ||
if (obj instanceof Array) { | ||
copy = []; | ||
for (var i = 0, len = obj.length; i < len; i++) { | ||
copy[i] = transform(obj[i], props); | ||
const transform = (obj, props) => { | ||
let copy = null; | ||
// Handle the 3 simple types, and null or undefined | ||
if (obj == null || typeof obj !== 'object') { | ||
return obj; | ||
} | ||
return copy; | ||
} // Handle Object | ||
if (obj instanceof Object || (0, _typeof2["default"])(obj) === 'object') { | ||
copy = {}; | ||
for (var attr in obj) { | ||
if (obj.hasOwnProperty(attr)) { | ||
if (props.hasOwnProperty(attr)) { | ||
if (typeof props[attr] === 'function') { | ||
copy[attr] = props[attr](obj[attr]); | ||
} else if (props[attr].hasOwnProperty(obj[attr])) { | ||
copy[attr] = props[attr][obj[attr]]; | ||
} else { | ||
copy[attr] = transform(obj[attr], props); | ||
} | ||
} else { | ||
copy[attr] = transform(obj[attr], props); | ||
// Handle Date | ||
if (obj instanceof Date) { | ||
copy = new Date(); | ||
copy.setTime(obj.getTime()); | ||
return copy; | ||
} | ||
// Handle Array | ||
if (obj instanceof Array) { | ||
copy = []; | ||
for (let i = 0, len = obj.length; i < len; i++) { | ||
copy[i] = (0, exports.transform)(obj[i], props); | ||
} | ||
} else { | ||
copy[attr] = transform(obj[attr], props); | ||
} | ||
return copy; | ||
} | ||
return copy; | ||
} | ||
throw new Error("Unable to copy obj! Its type isn't supported."); | ||
// Handle Object | ||
if (obj instanceof Object || typeof obj === 'object') { | ||
copy = {}; | ||
for (const attr in obj) { | ||
if (obj.hasOwnProperty(attr)) { | ||
if (props.hasOwnProperty(attr)) { | ||
if (typeof props[attr] === 'function') { | ||
copy[attr] = props[attr](obj[attr]); | ||
} | ||
else if (props[attr].hasOwnProperty(obj[attr])) { | ||
copy[attr] = props[attr][obj[attr]]; | ||
} | ||
else { | ||
copy[attr] = (0, exports.transform)(obj[attr], props); | ||
} | ||
} | ||
else { | ||
copy[attr] = (0, exports.transform)(obj[attr], props); | ||
} | ||
} | ||
else { | ||
copy[attr] = (0, exports.transform)(obj[attr], props); | ||
} | ||
} | ||
return copy; | ||
} | ||
throw new Error("Unable to copy obj! Its type isn't supported."); | ||
}; | ||
exports.transform = transform; | ||
var noop = function noop() { | ||
return undefined; | ||
}; | ||
var cleanTree = function cleanTree(tree) { | ||
return transform(tree, { | ||
stmt_len: noop, | ||
stmt_location: noop, | ||
location: noop, | ||
DefElem: function DefElem(obj) { | ||
if (obj.defname === 'as') { | ||
if (Array.isArray(obj.arg) && obj.arg.length) { | ||
// function | ||
obj.arg[0].String.str = obj.arg[0].String.str.trim(); | ||
} else if (obj.arg.List && obj.arg.List.items) { | ||
// function | ||
obj.arg.List.items[0].String.str = obj.arg.List.items[0].String.str.trim(); | ||
} else { | ||
// do stmt | ||
obj.arg.String.str = obj.arg.String.str.trim(); | ||
const noop = () => undefined; | ||
const cleanTree = (tree) => { | ||
return (0, exports.transform)(tree, { | ||
stmt_len: noop, | ||
stmt_location: noop, | ||
location: noop, | ||
DefElem: (obj) => { | ||
if (obj.defname === 'as') { | ||
if (Array.isArray(obj.arg) && obj.arg.length) { | ||
// function | ||
obj.arg[0].String.str = obj.arg[0].String.str.trim(); | ||
} | ||
else if (obj.arg.List && obj.arg.List.items) { | ||
// function | ||
obj.arg.List.items[0].String.str = obj.arg.List.items[0].String.str.trim(); | ||
} | ||
else { | ||
// do stmt | ||
obj.arg.String.str = obj.arg.String.str.trim(); | ||
} | ||
return (0, exports.cleanTree)(obj); | ||
} | ||
else { | ||
return (0, exports.cleanTree)(obj); | ||
} | ||
} | ||
return cleanTree(obj); | ||
} else { | ||
return cleanTree(obj); | ||
} | ||
} | ||
}); | ||
}); | ||
}; | ||
exports.cleanTree = cleanTree; | ||
var cleanTreeWithStmt = function cleanTreeWithStmt(tree) { | ||
return transform(tree, { | ||
stmt_location: noop, | ||
location: noop | ||
}); | ||
const cleanTreeWithStmt = (tree) => { | ||
return (0, exports.transform)(tree, { | ||
stmt_location: noop, | ||
location: noop | ||
}); | ||
}; | ||
exports.cleanTreeWithStmt = cleanTreeWithStmt; | ||
exports.cleanTreeWithStmt = cleanTreeWithStmt; |
import Deparser from './deparser'; | ||
const deparse = Deparser.deparse; | ||
export { deparse, Deparser }; | ||
export { deparse, Deparser }; |
/* eslint-disable no-restricted-syntax */ | ||
export const cleanLines = sql => { | ||
return sql.split('\n').map(l => l.trim()).filter(a => a).join('\n'); | ||
export const cleanLines = (sql) => { | ||
return sql | ||
.split('\n') | ||
.map((l) => l.trim()) | ||
.filter((a) => a) | ||
.join('\n'); | ||
}; | ||
export const transform = (obj, props) => { | ||
let copy = null; // Handle the 3 simple types, and null or undefined | ||
if (obj == null || typeof obj !== 'object') { | ||
return obj; | ||
} // Handle Date | ||
if (obj instanceof Date) { | ||
copy = new Date(); | ||
copy.setTime(obj.getTime()); | ||
return copy; | ||
} // Handle Array | ||
if (obj instanceof Array) { | ||
copy = []; | ||
for (let i = 0, len = obj.length; i < len; i++) { | ||
copy[i] = transform(obj[i], props); | ||
let copy = null; | ||
// Handle the 3 simple types, and null or undefined | ||
if (obj == null || typeof obj !== 'object') { | ||
return obj; | ||
} | ||
return copy; | ||
} // Handle Object | ||
if (obj instanceof Object || typeof obj === 'object') { | ||
copy = {}; | ||
for (const attr in obj) { | ||
if (obj.hasOwnProperty(attr)) { | ||
if (props.hasOwnProperty(attr)) { | ||
if (typeof props[attr] === 'function') { | ||
copy[attr] = props[attr](obj[attr]); | ||
} else if (props[attr].hasOwnProperty(obj[attr])) { | ||
copy[attr] = props[attr][obj[attr]]; | ||
} else { | ||
copy[attr] = transform(obj[attr], props); | ||
} | ||
} else { | ||
copy[attr] = transform(obj[attr], props); | ||
// Handle Date | ||
if (obj instanceof Date) { | ||
copy = new Date(); | ||
copy.setTime(obj.getTime()); | ||
return copy; | ||
} | ||
// Handle Array | ||
if (obj instanceof Array) { | ||
copy = []; | ||
for (let i = 0, len = obj.length; i < len; i++) { | ||
copy[i] = transform(obj[i], props); | ||
} | ||
} else { | ||
copy[attr] = transform(obj[attr], props); | ||
} | ||
return copy; | ||
} | ||
return copy; | ||
} | ||
throw new Error("Unable to copy obj! Its type isn't supported."); | ||
// Handle Object | ||
if (obj instanceof Object || typeof obj === 'object') { | ||
copy = {}; | ||
for (const attr in obj) { | ||
if (obj.hasOwnProperty(attr)) { | ||
if (props.hasOwnProperty(attr)) { | ||
if (typeof props[attr] === 'function') { | ||
copy[attr] = props[attr](obj[attr]); | ||
} | ||
else if (props[attr].hasOwnProperty(obj[attr])) { | ||
copy[attr] = props[attr][obj[attr]]; | ||
} | ||
else { | ||
copy[attr] = transform(obj[attr], props); | ||
} | ||
} | ||
else { | ||
copy[attr] = transform(obj[attr], props); | ||
} | ||
} | ||
else { | ||
copy[attr] = transform(obj[attr], props); | ||
} | ||
} | ||
return copy; | ||
} | ||
throw new Error("Unable to copy obj! Its type isn't supported."); | ||
}; | ||
const noop = () => undefined; | ||
export const cleanTree = tree => { | ||
return transform(tree, { | ||
stmt_len: noop, | ||
stmt_location: noop, | ||
location: noop, | ||
DefElem: obj => { | ||
if (obj.defname === 'as') { | ||
if (Array.isArray(obj.arg) && obj.arg.length) { | ||
// function | ||
obj.arg[0].String.str = obj.arg[0].String.str.trim(); | ||
} else if (obj.arg.List && obj.arg.List.items) { | ||
// function | ||
obj.arg.List.items[0].String.str = obj.arg.List.items[0].String.str.trim(); | ||
} else { | ||
// do stmt | ||
obj.arg.String.str = obj.arg.String.str.trim(); | ||
export const cleanTree = (tree) => { | ||
return transform(tree, { | ||
stmt_len: noop, | ||
stmt_location: noop, | ||
location: noop, | ||
DefElem: (obj) => { | ||
if (obj.defname === 'as') { | ||
if (Array.isArray(obj.arg) && obj.arg.length) { | ||
// function | ||
obj.arg[0].String.str = obj.arg[0].String.str.trim(); | ||
} | ||
else if (obj.arg.List && obj.arg.List.items) { | ||
// function | ||
obj.arg.List.items[0].String.str = obj.arg.List.items[0].String.str.trim(); | ||
} | ||
else { | ||
// do stmt | ||
obj.arg.String.str = obj.arg.String.str.trim(); | ||
} | ||
return cleanTree(obj); | ||
} | ||
else { | ||
return cleanTree(obj); | ||
} | ||
} | ||
return cleanTree(obj); | ||
} else { | ||
return cleanTree(obj); | ||
} | ||
} | ||
}); | ||
}); | ||
}; | ||
export const cleanTreeWithStmt = tree => { | ||
return transform(tree, { | ||
stmt_location: noop, | ||
location: noop | ||
}); | ||
}; | ||
export const cleanTreeWithStmt = (tree) => { | ||
return transform(tree, { | ||
stmt_location: noop, | ||
location: noop | ||
}); | ||
}; |
{ | ||
"name": "pgsql-deparser", | ||
"version": "13.6.3", | ||
"version": "13.7.0", | ||
"description": "PostgreSQL AST Deparser", | ||
@@ -10,2 +10,3 @@ "author": "Dan Lynch <pyramation@gmail.com>", | ||
"module": "module/index.js", | ||
"typings": "types/index.d.ts", | ||
"directories": { | ||
@@ -16,4 +17,6 @@ "lib": "src", | ||
"files": [ | ||
"main", | ||
"module" | ||
"types", | ||
"module", | ||
"src", | ||
"main" | ||
], | ||
@@ -38,9 +41,10 @@ "keywords": [ | ||
"scripts": { | ||
"build:main": "cross-env BABEL_ENV=production babel src --out-dir main --delete-dir-on-start", | ||
"build:module": "cross-env MODULE=true babel src --out-dir module --delete-dir-on-start", | ||
"build:main": "yarn tsc -p tsconfig.json --outDir main --module commonjs", | ||
"build:module": "yarn tsc -p tsconfig.json --outDir module --module es2022", | ||
"build": "npm run build:module && npm run build:main", | ||
"buidl": "npm run build", | ||
"buidl:clean": "npm run clean && npm run buidl", | ||
"prepare": "npm run build", | ||
"lint": "eslint src --fix", | ||
"dev": "cross-env NODE_ENV=development babel-node src/index", | ||
"watch": "cross-env NODE_ENV=development babel-watch src/index", | ||
"lint": "eslint .", | ||
"format": "eslint . --fix", | ||
"test": "jest", | ||
@@ -53,30 +57,37 @@ "test:watch": "jest --watch", | ||
}, | ||
"jest": { | ||
"preset": "ts-jest", | ||
"testEnvironment": "node", | ||
"transform": { | ||
"^.+\\.ts?$": "ts-jest" | ||
}, | ||
"transformIgnorePatterns": [ | ||
"<rootDir>/node_modules/" | ||
], | ||
"testPathIgnorePatterns": [ | ||
"main/", | ||
"module/", | ||
"types/" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "7.11.6", | ||
"@babel/core": "7.11.6", | ||
"@babel/node": "^7.12.1", | ||
"@babel/plugin-proposal-class-properties": "7.10.4", | ||
"@babel/plugin-proposal-export-default-from": "7.10.4", | ||
"@babel/plugin-proposal-object-rest-spread": "7.11.0", | ||
"@babel/plugin-transform-runtime": "7.11.5", | ||
"@babel/preset-env": "7.11.5", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-eslint": "10.1.0", | ||
"babel-watch": "^7.0.0", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.10.0", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"glob": "7.1.6", | ||
"jest": "^25.1.0", | ||
"pgsql-parser": "^13.7.3", | ||
"prettier": "^2.1.2", | ||
"regenerator-runtime": "^0.13.2" | ||
"@types/jest": "^29.5.0", | ||
"eslint": "8.38.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"esprima": "4.0.1", | ||
"glob": "8.0.3", | ||
"jest": "^29.7.0", | ||
"pgsql-parser": "^13.8.0", | ||
"prettier": "^2.8.7", | ||
"rimraf": "5.0.5", | ||
"ts-jest": "^29.1.0", | ||
"ts-node": "10.9.2", | ||
"typescript": "^5.0.4" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.11.2", | ||
"dotty": "^0.1.0", | ||
"pgsql-enums": "^13.2.2" | ||
"pgsql-enums": "^13.3.0" | ||
}, | ||
"gitHead": "36f81b1aa480303b6e778aa90353962439cbfb18" | ||
"gitHead": "7d1df1770583c50d0fa68dd0cf90beedc9d46e40" | ||
} |
114
README.md
@@ -11,99 +11,49 @@ # pgsql-deparser | ||
</a> | ||
<a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/npm/dt/pgsql-deparser"></a> | ||
<a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/npm/dw/pgsql-deparser"/></a> | ||
<a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/npm/dt/pgsql-deparser"></a> | ||
<a href="https://github.com/launchql/pgsql-parser/blob/main/LICENSE-MIT"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a> | ||
<a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/pgsql-parser?filename=packages%2Fenums%2Fpackage.json"/></a> | ||
<a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/pgsql-deparser?filename=packages%2Fparser%2Fpackage.json"/></a> | ||
</p> | ||
The real PostgreSQL (de)parser for nodejs. The primary objective of this module is to provide symmetric parsing and deparsing of SQL statements. With this module you can modify parts of a SQL query statement and serialize the query tree back into a formatted SQL statement. It uses the *real* [PostgreSQL parser](https://github.com/pganalyze/libpg_query). | ||
`pgsql-deparser` is a streamlined tool designed to convert PostgreSQL Abstract Syntax Trees (AST) back into SQL queries. It is a companion module to [`pgsql-parser`](https://github.com/launchql/pgsql-parser), which is capable of both parsing SQL queries into ASTs and deparsing these ASTs back into SQL. However, unlike `pgsql-parser`, which incorporates the full PostgreSQL parser, `pgsql-deparser` focuses solely on the deparser functionality. This makes it an excellent choice for scenarios where only AST-to-SQL conversion is needed, avoiding the extra overhead associated with the full parsing capabilities. | ||
The main functionality provided by this module is deparsing, which PostgreSQL does not have internally. | ||
## Installation | ||
```sh | ||
npm install pgsql-parser | ||
npm install pgsql-deparser | ||
``` | ||
## Deparser Example | ||
## Key Features | ||
The deparser can be used separately, which removes many deps required for the parser: | ||
- **Lightweight and Pure TypeScript**: Built entirely in TypeScript, `pgsql-deparser` is lightweight and doesn't rely on native dependencies, facilitating easier integration and deployment across various environments. | ||
- **Focused Functionality**: By concentrating on decompiling ASTs to SQL, `pgsql-deparser` offers a specialized, efficient solution for those who need to generate SQL statements from ASTs without the full parsing mechanism. | ||
- **Compatibility**: Ideal for use cases where the AST is already obtained from another source or process, allowing for seamless SQL generation from AST representations. | ||
```js | ||
const { parse } = require('pgsql-parser'); | ||
const { deparse } = require('pgsql-deparser'); | ||
## Deparser Example | ||
const stmts = parse('SELECT * FROM test_table'); | ||
The deparser functionality is provided as a standalone module, enabling you to serialize AST (Abstract Syntax Tree) objects back to SQL statements without the need for the full parsing engine. This separation is particularly beneficial for environments where the native dependencies of the full parser are problematic or unnecessary. For instance, if you already have an AST representation of your SQL query and merely need to convert it back to a SQL string, you can use the pgsql-deparser module directly. This module is implemented in pure TypeScript, avoiding the need for native bindings and thereby simplifying deployment and compatibility across different environments. | ||
stmts[0].RawStmt.stmt.SelectStmt.fromClause[0].RangeVar.relname = 'another_table'; | ||
Here's how you can use the deparser in your TypeScript code: | ||
console.log(deparse(stmts)); | ||
```ts | ||
import { deparse } from 'pgsql-deparser'; | ||
// SELECT * FROM "another_table" | ||
``` | ||
// Assuming `stmts` is an AST object for the query 'SELECT * FROM test_table' | ||
// This could have been obtained from any source, not necessarily the pgsql-parser | ||
const stmts = getAstFromSomewhere(); | ||
## Parser Example | ||
Rewrite part of a SQL query: | ||
```js | ||
const { parse, deparse } = require('pgsql-parser'); | ||
const stmts = parse('SELECT * FROM test_table'); | ||
// Modify the AST as needed | ||
stmts[0].RawStmt.stmt.SelectStmt.fromClause[0].RangeVar.relname = 'another_table'; | ||
// Deparse the modified AST back to a SQL string | ||
console.log(deparse(stmts)); | ||
// SELECT * FROM "another_table" | ||
``` | ||
// Output: SELECT * FROM "another_table" | ||
## CLI | ||
``` | ||
npm install -g pgsql-parser | ||
``` | ||
### usage | ||
## Why Use `pgsql-deparser`? | ||
```sh | ||
pgsql-parser <sqlfile> | ||
``` | ||
`pgsql-deparser` is particularly useful in development environments where native dependencies are problematic or in applications where only the deparser functionality is required. Its independence from the full `pgsql-parser` package allows for more focused and lightweight SQL generation tasks. | ||
### Documentation | ||
### `parser.parse(sql)` | ||
Parses the query and returns a parse object. | ||
### Parameters | ||
| parameter | type | description | | ||
| -------------------- | ------------------ | --------------------------------------------------------- | | ||
| `query` | String | SQL query | | ||
Returns an object in the format: | ||
``` | ||
{ query: <query|Object>, | ||
error: { message: <message|String>, | ||
fileName: <fileName|String>, | ||
lineNumber: <line|Number>, | ||
cursorPosition: <cursor|Number> } | ||
``` | ||
### `parser.deparse(query)` | ||
Deparses the query tree and returns a formatted SQL statement. This function takes as input a query AST | ||
in the same format as the `query` property of on the result of the `parse` method. This is the primary | ||
functionality of this module. | ||
### Parameters | ||
| parameter | type | description | | ||
| -------------------- | ------------------ | --------------------------------------------------------- | | ||
| `query` | Object | Query tree obtained from `parse` | | ||
Returns a normalized formatted SQL string. | ||
## Versions | ||
@@ -122,5 +72,16 @@ | ||
## Related | ||
* [libpg-query-node](https://github.com/pyramation/libpg-query-node) | ||
* [pgsql-parser](https://github.com/launchql/pgsql-parser): The real PostgreSQL parser for Node.js, providing symmetric parsing and deparsing of SQL statements with actual PostgreSQL parser integration. | ||
* [pgsql-deparser](https://github.com/launchql/pgsql-deparser): A streamlined tool designed for converting PostgreSQL ASTs back into SQL queries, focusing solely on deparser functionality to complement `pgsql-parser`. | ||
* [pgsql-enums](https://github.com/launchql/pgsql-enums): A utility package offering easy access to PostgreSQL enumeration types in JSON format, aiding in string and integer conversions of enums used within ASTs to compliment `pgsql-parser` | ||
* [@pgsql/enums](https://github.com/launchql/pgsql-parser/tree/master/packages/enums): Provides PostgreSQL AST enums in TypeScript, enhancing type safety and usability in projects interacting with PostgreSQL AST nodes. | ||
* [@pgsql/types](https://github.com/launchql/pgsql-parser/tree/master/packages/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. | ||
* [@pgsql/utils](https://github.com/launchql/pgsql-parser/tree/master/packages/utils): A utility library for working with PostgreSQL AST node enumerations in a type-safe way, easing enum name and value conversions. | ||
* [pg-proto-parser](https://github.com/launchql/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. | ||
* [libpg-query-node](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. | ||
Thanks @lfittl for building the core `libpg_query` suite: | ||
* [libpg_query](https://github.com/pganalyze/libpg_query) | ||
@@ -132,7 +93,12 @@ * [pg_query](https://github.com/lfittl/pg_query) | ||
Thanks to @zhm for the OG parser that started it all: | ||
* [pg-query-parser](https://github.com/zhm/pg-query-parser) | ||
* [pg-query-native](https://github.com/zhm/node-pg-query-native) | ||
* [Original LICENSE](https://github.com/zhm/pg-query-parser/blob/master/LICENSE.md) | ||
License: https://github.com/zhm/pg-query-parser/blob/master/LICENSE.md | ||
## Disclaimer | ||
Thanks to https://github.com/zhm/pg-query-parser we've been able to start this repo and add a lot of functionality | ||
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. | ||
No developer or entity involved in creating Software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Software code or Software CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
397492
2
13
15
10928
101
- Removed@babel/runtime@^7.11.2
- Removed@babel/runtime@7.26.9(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
Updatedpgsql-enums@^13.3.0