improve support for T-SQL EXECUTE statements (#1490)

This commit is contained in:
Ophir LOJKINE 2024-11-07 16:59:14 +01:00 committed by GitHub
parent 543ec6c584
commit d853c35391
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 77 additions and 14 deletions

View file

@ -1539,8 +1539,9 @@ fn parse_execute() {
assert_eq!(
stmt,
Statement::Execute {
name: "a".into(),
name: ObjectName(vec!["a".into()]),
parameters: vec![],
has_parentheses: false,
using: vec![]
}
);
@ -1549,11 +1550,12 @@ fn parse_execute() {
assert_eq!(
stmt,
Statement::Execute {
name: "a".into(),
name: ObjectName(vec!["a".into()]),
parameters: vec![
Expr::Value(number("1")),
Expr::Value(Value::SingleQuotedString("t".to_string()))
],
has_parentheses: true,
using: vec![]
}
);
@ -1563,8 +1565,9 @@ fn parse_execute() {
assert_eq!(
stmt,
Statement::Execute {
name: "a".into(),
name: ObjectName(vec!["a".into()]),
parameters: vec![],
has_parentheses: false,
using: vec![
Expr::Cast {
kind: CastKind::Cast,