debug-parse

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 10 Imported by: 0

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
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL