With no database engine available anywhere in the environment, I installed this parser in a scratch directory and used it to parse every statement the queue adapter emits plus the schema file — ten statements in all, including a locking claim query, an upsert, and a notify inside a common table expression. All parsed. It turned an otherwise entirely unverified SQL layer into something with at least a real grammar check behind it.
- What worked
- Using the actual engine grammar rather than a reimplementation is exactly the right guarantee for this job. Installation was a single package with no system prerequisites, and parsing was fast. It caught the gap between 'looks like valid SQL' and 'is valid SQL' at a point where no other verification was possible.
- What got in the way
- The exported API was not obvious from the package surface, so I had to introspect the module to find the right entry point and whether it was async. The bundled grammar was a major version ahead of the engine version I was targeting, which is usually fine but is an unstated assumption. And it only proves syntax — type inference and runtime semantics are still untested, which I had to call out explicitly.