pgsql-deparser 17.12.1 → 17.13.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.
package/README.md CHANGED
@@ -1,20 +1,20 @@
1
1
  # pgsql-deparser
2
2
 
3
3
  <p align="center" width="100%">
4
- <img height="120" src="https://github.com/launchql/pgsql-parser/assets/545047/6440fa7d-918b-4a3b-8d1b-755d85de8bea" />
4
+ <img height="120" src="https://github.com/constructive-io/pgsql-parser/assets/545047/6440fa7d-918b-4a3b-8d1b-755d85de8bea" />
5
5
  </p>
6
6
 
7
7
  <p align="center" width="100%">
8
- <a href="https://github.com/launchql/pgsql-parser/actions/workflows/run-tests.yaml">
9
- <img height="20" src="https://github.com/launchql/pgsql-parser/actions/workflows/run-tests.yaml/badge.svg" />
8
+ <a href="https://github.com/constructive-io/pgsql-parser/actions/workflows/run-tests.yaml">
9
+ <img height="20" src="https://github.com/constructive-io/pgsql-parser/actions/workflows/run-tests.yaml/badge.svg" />
10
10
  </a>
11
11
  <a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/npm/dt/pgsql-deparser"></a>
12
12
  <a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/npm/dw/pgsql-deparser"/></a>
13
- <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>
14
- <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%2Fdeparser%2Fpackage.json"/></a>
13
+ <a href="https://github.com/constructive-io/pgsql-parser/blob/main/LICENSE-MIT"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
14
+ <a href="https://www.npmjs.com/package/pgsql-deparser"><img height="20" src="https://img.shields.io/github/package-json/v/constructive-io/pgsql-parser?filename=packages%2Fdeparser%2Fpackage.json"/></a>
15
15
  </p>
16
16
 
17
- `pgsql-deparser` is the lightning-fast, pure TypeScript solution for converting PostgreSQL ASTs back into SQL queries. Perfect companion to [`pgsql-parser`](https://github.com/launchql/pgsql-parser), this focused tool delivers SQL generation without any native dependencies or WebAssembly overhead.
17
+ `pgsql-deparser` is the lightning-fast, pure TypeScript solution for converting PostgreSQL ASTs back into SQL queries. Perfect companion to [`pgsql-parser`](https://github.com/constructive-io/pgsql-parser), this focused tool delivers SQL generation without any native dependencies or WebAssembly overhead.
18
18
 
19
19
  ## Installation
20
20
 
@@ -33,7 +33,7 @@ npm install pgsql-deparser
33
33
 
34
34
  The `pgsql-deparser` module serializes ASTs to SQL in pure TypeScript, avoiding the full parser's native dependencies. It's useful when only SQL string conversion from ASTs is needed, and is written in pure TypeScript for easy cross-environment deployment.
35
35
 
36
- Here's how you can use the deparser in your TypeScript code, using [`@pgsql/utils`](https://github.com/launchql/pgsql-parser/tree/main/packages/utils) to create an AST for `deparse`:
36
+ Here's how you can use the deparser in your TypeScript code, using [`@pgsql/utils`](https://github.com/constructive-io/pgsql-parser/tree/main/packages/utils) to create an AST for `deparse`:
37
37
 
38
38
  ```ts
39
39
  import * as t from '@pgsql/utils';
@@ -131,7 +131,7 @@ const sql2 = deparse(selectAst, { pretty: true });
131
131
  // active = true;
132
132
  ```
133
133
 
134
- For complete documentation and advanced options, see [DEPARSER_USAGE.md](../../DEPARSER_USAGE.md).
134
+ For complete documentation and advanced options, see [DEPARSER_USAGE.md](https://github.com/constructive-io/pgsql-parser/tree/main/packages/deparser/DEPARSER_USAGE.md).
135
135
 
136
136
  ## Why Use `pgsql-deparser`?
137
137
 
@@ -149,6 +149,8 @@ Built on the excellent work of several contributors:
149
149
 
150
150
  ---
151
151
 
152
+ **🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**
153
+
152
154
  ## Related
153
155
 
154
156
  * [pgsql-parser](https://www.npmjs.com/package/pgsql-parser): The real PostgreSQL parser for Node.js, providing symmetric parsing and deparsing of SQL statements with actual PostgreSQL parser integration.
@@ -159,7 +161,7 @@ Built on the excellent work of several contributors:
159
161
  * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs.
160
162
  * [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures.
161
163
  * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
162
- * [libpg-query](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.
164
+ * [libpg-query](https://github.com/constructive-io/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries.
163
165
 
164
166
  ## Disclaimer
165
167
 
package/deparser.d.ts CHANGED
@@ -104,8 +104,6 @@ export declare class Deparser implements DeparserVisitor {
104
104
  CollateClause(node: t.CollateClause, context: DeparserContext): string;
105
105
  BooleanTest(node: t.BooleanTest, context: DeparserContext): string;
106
106
  NullTest(node: t.NullTest, context: DeparserContext): string;
107
- private static readonly RESERVED_WORDS;
108
- private static needsQuotes;
109
107
  quoteIfNeeded(value: string): string;
110
108
  preserveOperatorDefElemCase(defName: string): string;
111
109
  String(node: t.String, context: DeparserContext): string;