# JSQLParser/JSqlParser

JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes. The generated hierarchy can be navigated using the Visitor Pattern

Repository: https://github.com/JSQLParser/JSqlParser
Canonical: https://ross.abutalabs.com/products/jsqlparser
Homepage: https://github.com/JSQLParser/JSqlParser/wiki
Language: Java
License: Apache-2.0
License Family: permissive
Topics: sql, java, parser, ast, postgresql, mysql, sqlserver, jsqlparser, hierarchy, statement, paypal, sql-statement, oracle
Last push: 2026-08-26T05:40:11+00:00

## Health v2 (maintenance only)
Score: 74/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 28, longevity 100
- inputs: {"age_days": 5550, "days_push": 7, "days_rel": 473, "gap_med": 67.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5956, forks 1429 (observed 2026-08-28T04:09:33.699339+00:00)

## What it is
JSqlParser is a Java library that parses SQL statements into a traversable hierarchy of Java classes (an AST) that can be navigated via the Visitor Pattern and serialized back to SQL. It supports many dialects including Oracle, SQL Server, MySQL, and PostgreSQL without native extensions.

## Use cases
- parse sql statements into an ast in java
- rewrite or transform sql queries programmatically
- validate sql syntax before execution
- extract table and column names from sql queries
- build a sql query builder on top of a parser
- translate sql between database dialects

## When to choose
- you need to parse, analyze, or rewrite SQL on the JVM
- you need multi-dialect SQL support including Oracle, MySQL, PostgreSQL, and SQL Server specifics
- you want a pure-Java parser with no native dependencies

## When to avoid
- you need a full SQL execution engine rather than parsing
- you work outside the JVM ecosystem
- you need complete support for every proprietary SQL extension of a single vendor

## Facets
- artifact type: library
- maturity: active
- function: parser, serialization, developer-tools
- domain: databases, parsers, developer-tools
- platform: jvm, cross-platform
- tags: sql-parser, ast, visitor-pattern, javacc, sql-dialects, query-rewriting

## Member repositories
- JSQLParser/JSqlParser (main) score 74

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:33.699339+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:50:42.046867+00:00, confidence not recorded.
  - readme: https://github.com/JSQLParser/JSqlParser (fetched 2026-08-28T04:09:33.699339+00:00, sha 754f58318a9e)
  - homepage: https://github.com/JSQLParser/JSqlParser/wiki (fetched 2026-08-29T08:46:08.237815+00:00, sha 8ce5eeb2cd21)
- Data as of 2026-08-30T08:39:29.467469+00:00.
