mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 06:54:07 +00:00
Support MySQL style LIMIT X, Y
(#415)
This commit is contained in:
parent
2072ef2031
commit
d7f4f1aac9
2 changed files with 13 additions and 0 deletions
|
@ -2605,6 +2605,11 @@ impl<'a> Parser<'a> {
|
|||
if offset.is_none() && self.parse_keyword(Keyword::OFFSET) {
|
||||
offset = Some(self.parse_offset()?)
|
||||
}
|
||||
|
||||
if offset.is_none() && self.consume_token(&Token::Comma) {
|
||||
// mysql style LIMIT 10, offset 5
|
||||
offset = Some(self.parse_offset()?)
|
||||
}
|
||||
}
|
||||
|
||||
let fetch = if self.parse_keyword(Keyword::FETCH) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue