Commit ef52884
fix(driver-sql): aggregate() attributes an unresolvable column to its clause (#11729)
* fix(driver-sql): attribute an unresolvable aggregate column to its clause
aggregate() answered DATABASE_ERROR/500 for an unresolvable column where
find() and count() answer the #8790 refusal. The dialect-named column is
now attributed to the clause the caller's own query names it in: a
groupBy field or an aggregation field refuses INVALID_FIELD/400 (the
ingress door's own code for this condition), a column in neither clause
is the WHERE and keeps the #8790 INVALID_FILTER/400 refusal verbatim,
and a wording that parses to no name keeps the #11455 terminal envelope
unchanged (no supportable attribution, per the #8931 ruling).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VK8rFDtg8eREaxBGX99Csn
* test(driver-sql): type the groupBy spelling loop without a readonly cast
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VK8rFDtg8eREaxBGX99Csn
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5383fa6 commit ef52884
4 files changed
Lines changed: 644 additions & 17 deletions
File tree
- .changeset
- packages/drivers/driver-sql/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
0 commit comments