pg-parser
github.com · Package · Quiet
Typed TypeScript AST for parsing Postgres queries
- Developer tools
- Package
- TypeScript
- Day-7 check
- Day-30 check
- typescript
- postgres
- parser
- postgres parser
- sql ast typescript
- pg query parser
- typed sql
- libpg query
- Stars
- 212
- Forks
- 4
- Open issues
- 5
- Last commit
- Releases
- 6
- Found
- 2 years ago
GitHub figures as of . They are context, not a ranking.
pg-parser turns Postgres queries into a fully typed abstract syntax tree in TypeScript, powered by libpg_query. The maker wrote it to analyze schemas spread across SQL files for a tool called pg-nano, so it suits TypeScript developers who work with SQL in code.
Repository description on GitHub: “Parse your Postgres queries into a 100% type-safe AST (powered by libpg_query)”
What it does
- Typed TypeScript AST for parsing PostgreSQL queries
- Parses SQL and PL/pgSQL with a fingerprint function
- Fork of libpg-query with TypeScript type definitions
Good for
- Order SQL schema statements topologically in TypeScript
- Walk the syntax tree of a Postgres query with type guards
Suits: TypeScript developers who work with SQL in code.
Worth knowing: The maker warns type guards may break between versions, so pinning a version is advised.
What you can try
Read the README on GitHub and install from source.
Install
pnpm add @pg-nano/pg-parserTaken from the project’s README. Read the project’s own instructions before running anything.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw pg-parser on , when aleclarsoniv posted it to Show HN. The oldest published release on GitHub is v16.1.0, dated . pg-parser had been shipping tagged releases for 5 days before it was found. 6 releases have been published in total; the latest is v16.1.5 ().
Day-7 and day-30 updates
Day 7 no new release
- No tagged release was published in the first 7 days after it was found (GitHub release dates).
- Show HN discussion at check time: 116 points, 21 comments. API record
Checked , later than day 7 because tracking began after.
Day 30 3 releases shipped
- 3 releases in the first 30 days: v16.1.2 (30 Sep 2024), v16.1.3 (2 Oct 2024), v16.1.4 (2 Oct 2024)
- Show HN discussion at check time: 116 points, 21 comments. API record
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: pg-nano/pg-parser
- Release v16.1.0
- Release v16.1.1
- Found: aleclarsoniv posted it to Show HN. Show HN
- Release v16.1.2
- Release v16.1.3
- Release v16.1.4
- Release v16.1.5
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Quick answers
- When was pg-parser released?
- Its first tagged release on GitHub is dated 13 Sep 2024. Kip found it on Show HN on 18 Sep 2024.
- Is pg-parser open source?
- Its source is public on GitHub at pg-nano/pg-parser; check the repository for licence terms.
- What does pg-parser run on?
- Library.
- Is pg-parser free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is pg-parser still maintained?
- It has had no commit or release for over a year as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| Show HN | listing official API record | |
| GitHub repository | pg-nano/pg-parser REST API record | |
| GitHub Releases | release list REST API record |
Stable ID hn-41576956. Summary written by KipFound’s editor.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.