You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi - first want to say what an amazing and fun to work with lib this is!
Looking to use this for a MySQL project, but some of the queries I'm working with aren't supported yet.
It seems for now you are accepting dialect-specific extensions in the mainline parser, so am happy to work on this. I have a fork which fixes each of the following issues. Should I open separate issues/PRs, or is it more helpful if I raise a PR for all them? (Several are just bools on Statement::{ } variants)
Summary: An optional IGNORE keyword after INSERT Query:INSERT IGNORE INTO user (id) VALUES (1) Result:ParserError("Expected one of INTO or OVERWRITE, found: IGNORE")
Summary: Inserts can set fields with an alternate syntax, similar to an UPDATE query Query:INSERT INTO user SET id = 1 Result:ParserError("Expected SELECT, VALUES, or a subquery in the query body, found: SET")
Summary: Inserts can fallback to updates on a key collision Query:INSERT INTO user (id, name) VALUES (1, 'Printer') ON DUPLICATE KEY UPDATE name = 'Central Printer' Result:ParserError("Expected end of statement, found: ON")
UPDATE ... [ORDER BY ...] [LIMIT row_count] (docs)
Summary: Updates can optionally include ORDER BY and LIMIT clauses Query:UPDATE user SET id = 1 ORDER BY id LIMIT 1 Result:ParserError("Expected end of statement, found: ORDER")
DELETE ... [ORDER BY ...] [LIMIT row_count] (docs)
Summary: Deletes can optionally include ORDER BY and LIMIT clauses Query:DELETE FROM user ORDER BY id LIMIT 1 Result:ParserError("Expected end of statement, found: ORDER")
Summary: The BINARY operator/unary function can operate without parameters (similar to INTERVAL 1 DAYS) Query:SELECT * FROM user WHERE name = BINARY 'name' Result:ParserError("Expected end of statement, found: \'name\'")
Many thanks!
Reacted by Andrew Browne, Carl Holloway, Kyle McCarthy, Anders Olsson, Takahiro Ebato and xiaopeng8570
Activity
LucaCappelletti94 commentedon Sep 23, 2026
Completed by #2146 and #2296, all of the listed queries now parse.