Documentation
¶
Overview ¶
Package mysqlparser is an optional sqlguard Parser backed by a real MySQL grammar (github.com/xwb1989/sqlparser — a pure-Go, no-cgo, lightweight Vitess-derived MySQL parser).
It produces exact, structural answers for the false-positive-prone facts (statement kind, WHERE/LIMIT/ORDER BY/FROM presence, SELECT *, explicit INSERT columns) instead of regex guesses. SQL the grammar rejects — CTEs it doesn't support, dynamic fragments, dialect extensions — transparently degrades to sqlguard's zero-dependency FallbackParser, so analysis never breaks the caller's query path.
Usage:
sqlguard.Register("sqlguard-mysql", "mysql", middleware.WithParser(mysqlparser.New()))
db, _ := sql.Open("sqlguard-mysql", dsn)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.