You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A comprehensive monorepo for PostgreSQL Abstract Syntax Tree (AST) parsing, manipulation, and code generation. This collection of packages provides everything you need to work with PostgreSQL at the AST level, from parsing SQL queries to generating type-safe TypeScript definitions.
17
21
18
22
## 📦 Packages Overview
@@ -56,6 +60,7 @@ import { parse } from 'pgsql-parser';
56
60
57
61
const ast =awaitparse('SELECT * FROM users WHERE id = 1');
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
234
-
235
-
### Development Workflow
236
-
1. Fork the repository
237
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
238
-
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
239
-
4. Push to the branch (`git push origin feature/amazing-feature`)
240
-
5. Open a Pull Request
241
-
242
-
## 📄 License
243
-
244
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE-MIT) file for details.
245
-
246
-
## 🙏 Credits
247
-
248
-
Built on the excellent work of several contributors:
249
-
250
-
***[Dan Lynch](https://github.com/pyramation)** — official maintainer since 2018 and architect of the current implementation
251
-
***[Lukas Fittl](https://github.com/lfittl)** for [libpg_query](https://github.com/pganalyze/libpg_query) — the core PostgreSQL parser that powers this project
252
-
***[Greg Richardson](https://github.com/gregnr)** for AST guidance and pushing the transition to WASM for better interoperability
253
-
***[Ethan Resnick](https://github.com/ethanresnick)** for the original Node.js N-API bindings
254
-
***[Zac McCormick](https://github.com/zhm)** for the foundational [node-pg-query-native](https://github.com/zhm/node-pg-query-native) parser
255
-
256
-
## 🔗 Related Projects
257
-
258
-
### Core Packages (in this monorepo)
259
-
*[pgsql-parser](https://www.npmjs.com/package/pgsql-parser): The real PostgreSQL parser for Node.js
260
-
*[pgsql-deparser](https://www.npmjs.com/package/pgsql-deparser): Lightning-fast SQL generation from AST
261
-
*[@pgsql/cli](https://www.npmjs.com/package/@pgsql/cli): Unified CLI for PostgreSQL AST operations
262
-
*[@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): Type-safe AST construction utilities
263
-
*[pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): PostgreSQL protobuf parser and code generator
264
-
265
-
214
+
## Related
266
215
267
-
### External Dependencies
268
-
*[libpg-query](https://github.com/launchql/libpg-query-node): The PostgreSQL parser exposed for Node.js
216
+
*[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.
217
+
*[pgsql-deparser](https://www.npmjs.com/package/pgsql-deparser): A streamlined tool designed for converting PostgreSQL ASTs back into SQL queries, focusing solely on deparser functionality to complement `pgsql-parser`.
218
+
*[@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs.
219
+
*[@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications.
220
+
*[@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.
221
+
*[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.
222
+
*[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.
269
223
270
-
## ⚖️ Disclaimer
224
+
## Disclaimer
271
225
272
226
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
0 commit comments