mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 14:28:22 +00:00
Further simplify parse_compound_identifier (5/8)
This part changes behavior: - Fail when no identifier is found. - Avoid rewinding if EOF was hit right after the identifier.
This commit is contained in:
parent
991fd19b87
commit
7bbf69f513
2 changed files with 25 additions and 17 deletions
|
@ -103,6 +103,13 @@ fn parse_invalid_table_name() {
|
|||
assert!(ast.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_no_table_name() {
|
||||
let mut parser = parser("");
|
||||
let ast = parser.parse_tablename();
|
||||
assert!(ast.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_insert_with_columns() {
|
||||
let sql = String::from("INSERT INTO public.customer (id, name, active) VALUES(1, 2, 3)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue