Commit 004f64c
authored
Add {:unsafe_fragment, ...} support to RETURNING clause (#722)
This adds support for raw SQL fragments in the RETURNING clause,
matching the existing pattern used by conflict_target.
This enables use cases like returning computed expressions:
RETURNING id, (price = EXCLUDED.price) AS was_skipped1 parent e3430b2 commit 004f64c
File tree
3 files changed
+10
-0
lines changed- lib/ecto/adapters
- postgres
- tds
- test/ecto/adapters
3 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1204 | 1204 | | |
1205 | 1205 | | |
1206 | 1206 | | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1207 | 1210 | | |
1208 | 1211 | | |
1209 | 1212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1030 | 1033 | | |
1031 | 1034 | | |
1032 | 1035 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1877 | 1877 | | |
1878 | 1878 | | |
1879 | 1879 | | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1880 | 1884 | | |
1881 | 1885 | | |
1882 | 1886 | | |
| |||
0 commit comments