Registry / other / pingcap-parser

pingcap-parser

JSON →
library3.1.2+incompatiblegogounverified

PingCAP Parser is a SQL parser for TiDB, supporting MySQL-compatible syntax.

go get github.com/pingcap/parser
INSTALL
IMPORT
SIG · PINGCAP-PARSER
P
pingcap-parser
othergov3.1.2+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parser
github.com/pingcap/parser

Parses a single SQL statement using PingCAP parser.

package main import ( "fmt" "github.com/pingcap/parser" "github.com/pingcap/parser/ast" ) func main() { sql := "SELECT * FROM t" stmt, err := parser.New().ParseOneStmt(sql, "", "") if err != nil { fmt.Println(err) return } fmt.Printf("%T\n", stmt) }
Debug
Known issues
gotchaThis package is designed for TiDB; may not fully support all MySQL features.
fix
Test with your specific SQL dialect.
affects: *
Upgrade
Version history
3.1.2+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
pingcap-parser — go get pingcap-parser · libregistry