mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-29 02:14:07 +00:00
Turn type Ident into struct Ident
The Ident type was previously an alias for a String. Turn it into a full fledged struct, so that the parser can preserve the distinction between identifier value and quote style already made by the tokenizer's Word structure.
This commit is contained in:
parent
9b2287f14c
commit
b1cbc55128
6 changed files with 160 additions and 88 deletions
|
@ -26,7 +26,7 @@ fn parse_identifiers() {
|
|||
|
||||
#[test]
|
||||
fn parse_show_columns() {
|
||||
let table_name = ObjectName(vec!["mytable".to_string()]);
|
||||
let table_name = ObjectName(vec![Ident::new("mytable")]);
|
||||
assert_eq!(
|
||||
mysql_and_generic().verified_stmt("SHOW COLUMNS FROM mytable"),
|
||||
Statement::ShowColumns {
|
||||
|
@ -41,7 +41,7 @@ fn parse_show_columns() {
|
|||
Statement::ShowColumns {
|
||||
extended: false,
|
||||
full: false,
|
||||
table_name: ObjectName(vec!["mydb".to_string(), "mytable".to_string()]),
|
||||
table_name: ObjectName(vec![Ident::new("mydb"), Ident::new("mytable")]),
|
||||
filter: None,
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue