mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 06:54:07 +00:00
SQLite: Allow dollar signs in placeholder names (#1620)
This commit is contained in:
parent
d0d4153137
commit
48f025f658
4 changed files with 53 additions and 4 deletions
|
@ -561,6 +561,16 @@ fn test_dollar_identifier_as_placeholder() {
|
|||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
||||
// $$ is a valid placeholder in SQLite
|
||||
match sqlite().verified_expr("id = $$") {
|
||||
Expr::BinaryOp { op, left, right } => {
|
||||
assert_eq!(op, BinaryOperator::Eq);
|
||||
assert_eq!(left, Box::new(Expr::Identifier(Ident::new("id"))));
|
||||
assert_eq!(right, Box::new(Expr::Value(Placeholder("$$".to_string()))));
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
fn sqlite() -> TestedDialects {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue