Files
turso/core/translate
Preston Thorpe 8c53d7f024 Merge 'translation: rewrite expressions and properly handle quoted identifiers in UPSERT' from Preston Thorpe
This PR fixes bugs found in the [turso-
go](https://github.com/tursodatabase/turso-go) driver with UPSERT clause
earlier, where `Gorm` will (obviously) use Expr::Variable's as well as
use quotes for `Expr::Qualified` in the tail end of an UPSERT statement.
Example:
```sql
INSERT INTO users (a,b,c) VALUES (?,?,?) ON CONFLICT (`users`.`a`) DO UPDATE SET b = `excluded`.`b`, a = ?;
```
and previously we were not properly calling `rewrite_expr`, which was
not properly setting the anonymous `Expr::Variable` to `__param_N` named
parameter, so it would ignore it completely, then return the wrong # of
parameters.
Also, we didn't handle quoted "`excluded`.`x`", so it would panic in the
optimizer that Qualified should have been rewritten earlier.

Closes #3157
2025-09-17 11:25:13 -04:00
..
2025-08-21 15:19:16 -03:00
2025-09-12 19:58:45 +07:00
2025-09-13 11:12:44 +02:00
2025-09-17 06:44:10 -04:00
2025-06-11 18:38:56 +02:00
2025-09-13 11:12:44 +02:00
2025-09-17 09:32:49 +03:00
2025-09-12 17:31:50 +07:00
2025-09-13 11:12:44 +02:00
2025-09-13 11:12:44 +02:00
2025-08-21 15:19:16 -03:00
2025-09-13 11:12:44 +02:00
2025-09-13 11:12:44 +02:00
2025-09-13 11:12:44 +02:00
2025-09-13 11:12:44 +02:00