parsehouse
JSON →Pure TypeScript ClickHouse SQL parser that produces a typed AST with discriminated unions, supports traversal, modification, and canonical SQL serialization. Current stable version is 0.1.1, released as an early-stage library. Key differentiators: designed specifically for ClickHouse syntax (FINAL, PREWHERE, LIMIT BY, SETTINGS), provides a structured AST with kind-based type narrowing, includes dialect configuration, and normalizes SQL output by stripping comments and whitespace. Compared to generic SQL parsers, parsehouse targets ClickHouse-specific features and TypeScript-first typing, making it suitable for building linters, validators, and refactoring tools.
Resources
packageparsehouse ↗