Repository navigation
Commit 78bc4ad
* fix(driver-sql)!: present findWithWindowFunctions rows like every other read door (#16609)
The one record read door that returned `await builder` with no presentation:
no `formatOutput` (every `find()`/`findOne()` row gets it) and no
`presentReadValue` (`aggregate()`/`distinct()` got it under #3797/#3849). So a
declared `Field.boolean` answered `1` where `find()` answered `true`, and a
declared `Field.object` answered the stored JSON text where `find()` answered
the parsed object.
Each row now runs through the same `formatOutput` pass, minus the window
function alias columns, which are computed values rather than declared fields.
The collision case is ruled and pinned: an alias spelled the same as a declared
field already won the key in SQL (`select *` plus `<window> as ok` keeps the
last column), and its value now stays raw rather than being folded through the
declared type's rule.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADLdAs2pVcH17h9tZKWMBg
* test(driver-sql): live-dialect arm for the window door, and the full FROM/TO table
Contract-review patch round on PR #16716 (findings F2, F3, F5 and the
non-governed half of F4). No production code changes.
F5 — merged origin/main, so this branch now carries #16619: `formatOutput`'s
instant gates are unconditional, which is the presenter this door actually
ships through. Every CI leg on the previous head measured the pre-B1 presenter.
F3 — `sql-driver-window-function-output.test.ts` gains a `measure(cell)` arm
over `DIALECT_CELLS`, declared through `declareDialectCell` so an
unprovisioned cell is a NAMED SKIP and never a silent pass. It asserts the two
halves the SQLite-only arm cannot: `typeof row.ok === 'boolean'` (the MySQL
half of the `isSqlite || isMysql` boolean gate) and the canonical
`YYYY-MM-DDTHH:MM:SS.sssZ` text for `closed_at` / `created_at` / `updated_at`
(the PG + MySQL instant fold). SS4 reads the same row back through raw knex to
prove the fold is the driver's and not the client's.
F2 — the changeset gains a per-class, per-dialect FROM/TO table covering all
seven classes this door moves: adds `external.columnMap` (remote column key ->
local field key, every dialect), the SQLite numeric-string -> `number` move,
the MySQL `Field.date` `Date` -> `YYYY-MM-DD` move and `Field.time` ->
canonical `HH:MM:SS[.fff]`, and spells the instant TO as the canonical text on
every dialect. `minor`, the BREAKING banner and the ADR-0087 disposition are
unchanged.
F4 (non-governed half) — the header comment of
`sql-driver-13973-canonical-iso-read-door.test.ts` said this door applies no
read presentation. It routes through `formatOutput` since #16609, so the
comment now says that and flags that ADR-0053 D-F1 still records it as not
covered, with governed docs-only card #16782 carrying the amendment.
`docs/adr/**` is untouched here.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TezFG8ZMrNH6n5VTNpPpdH
* docs(changeset): reword the FROM→TO heading so the ADR-0087 gate reads no prescription (#16609)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TezFG8ZMrNH6n5VTNpPpdH
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: os-musk <support@objectstack.ai>
1 parent f315144 commit 78bc4ad
4 files changed
Lines changed: 530 additions & 4 deletions
File tree
- .changeset
- packages/drivers/driver-sql/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
0 commit comments