Skip to content
This repository was archived by the owner on Dec 25, 2019. It is now read-only.

Commit 08f2cf3

Browse files
author
JLDLaughlin
committed
get rid of trailing ,, update test failures
1 parent b75dcaf commit 08f2cf3

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/ast/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ impl fmt::Display for Statement {
897897
}
898898
)?;
899899
if let Some(like) = like {
900-
write!(f, " LIKE '{}'", value::escape_single_quote_string(like),)?;
900+
write!(f, " LIKE '{}'", value::escape_single_quote_string(like))?;
901901
}
902902
Ok(())
903903
}

tests/sqlparser_common.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,13 +2752,10 @@ fn parse_show_objects_with_like_regex() {
27522752
let sql = "SHOW TABLES LIKE '%foo%'";
27532753
match verified_stmt(sql) {
27542754
Statement::ShowObjects { object_type, like } => {
2755-
match like {
2756-
Some(value) => assert_eq!("%foo%", value),
2757-
None => unimplemented!(),
2758-
}
2755+
assert_eq!(like.unwrap(), "%foo%");
27592756
assert_eq!(ObjectType::Table, object_type);
27602757
}
2761-
_ => assert!(false),
2758+
_ => panic!("invalid SHOW OBJECTS statement"),
27622759
}
27632760
}
27642761

0 commit comments

Comments
 (0)