Support MySQL ROWS syntax for VALUES (#737)

* Adapt VALUES to MySQL dialect

* Update src/ast/query.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* remove *requirement* for ROW

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
Aljaž Mur Eržen 2022-12-01 15:46:55 +01:00 committed by GitHub
parent faf75b7161
commit 8e1c90c0d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 35 deletions

View file

@ -1067,7 +1067,9 @@ fn parse_prepare() {
Expr::Identifier("a3".into()),
]];
match &*source.body {
SetExpr::Values(Values(values)) => assert_eq!(values.as_slice(), &expected_values),
SetExpr::Values(Values { rows, .. }) => {
assert_eq!(rows.as_slice(), &expected_values)
}
_ => unreachable!(),
}
}