Parsing and generating SQLite's SQL dialect with Ruby
summary
Plume is a pure-Ruby SQL toolset that parses SQLite’s permissive dialect (including missing commas between table constraints) and generates SQL; it implements a handwritten recursive descent parser with a lexer, lazy token spans and minimal allocations, and already validates against 20,000+ test statements scraped from SQLite’s public suite. The concrete syntax tree exposes offsets for lazy value extraction and supports SQL generation via a fluid Ruby API and an experimental hash-based SQL representation; create table parsing is complete, expression and SELECT parsing remain in progress.
AI-written summary · about
chapters (5)
- 0:00Introduction and motivation
- 8:17How Plume works
- 13:16Parsing create table statements
- 20:44What's next for Plume
- 27:46Call to action and conclusion
related talks
20mYou don't need an ORM
34mDon’t fear SQL: A better way to store and handle data with SQLBrite & SQLDelight
36mBeyond dbt: Modern SQL Transformation and Lineage with SQLGlot and SQLMesh
32mBecause SQL is everywhere but you don't want to use it
33mWriting DSL's with Parslet
51mForbidden Fruit: A Test of Ruby's Parse Tree
29mDuckPL: A procedural language in DuckDB
27mGenerate Parsers! Prevent Exploits!
