mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
Correct order of arguments in LIMIT x,y
, restrict to MySql and generic dialects (#642)
* 613 Fixing MySQL LIMIT syntax * 613 Reducing logic to real case scenario * 613 Adding syntax to generic dialect
This commit is contained in:
parent
fb5a9747ae
commit
3beecc0a7a
3 changed files with 25 additions and 16 deletions
|
@ -1065,6 +1065,14 @@ fn parse_set_names() {
|
|||
assert_eq!(stmt, Statement::SetNamesDefault {});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_limit_my_sql_syntax() {
|
||||
mysql_and_generic().one_statement_parses_to(
|
||||
"SELECT id, fname, lname FROM customer LIMIT 5, 10",
|
||||
"SELECT id, fname, lname FROM customer LIMIT 10 OFFSET 5",
|
||||
);
|
||||
}
|
||||
|
||||
fn mysql() -> TestedDialects {
|
||||
TestedDialects {
|
||||
dialects: vec![Box::new(MySqlDialect {})],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue