Page MenuHomePhabricator

Implement SQL Query Validator in Quarry
Open, Needs TriagePublic

Description

I have to wait for ages while my query is queued, just to learn that there is a syntax error. Is it possible to preprocess queries so that syntax errors are reported at once?

Event Timeline

Reedy renamed this task from SQL Syntax errors in Quarry to Implement SQL Query Validator in Quarry.Feb 28 2018, 8:21 PM
zhuyifei1999 subscribed.

Quarry isn't supposed to be slow in 'queued'. I'll investigate.

Is there an open source 'SQL Query Validator' that supports MySQL syntax? My quick google search didn't find anything.

A possible solution would be to use CodeMirror and the linting addon since it is already used in Quarry, but there is no support for linting the SQL syntax. If someone is interested, it could be an upstream contribution, and then it could be integrated on Quarry.

The problem is, this isn't really standardized SQL, but MySQL / MariaDB variant. Upstreaming this sounds unlikely.