# xwb1989/sqlparser

SQL Parser implemented in Go

Repository: https://github.com/xwb1989/sqlparser
Canonical: https://ross.abutalabs.com/products/sqlparser
Language: Go
License: Apache-2.0
License Family: permissive
Last push: 2022-09-27T14:36:33+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4299, "days_push": 1436, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1583, forks 257 (observed 2026-08-28T04:05:07.168105+00:00)

## What it is
A self-contained Go package for parsing MySQL SQL queries, extracted from the Vitess project's SQL parser. It turns SQL statements into an abstract syntax tree that can be inspected and manipulated programmatically.

## Use cases
- parse mysql sql queries in go
- extract table names from sql statements
- analyze or rewrite sql queries programmatically
- validate sql syntax before executing queries
- parse multiple sql statements from a stream
- build sql-aware tooling like linters or proxies

## When to choose
- you need a lightweight, self-contained MySQL SQL parser in Go without pulling in all of Vitess
- you want to inspect or transform SQL statements as syntax trees
- you need to parse batches of SQL statements from an io.Reader

## When to avoid
- you need support for SQL dialects other than MySQL
- you need a parser that stays current with the latest Vitess improvements or newer MySQL syntax
- you need an active project with ongoing maintenance and community support

## Facets
- artifact type: library
- maturity: maintenance
- function: parser
- domain: databases, parsers, developer-tools
- platform: go, cross-platform
- tags: sql, mysql, query-parsing, ast

## Member repositories
- xwb1989/sqlparser (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:07.168105+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-30T03:56:07.924024+00:00, confidence not recorded.
  - readme: https://github.com/xwb1989/sqlparser (fetched 2026-08-28T04:05:07.168105+00:00, sha 7671d87f39d6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
