Files
turso/core
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-09-15 14:48:26 +03:00
2025-06-30 10:01:03 +03:00
2025-09-17 12:46:55 +03:00
2025-08-15 17:08:53 -04:00
2025-01-28 14:55:38 -05:00
2025-09-13 11:00:37 +05:30
2025-06-23 19:52:13 +01:00
2025-09-17 11:57:23 +03:00
2025-01-28 14:55:38 -05:00
2025-06-23 19:52:13 +01:00
2025-09-17 12:46:55 +03:00
2025-09-13 10:49:14 +02:00
2025-06-30 09:54:13 +03:00