pgsql-parser
The PostgreSQL Parser for Node.js
The real PostgreSQL parser for Node.js that interprets and converts PostgreSQL syntax. Uses actual PostgreSQL C parser via WebAssembly for symmetric parsing and deparsing with battle-tested reliability.
Uses actual PostgreSQL C parser via WebAssembly
Parse SQL to AST and deparse AST back to SQL
Tested with 23,000+ SQL statements
Professional-grade PostgreSQL parsing and AST manipulation
Uses the actual PostgreSQL C parser via WebAssembly, ensuring 100% compatibility with PostgreSQL syntax.
Parse SQL statements to AST and convert AST back to SQL with perfect round-trip fidelity.
Extensively tested with over 23,000 SQL statements to ensure robust parsing of complex queries.
Programmatically modify, analyze, and transform PostgreSQL queries through Abstract Syntax Tree manipulation.
Leverages WebAssembly for near-native performance while maintaining JavaScript accessibility.
Full TypeScript definitions for AST nodes, enabling type-safe query manipulation and analysis.
Parse SQL statements into AST and convert them back to SQL with perfect fidelity using the real PostgreSQL parser.
Modify SQL queries by manipulating their AST representation, enabling powerful query transformation capabilities.