Documentation
¶
Overview ¶
Command debug-parse parses SQL and prints the result, for working on the parser by hand.
It reads the SQL from the command line, from a file, or from stdin, and prints one of: the AST, the token stream, the re-rendered SQL, or the error meyer would return.
Usage:
go run ./cmd/debug-parse 'SELECT 1' go run ./cmd/debug-parse -tokens 'SELECT 1' go run ./cmd/debug-parse -f query.sql go run ./cmd/debug-parse -update-delete-limit 'DELETE FROM t LIMIT 1' echo 'SELECT 1' | go run ./cmd/debug-parse
A parse error is printed with a caret under the offending byte, in the same wording SQLite uses.
Click to show internal directories.
Click to hide internal directories.