Repository navigation
Add support for OFFSET without the ROWS keyword - #158
Conversation
|
Test failed due to a rustfmt nightly issue. Bumping to re-run. |
|
Ok well this keeps failing with |
|
Ahh https://github.com/andygrove/sqlparser-rs/pull/159 seems to maybe fix it. |
|
Yep, the rustfmt issue should be fixed in #159. I didn't manage to fix coverage yesterday, before I got distracted. Sorry you didn't get a reply. I took a quick glance at the patch yesterday - and it looked great (thanks!), but I wanted to fix CI first before taking a closer look and merging. Note to self: this quirk is documented in https://dev.mysql.com/doc/refman/8.0/en/select.html
(note the lack of |
MySQL doesn't support the ROWS part of OFFSET. Teach the parser to remember which variant it saw, including just ROW.
|
Rebased on master. |
|
Excellent (and thanks for rebasing promptly)! Do I understand it correctly that you needed MySQL-specific syntax to round-trip properly for your use-case? |
|
Luckily I am currently only producing SQL, so things are fine as is. I do have an upcoming project that would require me to parse SQL, and this is one of the first obvious things that would force me to do silly stuff like use regexes to remove or insert the keywords. I took a look at your custom parser doc because I was curious how this could be possible with the current code. |
MySQL doesn't support the ROWS part of OFFSET. Teach the parser to
remember which variant it saw, including just ROW.