Documentation
¶
Overview ¶
Package pgparser is an optional sqlguard Parser backed by a real PostgreSQL grammar (github.com/auxten/postgresql-parser, pure Go, no cgo).
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 — dynamic fragments, dialect extensions, driver placeholders it can't handle — transparently degrades to sqlguard's zero-dependency FallbackParser, so analysis never breaks the caller's query path.
Usage:
sqlguard.Register("sqlguard-pg", "pgx", middleware.WithParser(pgparser.New()))
db, _ := sql.Open("sqlguard-pg", 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.