mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-03 16:34:19 +01:00
Merge 'Reject unsupported FROM clauses in UPDATE' from Mikaël Francoeur
Before, FROM clauses were simply ignored: ``` turso> update t set a = b from (select random() as b); × Parse error: no such column: b ``` Now, they will be rejected with a clear message. It also makes it clearer that they need to be implemented: ``` turso> update t set a = b from (select random() as b); × Parse error: FROM clause is not supported in UPDATE ``` Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #3509
This commit is contained in:
@@ -113,6 +113,9 @@ pub fn prepare_update_plan(
|
||||
if body.or_conflict.is_some() {
|
||||
bail_parse_error!("ON CONFLICT clause is not supported in UPDATE");
|
||||
}
|
||||
if body.from.is_some() {
|
||||
bail_parse_error!("FROM clause is not supported in UPDATE");
|
||||
}
|
||||
if body
|
||||
.indexed
|
||||
.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user