diff --git a/core/src/syn/parser/prime.rs b/core/src/syn/parser/prime.rs index f3df4b86..3f5f8ca0 100644 --- a/core/src/syn/parser/prime.rs +++ b/core/src/syn/parser/prime.rs @@ -288,6 +288,7 @@ impl Parser<'_> { t!("RETURN") | t!("SELECT") | t!("CREATE") + | t!("INSERT") | t!("UPSERT") | t!("UPDATE") | t!("DELETE") diff --git a/core/src/syn/parser/test/mod.rs b/core/src/syn/parser/test/mod.rs index 8eb24466..8cbc32a3 100644 --- a/core/src/syn/parser/test/mod.rs +++ b/core/src/syn/parser/test/mod.rs @@ -106,3 +106,9 @@ fn escaped_params_backtick() { ) .unwrap(); } + +#[test] +fn parse_immediate_insert_subquery() { + let res = + test_parse!(parse_query, r#"LET $insert = INSERT INTO t (SELECT true FROM 1);"#).unwrap(); +}