mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-12 15:02:07 +00:00
feat: Support double quoted string (#530)
This commit is contained in:
parent
f29ce10a1a
commit
17c238bda7
4 changed files with 52 additions and 7 deletions
|
@ -30,6 +30,21 @@ fn parse_identifiers() {
|
|||
mysql().verified_stmt("SELECT $a$, àà");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_literal_string() {
|
||||
let sql = r#"SELECT 'single', "double""#;
|
||||
let select = mysql().verified_only_select(sql);
|
||||
assert_eq!(2, select.projection.len());
|
||||
assert_eq!(
|
||||
&Expr::Value(Value::SingleQuotedString("single".to_string())),
|
||||
expr_from_projection(&select.projection[0])
|
||||
);
|
||||
assert_eq!(
|
||||
&Expr::Value(Value::DoubleQuotedString("double".to_string())),
|
||||
expr_from_projection(&select.projection[1])
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_show_columns() {
|
||||
let table_name = ObjectName(vec![Ident::new("mytable")]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue